keycode

C# How to translate virtual keycode to char?

I am trying to map a virtual keycode to a char. My code uses ProcessCmdKey to listen to WM_KEYDOWN which gives me access to the key pressed. For example, when I press single quote I get a key of 222 which I want to have it mapped to keychar 39 which represents... you guessed it... single quote. My dev context is: - .net Framework 2.0 -...

How to obtain the keycodes in Python

I have to know what key is pressed, but not need the code of the Character, i want to know when someone press the 'A' key even if the key obtained is 'a' or 'A', and so with all other keys. I can't use PyGame or any other library (including Tkinter). Only Python Standard Library. And this have to be done in a terminal, not a graphical i...

Sending keycode to Xorg + wine with bash script

How do I send keycode to currently running application in linux which is running under wine? I would like the it to be under bash for simplicity. ...

How do you determine if a character requires the shift key to be down to be typed?

I am writing some code to type strings using the Robot class. Everything is mostly good (well, I have to use a big switch statement to get character keycodes), except some keys don't have keycodes, because they are actually a combination of SHIFT + some other key. For upper case letters, it is easy to check, using Character.isUpperCase...

jquery keypress event to trigger autocomplete only on specific keycodes

I am using the jquery autocomplete plugin, and am trying to trigger the autocomplete manually based on certain keys the user enters. I'm trying to bind the autocomplete to the input on the fly so the autocomplete can start looking for matches once a user enters a certain key to trigger "I'm now entering data to be searched on", which cou...

Replacing regular expression with keycode data

Public ReadOnly Property IsAlphaNumeric(ByVal entry As String) As Boolean Get Return New Regex("(?!^[0-9]*$)(?!^[a-zα-ωA-ZΑ-Ω]*$)^([a-zα-ωA-ZΑ-Ω0-9]{6,15})$", RegexOptions.IgnoreCase).IsMatch(entry) End Get End Property This one is pretty good for Greek and English language. What about all the other languages in the universe? S...

how to provide platform independent keycodes

how do cross platform frameworks like sdl or java provide platform independed keycodes. do they have mapping tables for all possible cases? or is there another (eventually better) way to achieve this. i need this because i am working on an open source framework for (continuous) dynamic keystroke authentication. i have clients int the fo...

Make enter key behave like tab key in Javascript

So far i have this being called on keypress. function chkenter() { e = event.keyCode; if (e == 13) { event.keyCode = 9; return false; } } but even though i set the keycode to 9 it doesn't tab over to the next control. How can i accomplish this? I'm working in Asp Classic. What I ultimately want is for the focus to m...

Where can I find a list of keyboard keycodes?

Is there a place where I can find all the keycodes for keys on a keyboard? (For example, the key up may be #114) I can't seem to find one no matter what I search :( Thanks! ...

get keyCode from string?

Using a static method in as3, I can get a charCode from a character in a string. How can I get the keyCode from a character in a string? Do I need to run this function through javascript (if I can do this in Javascript...) ...

VB.NET 2008 - How Do I Make Button.click Event Perform both the enter and period(del) keys on the numerical keyboard?

How Do I Make Button.click Event Perform both the enter and period(del) keys on the numeric keypad? Code snippet: Private Sub frmCalc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown Select Case e.KeyCode Case Keys.NumPad0 btn0.PerformClick() Case Keys.Num...

Setting three button accelerator key hot keys in Java (OSX)

I am trying to change a few hot-keys in the java application I am wokring on and it seems that the system I am using may not work with three button key combinations. We currently have a JMenuItem item and we set the hotkey with a call like this: menuItem.setAccelerator(getAcceleratorKey(accelerator)); And here is the getAcceleratorKe...

Get Character value from KeyCode in Javascript...then trim.

This is what i have now: $("input").bind("keydown",function(e){ var value = this.value + String.fromCharCode(e.keyCode); } If the e.keyCode may not be an ASCII character (alt, backspace, del, arrows, etc)... I would now need to "trim" these values from "value" somehow (preferably programmatically - not with lookup tables) I'm us...

KeyCode and keyboard layout and language

I need to include the asterisk as an allowable entry on a text box. How can I test for this key under the KeyDown event regardless of the keyboard layout and language? Ignoring the numeric keypad, with the Portuguese QWERTY layout this key can be tested through Keys.Shift | Keys.Oemplus. But that will not be the case for other layouts...

javascript subtract(-) keycode

ok, i need my code to check if minus/subtract/- was pressed, if it was pressed i want an alert box to pop. i tried with both 109 and 189 key codes but i still don't get the desired result. although i press "-" i don't get that alert box ...

How to convert ASCII character to CGKeyCode?

I need a function that, given a character, returns the CGKeyCode associated with the position of that character on the current keyboard layout. E.g., given "b", it should return kVK_ANSI_B if using U.S. QWERTY, or 45 if using Dvorak. The Win32 API has the function VkKeyScan() for this purpose; X11 has the function XStringToKeySym(). Is t...

Keycode for @ char

could someone please tell me the identifier for the @ key? for example keys.Escape is for the ESC key. i would like to know what it is for @ thank you. ...

char to keycode in python

Hello, I want to be able to translate a string to keycode to write it with Xlib (to simulate user action on linux). The keycode are not the ascii but the code you get when you do use xev on linuxKeyPress event, serial 33, synthetic NO, window 0x6400001, root 0x13c, subw 0x0, time 51212100, (259,9), root:(262,81), state 0x0, ke...

How can I check the new value of a text field on keypress?

I have a single form field and I need to be able to detect when the field changes and execute some additional code using the new value of the field. I only want to execute the code if the key pushed actually changes the value of the text box. Here's the solution I came up with. function onkeypress(e) { var value = this.value; // do ...

High level global keyboard hook for C# and WPF for reading a keyboard wedge card scanner

The only keyboard hook supported for .NET managed code is a low-level keyboard hook (WH_KEYBOARD_LL). See http://stackoverflow.com/questions/1639331/using-global-keyboard-hook-whkeyboardll-in-wpf-c I have the above code working in my application at the moment so that when you swipe your card you will get a list of all the keystrokes. ...