Questions tagged [keyevent]

An event that is triggered when a key is pressed,released or remains pressed on a keyboard input device.

A KeyEvent is an event that is triggered when a key is pressed, released or remains pressed on a keyboard input device. The event can contain:

  • info about particular key that was pressed/released
  • how long the key was pressed
  • whether any modifier keys were also pressed (such as Ctrl or Alt).
  • type of event - press, release, other (for example character was typed, regardless whether key was pressed or released)

Some platforms/keyboards may generate auto-repeat key events - same character is typed repeatedly while key remain pressed

1258 questions
19
votes
3 answers

KeyTypedEvent KeyEvent's KeyCode is always 0?

I have a Java Swing application in the NetBeans IDE. I made a form and attached a KeyListener to my various controls as such: jButton1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { …
Rhs
  • 3,188
  • 12
  • 46
  • 84
16
votes
2 answers

Start video chat without user interaction - Android

I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation. I found this: Uri imUri = new…
Steven Leimberg
  • 785
  • 1
  • 4
  • 18
14
votes
5 answers

Read Keyboard events in Android WebView

I'm trying to listen to key events in android web view. Example when user is filling a form, I should receive the key events. This is my WebView code public class MyWebView extends WebView implements OnKeyListener { ..... @Override …
PC.
  • 6,870
  • 5
  • 36
  • 71
13
votes
5 answers

Java Keyboard Keycodes list

Can anybody provide me with the Key Code integer list for individual keys used on the Keyboard for the KeyEvent class in java? I want to create a dropdown list of all the keyboard keys for the user to select. I need the list specific to Keyboard.…
Abdud Dayan Adeeb
  • 579
  • 1
  • 4
  • 13
12
votes
2 answers

What triggers (or generates) KeyEvent.ACTION_MULTIPLE?

The documentation for KeyEvent.ACTION_MULTIPLE says: "multiple duplicate key events have occurred in a row, or a complex string is being delivered. If the key code is not {#link KEYCODE_UNKNOWN then the {#link getRepeatCount() method returns…
ih8ie8
  • 944
  • 8
  • 23
12
votes
8 answers

How to force "enter key" to act as "tab key" using javascript?

I'm working on a site that is full of forms to be filled and I it's required that when escape button is pressed focus move to the next input control, just as pressing "tab" do. I found code to move focus when keypressed is 13 but this need to take…
Heba Gomaah
  • 1,145
  • 4
  • 11
  • 16
11
votes
4 answers

How to make browser full screen using F11 key event through JavaScript

I want to make my browser full screen. Same as when we do F11 key event. I found some examples such as function maxwin() { var wscript = new ActiveXObject("WScript.Shell"); if (wscript!=null) { wscript.SendKeys("{F11}"); …
Delmond
  • 119
  • 1
  • 1
  • 3
10
votes
4 answers

Why trigger F11 press event doesn't work?

I just read this question: Full Screen Page by pressing button instead of F11 The op asked to replace F11 with other hot keys, so I'm wondering that maybe I can simulate press F11 to get things work. I learned that I can use trigger in JQuery to…
wong2
  • 34,358
  • 48
  • 134
  • 179
10
votes
3 answers

Capturing Key Press Event in my WPF Application which do not have focus

I have developed an On Screen Keyboard in WPF. I need to capture the key press event (via Key Board) in order to keep a track of Caps Lock, Shift etc (whether they are pressed). Please note that my application loses focus when any other…
Kishor
  • 101
  • 1
  • 1
  • 4
10
votes
4 answers

Intercepting Tab key press to manage focus switching manually

I want to intercept Tab key press in my main window to prevent Qt from switching focus. Here's what I've tried so far: bool CMainWindow::event(QEvent * e) { if (e && e->type() == QEvent::KeyPress) { QKeyEvent * keyEvent =…
Violet Giraffe
  • 32,368
  • 48
  • 194
  • 335
10
votes
1 answer

How can I perfectly simulate KeyEvents?

How can I construct my own KeyEvent objects which perfectly (or very closely) match the ones I would receive from a KeyListener when the end-user types something? For example, I have a United Kingdom ISO keyboard layout and to type the " character…
Phil K
  • 4,939
  • 6
  • 31
  • 56
10
votes
2 answers

How can I capture mouseevents and keyevents using python in background on linux

I'd like to make a python script that can run in the background but print text when a mouseevent or keyevent happens. Are there any libraries/builtin functionality to achieve this? Or any system commands I can call to get this info? Being root is no…
jett
  • 1,276
  • 2
  • 14
  • 34
10
votes
3 answers

emulate media key press on Mac

Is there a way to emulate key presses of the media keys (volume up/down, play, pause, prev, next) on common Apple notebooks? How?
Albert
  • 65,406
  • 61
  • 242
  • 386
9
votes
2 answers

KeyUp from Javascript on Blackberry

I am currently developing a web page designed for browsers and mobile devices and am having trouble with blackberry's The functionality I want is to trigger a popup when a key is pressed. My current code works in browser, but not on the blackberry.…
Ty Rozak
  • 471
  • 6
  • 19
9
votes
1 answer

Detecting keydown/up events during HTML5 native drag

I've an element that can be dragged using native HTML5. It has dragstart, drag, and dragend event listeners assigned to it. In addition, I also have keydown and keyup event listeners assigned to document.body element. When dragging the draggable…
woran
  • 1,317
  • 2
  • 16
  • 22
1
2
3
83 84