Questions tagged [onkeydown]

This event is triggered when when the user is pressing a key or holding down a key.

520 questions
10
votes
2 answers

on:keydown event with Enter Key in svelte

I am using svelte with an on:click event on a button. When this button is clicked, I dispatch some information to a higher component. What I would like to do is hit the enter key instead, but on:keydown doesn't seem to work? How can I get this to…
lache
  • 608
  • 2
  • 12
  • 29
10
votes
3 answers

JavaScript key handling and browser compatibility

I'm working on key handling in Javascript. I have done some research and I'd like to know whether I have a correct understanding of key handling. KeyDown/KeyUp Event The key down and key up events are supported by IE7+ and Firefox 3.5+ I didn't…
user338195
9
votes
1 answer

Minimize activity on back key press

OnBack Key press i want to minimize the application, How can i do this??? public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { //Here i want to put minimize code.. pls give me this…
Sandeep Kumar P K
  • 7,412
  • 6
  • 36
  • 40
9
votes
1 answer

Javascript: Keydown Event: "Up" arrow key preventing further arrow-key Keydown events? (answered: keyboard ghosting)

I've found a lot of related questions (here and elsewhere), but haven't found this one specifically. I'm trying to listen for keydown events for the arrow keys (37-40), however when using the arrow keys in a certain order, subsequent arrow do not…
8
votes
3 answers

How to disable facebook hotkeys with Chrome extension?

I have created a Chrome extension that uses the hotkeys [Alt]+[0...9] only to discover facebook uses the same hotkeys. Is there any way possible my extension could disable facebook's hotkeys so that mine fire alone? I'm fairly certain I have…
flea whale
  • 1,783
  • 3
  • 25
  • 38
8
votes
1 answer

Soft keyboard without an EditText & detecting key presses

How can I detect key presses reliably with a hard or soft keyboard? My app remotely controls another device over wifi, and I need to detect every key press on either a soft or hard keyboard. I don't really need an EditText because I just need to…
Gregg Reno
  • 441
  • 4
  • 15
8
votes
3 answers

How to differentiate capital letters from lower ones in onkeydown event handler method

Test