keycode

Translate Applescrip [key code 125 using command down] to appscript

Hi, how to translate the following Applescript to appscript: tell application "System Events" key code 0 using command down end tell I want to perform "Command + A"-like short cut, i.e., select all texts. ...

TabActivity and onKeyDown

I have created games with 3 tabs and one of the tab is the game using the onKeyDown (KEYCODE_DPAD_LEFT and KEYCODE_DPAD_RIGHT) to control the game. It is working fine if there is no tab. But now with the tab, the KEYCODE_DPAD_LEFT and KEYCODE_DPAD_RIGHT are actually controlling the tab movement instead of the game. May I know how to let...

conditional check for focus is in textarea or input field

$('body').keyup(function(e) { var code = e.keyCode ? e.keyCode : e.which; switch(code) { case 8: alert('blah'); break; } }); When a user hits backspace, I want the alert to pop up UNLESS the cursor is positioned within a textearea, input, etc. Any ideas on how to do this? ...

Built-in function for converting between unicode characters and virtual keycodes in Cocoa?

Is there a way to convert a unicode character to a Mac virtual keycode? (without building my own table?) It looks like on Windows there is VkKeyScanEx, but I'm not aware of a similar function for Cocoa on OS X. I'm actually trying to do this for the iPad. I want to convert character taken from the keyboard and convert them into key code...

jQuery event.keyCode 0 when Swedish keys å, ä and ö are pressed

Hi! I have an html form with a lot of text fields that all take only one character (think crossword puzzle). When a letter is entered in an input field, I use jQuery to jump to the next one. This works fine, except for the Swedish characters åäö (other international characters are probably affected too). I bind an event listener to the...

Javascript: different keyCodes on different browsers?

So I've seen some forums posts about different browsers reporting differenct keyCodes, but everyone seems so avoid the "why?". I was trying to capture the colon (:) keyCode and realized that Firefox reports back e.keyCode 56. While Chrome reports back 186 (I think that's what it was). Is there a univeral way of getting the right keyCo...

How to know if .keyup() is a character key (jQuery)

How to know if .keyup() is a character key (jQuery) $("input").keyup(function() { if (key is a character) { //such as a b A b c 5 3 2 $ # ^ ! ^ * # ...etc not enter key or shift or Esc or space ...etc /* Do stuff */ } }); ...

How to convert keycode to character using javascript

How to convert keycode to character using javascript var key_code = 65; result should be character = "a"; ...

Android - Listen for key presses on Numeric keypad?

I use the following code to listen for the key presses of 0 - 9 from the soft input keyboard on Android: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_0) { return super.onKeyDown(keyCode, event); } if(keyCode =...

Jquery: detect if middle or right mouse button is clicked, if so, do this:

Check out my jsfiddle demo, if e.which == 1 then when you left click the h2 it will e.which == 2 or e.which == 3 then it wont work. 2 is the middle mouse button, and 3 is the right mouse button. i found this too: JQuery provides an e.which attribute, returning 1, 2, 3 for left, middle, and right click respectively. So you could also us...