I'm an avid vim user and have started to write some SQL code recently. I like to write my SQL statements in CAPS and sometimes forget to switch CAPS LOCK off and I then quickly wreak havoc on my code before I realise what's happening.
I have so far not found any way to tell whether the CAPS LOCK key is on other than looking at my keyboa...
How can I poll the keyboard from a console python app? Specifically, I would like to do something akin to this in the midst of a lot of other I/O activities (socket selects, serial port access, etc.):
while 1:
# doing amazing pythonic embedded stuff
# ...
# periodically do a non-blocking check to see if
# we...
What is the best way to block certain input keys from being used in a TextBox with out blocking special keystrokes such as Ctrl-V/Ctrl-C?
For example, only allowing the user to enter a subset of characters or numerics such as A or B or C and nothing else.
...
This is a subjective question, but I need opinions.
I have a WinForms C# application whose window hides itself after a specific keystroke (Enter or Escape), with possible modifiers (e.g. Ctrl-Enter). When hiding on KeyDown or KeyPress, the other application that becomes active after my window hides itself receives the KeyUp event for th...
How (i.e. using which API) is the virtual keyboard opened on Symbian S60 5th edition? The documentation seems to lack information about this.
...
What win32 calls can be used to detect key press events globally (not just for 1 window, I'd like to get a message EVERY time a key is pressed), from a windows service?
...
I want to use part of the output of a command run from the command line in another xterm, or as part of a different command. For instance:
> grep error error.log
error: can't find file ~/<some very long path>/thisfile
and I want to do this:
>ls ~/<some very long path>/
I know two ways to do this:
1. copy ~/<some very long path>/...
What is a good way to implement keyboard handling? In any language, where I write a keyboard-interactive program (such as a tetris game), I end up having some code that looks like this:
for event in pygame.event.get():
if event.type == KEYDOWN:
if False: pass #make everything an elif
elif rotating: pass
...
I've considered the following:
Logitec Desktop MX 5500
Microsoft Wireless Entertainment Desktop 8000
But I'd like see what other programmers would recommend.
...
I'd like the iPhone virtual keyboard to appear pre-set to a particular language (Russian for example) when the user taps a UITextField. Is there a way to do this in Cocoa code?
...
I know there is an on-screen keyboard which you can access on Mac OSX, however I need to add a toolbar button to launch it from within my application.
Does anybody know how I can do this?
...
When I was taught keyboarding in school, much emphasis was made on keeping your fingers centered on the 'home row', with your left hand on ASDF and your right hand on JKL; However, this placement was never comfortable for me so I continued to use the tried-and-true hunt-and-peck. Years later I'm able to type much faster and without looki...
I have a UITextField where the keyboard that pops up has its shift key disabled. The keyboard type is set to UIKeyboardTypeNamePhonePad, which seems like it should allow capitals. If I change the keyboard type to "default" but leave other settings alone, the shift key is active. The other settings are: autocapitalization and autocorr...
The question title says it all really. One caveat though: I did google it and the best solution I could find was to attach an onkeypress event to every input, then check each time if the letter pressed was uppercase, and if it was, then check if shift was also held down. If it wasn't, therefore caps lock must be on. This feels really dir...
Is there a simple way to detect mouse or keyboard activity in Linux or Xorg or Qt4 or Kde4 environment? Obviously not only on a particular window but in the entire Xorg desktop.
Thanks for the help.
...
Problem: EmacsW32 is a version of Emacs that allows the user to make Emacs treat the "Windows" key as the "Meta" key (instead of treating the Alt key as the "Meta" key). Although this works as advertised, the question is what happens when you want to create an Emacs keybinding for the "Alt" key?
Question: Is there a way in this case to ...
In a C# Windows.Forms project I have a control that does not supply the KeyPressed event (It’s a COM control – ESRI map).
It only supplies the KeyUp and KeyDown events, containing the KeyEventArgs structure.
How can I convert the information in KeyEventArgs to a displayable Unicode character, taking the current active keyboard layout ...
My dad has a notebook and the key which has the "/?°" symbols acts like ctrl. Known factory problem. Anyway, his keyboard also has a "?" marked under the "w" key.
Pressing "ctrl + alt + w" will display the "?" character (question, interrogation mark).
Except on Office applications, like Word and Outlook, which will output "¿".
I've se...
Hello, I am working on a c++ win32 program that involves a keyboard hook. The application is a win32 project with no user interface whatsoever. I need to keep the application from closing without using causing the hook to not work or use up a bunch of system resources. I used to use a message box but I need the application to be complete...
Consider that, for a Windows video game, I need to determine if the key which generates the ` and ~ characters on the U.S. English keyboard layout (which is usually below the Escape key and left to 1) has been pressed. This may sound like a trivial question, but it doesn't seem like one to me.
When Windows sends keyboard messages, it sp...