keyboard-events

SendInput() and non-English characters and keyboard layouts.

I'm having trouble simulating character keypresses when a non-English input keyboard language is being used in Windows. I tried calling SendInput() with KEYEVENTF_UNICODE: KEYBDINPUT ki; INPUT input; int character = 0; ki.wVk = 0; ki.wScan = character; ki.dwFlags = KEYEVENTF_UNICODE; ki.time = 0; ki.dwExtraInfo = 0; input.type = IN...

Catch Keyboard event in javascript after refresh

I'd like to write some simple javascript as a music page-turner. I've got it working fine with mouse events, but my wife isn't deft enough to click a mouse with her foot while she's playing piano. Keyboards, being bigger and less inclined to move around, seem like a better solution, but I can't get the keyboard events to catch after th...

jQuery accomodating both HOVER and FOCUS together (mouse and keyboard)

I'm building a mega menu where I want to be able to trigger the menu via both a hover (using the mouse) and focus (such as tabbing to it via the keyboard). This is what I'm presently doing: $(".megaMenu-trigger").focus(function (){$(this).hover()}); $(".megaMenu-trigger").hover(function(){ // do the stuff }); This works, but am w...

Redefine the behavior of the Tab key in a JRadioButton?

I'm trying to redefine the behavior of the Tab key in a JRadioButton so it behaves like radio buttons in other GUI applications, that is: Arrow keys cycle through the radio buttons in the ButtonGroup (I have this working) Tab moves focus to the next component after the last radio button in the group (Problem area) I have an Action th...

Trapping arrow keys

I have a utility that I use as a pseudo "shell". It basically while()'s stdin for commands and runs them through different subroutines. My question is, is there a module or some example I can use to work toward trapping the up arrow so that I can have it perform a certain action? I plan to incorporate a previous command function similar...

C++ console keyboard events

Is there any way to get key events in a Windows console? I need a way to get keydown and keyup events quickly without a GUI. I've tried using getch(), but it doesn't get keyups and waits until a key has been pressed to return. ...

Python bind - allow multiple keys to be pressed simultaniously

I have a problem in Python. I'm using Tkinter and have four bind events, that listen to key presses on my form. My problem is, that these don't run asynchronously. So, for example I can press one button, and the events are recognized. But when I press and hold two keys at the same time, just one event gets fired. Is there an alternativ...

Keyboard Actions on UIC - C#

i have a login form what i want is that after i have filled the password field when i press "Enter", it performs some action, some set of lines of code, in my case the same that the "Login button does". how to do it ...

Is it possible to replace the User's keyboard input with another string in Adobe AIR + Flex application?

Hi, One of our application is implemented in flex and adobe air. We want to have the user press combination of keys, say 'ABC', and have the keyboard return a different character, 'FOG', to whatever app is in focus. This should work even if app has no focus. Will it possible in Adobe Air/Flex? If yes, provide me some examples? Thanks i...

How to modify the keyboard input in QT?

Hi, The following feature needs to be implemented to our existing QT & C++ application. We have to expand the user typed abbreviations into pre-defined words(s). The functionality we need to implement is something similar to text expander. Say if a user typed "FL", this needs to be replaced to "Florida" after immediately. I was able t...

SendInput sequence to create unicode character fails.

I'm working with an on-screen keyboard that needs to send key strokes to a third party application. They are running on Windows XP. A small set of characters that are not available on the US English keyboard need to be supported (such as "å" or ñ). After reviewing SendInput it seemed like the safest thing would be to send the hex unicode...

How to get keyboard input while running in vmware virtual machine?

Hi everybody! I'm logged into a virtual machine using vmware workstation 6.5-7.0.1 or vmware player 3.0.0. I'm working inside the virtual machine. Then I press a key (for example the Delete-Key, but it should work with every key) inside the virtual machine. I want to recognize the "key-press-event" in my C# application which is runni...

Capturing Shift key activity using JavaScript

I am using JavaScript and jQuery and would like to call a function when the user releases the Shift key. The code I came up with works in all the browsers I've tested so far, however the following warning appears in the error console using Firefox 3.5.7. I've tried jQuery 1.2.6, 1.3.2 and 1.4.1. Warning: The 'charCode' property of a ...

Flex : stopPropagation of the event Keyboard.ENTER of a colorpicker.

Hi, I have a WindowedApplication with a listener on keyboardEvent (on the ENTER key), but when the user choose to use the colorpicker and type an hexadecimal code then hit ENTER the event is propaged to my WindowedApplication too. I have to stop the propagation. Any hint or snippet ? thanks P. ...

Longish delay between two consecutive KeyDown events

I'm kind of writing a little game engine -- purely to understand how these work from the inside. I currently don't want to mess with OpenGL or DirectX, so I stick to drawing on a control with GDI+ and all that WinForms stuff. Obviously, I need to handle input. More specifically, keyboard events. This, however, poses a problem: protecte...

Java Robot key activity seems to stop working while certain software is running

I'm writing a Java application to automate character actions in an online game overnight (specifically, it catches fish in Final Fantasy XI). The app makes heavy use of java's Robot class both for emulating user keyboard input and for detecting color changes on certain parts of the screen. It also uses multithreading and a swing GUI. ...

how to hook key event.

I'd like to limit the text length of EditText widget, And if user type more charactes than the limited length, I want to show a kind of warning popup, however I can't show popup. The problem is that we can't show popup while typing, Probably, many people think a way of utilizing OnKeyListener or OnKeyDown. But, when the word is composin...

How to use OnKeyboardActionListener?

Simply say, is there any example about 'OnKeyboardActionListener'? I want to call my method, whenever user type any character on keyboard. OnKeyListener or OnKeyDown is not called when the word is composing. <- it's a problem. So, I'm trying to use 'OnKeyboardActionListener' to solve the problem above. ...

Characters count only start counting on the 2nd character??

I have a function that calculates how many characters remaining the user can type, but I don't know why it only starts counting from the 2nd characters. Means at the end I will able to type an extra character from the maximum amount I set. wInput.maxChars=30 wInput.addEventListener(KeyboardEvent.KEY_DOWN, calculate); private function c...

C# KeyEvent doesn't log the enter/return key

Hey all, I've been making this login form in C# and I wanted to 'submit' all the data as soon as the user either clicks on submit or presses the enter/return key. I've been testing a bit with KeyEvents but nothing so far worked. void tbPassword_KeyPress(object sender, KeyPressEventArgs e) { MessageBox.Show(e.KeyChar.ToString()); }...