keyevent Questions

3

Solved

I want to send "CTRL + W" to the Chrome for Android to close active tab. I tried lots of things but there is no success to achieve it from terminal. (If i connect a USB Keyboard with OTG, i can clo...
Camion asked 5/10, 2014 at 16:35

1

I am trying to build logic based on detecting user keyboard events (e.g., when a user presses the backspace in a textfield). This seems to work on my builds for Android devices, but is not working ...
Kilby asked 17/12, 2022 at 4:52

11

Solved

How to detect escape key press in IE, Firefox and Chrome? Below code works in IE and alerts 27, but in Firefox it alerts 0 $('body').keypress(function(e){ alert(e.which); if(e.which == 27){ // C...
Monopoly asked 30/7, 2010 at 7:54

2

I was interested to know how can i catch key/button events from Android TV Box remote controller? For example, i want a popup menu to show when i click the OK button from remote controller. And i ...
Emlyn asked 25/3, 2015 at 9:5

3

Solved

I need to trigger or say dispatchEvent KeyPress inside an Input box, I have tried a lot with "initKeyboardEvent" , "initKeyEvent" , "createEvent", even I found similar question's answers but nothin...
Pubescent asked 25/4, 2016 at 13:27

3

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...
Jamilla asked 16/12, 2010 at 18:58

3

Solved

In Javascript, I have callback function for keydown event. I use keyCode and which properties to detect which keys user pressed. var keyPressed = event.keyCode || event.which; if (keyPressed >...
Additive asked 15/8, 2016 at 12:59

11

On my Samsung Galaxy tab 4 (Android 4.4.2, Chrome: 49.0.2623.105) I ran into a situation where the keyCode is always 229. I've setup a simple test for two situation <div contenteditable="tr...
Dawna asked 20/4, 2016 at 19:37

2

Currently, I am facing a problem on a mobile device. I have an input field where only some keys are allowed to be pressed: e.g. only the numbers 0–9. It works fantastic on a web browser. But when I...
Pantheon asked 13/8, 2015 at 4:38

5

Solved

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 impleme...

8

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...
Mosquito asked 10/5, 2012 at 15:40

6

I'd created EditText with following. <EditText android:id="@+id/et_regis_num" android:maxLines="1" android:layout_width="match_parent" android:layout_height="wrap_content" android:digits=...
Golda asked 28/7, 2016 at 10:32

9

Solved

I am new to Android Studio and I don't get why my toolbar isn't shown as described by https://developer.android.com/training/appbar/setting-up I know there are already some other questions like min...
Callaghan asked 21/8, 2018 at 23:22

5

Solved

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 use...
Messieurs asked 9/3, 2013 at 17:4

5

Solved

I want to turn keyevent keycode value into a string or a char value. Either one would do. For example, when I press 'SPACE', which 'lets say' has a keycode 20, and I want to convert that value to ...
Stratigraphy asked 13/4, 2013 at 19:14

4

Solved

I'd like to run an Android background service that will act as a keylistener from the home screen or when the phone is asleep. Is this possible? From semi-related examples online, I put together t...
Bigener asked 6/6, 2010 at 23:22

20

Solved

I want a jquery solution, I must be close, what needs to be done? $('html').bind('keypress', function(e) { if(e.keyCode == 13) { return e.keyCode = 9; //set event key to tab } }); I can retu...
Pecten asked 25/2, 2010 at 16:16

5

I know how to call 1 using keyevent which should be like aaa.keyPress(KeyEvent.VK_1); Now I need to type (.) dot? But I could not find (KeyEvent.VK_DOT) or some similar command. Please help Thank...
Aqueous asked 5/12, 2011 at 12:0

4

Solved

I'm using KeyListeners in my code (game or otherwise) as the way for my on-screen objects to react to user key input. Here is my code: public class MyGame extends JFrame { static int up = KeyEve...
Voiture asked 30/3, 2014 at 6:57

3

Solved

My project is currently using but seems I have moved to api level 26 - revision 26.0.2, I am struggling to find the symbol KeyEventCompat import android.support.v4.view.KeyEventCompat; I try to ...
Norval asked 30/4, 2018 at 20:31

3

Solved

Is there a way to emulate key presses of the media keys (volume up/down, play, pause, prev, next) on common Apple notebooks? How?
Yadirayaeger asked 15/6, 2012 at 6:43

2

I'm facing a tough one right now, at least it's tough for me! I'm using this code to capture key press events and it works just fine even when the window is out of focus. In addition though, I'd...
Glider asked 24/7, 2018 at 12:4

2

Solved

I don't know how to implement the managing of the escape key to quit the program. I don't know either where to put it in my code, because if I put it in a method, how can it quit anywhere? This is...
Frig asked 11/4, 2016 at 15:4

4

The problem is very simple. I have to simulate the dpad events (UP,DOWN,RIGHT,LEFT,CENTER) for navigate in my GUI that consists of a lot of buttons and other elements. With the simulator D-Pad I ca...
Dispassionate asked 19/12, 2011 at 22:20

2

Solved

private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) { //cant capture my TAB? System.out.print(evt.getKeyChar()); } What is the simplest way in an java gui to capture the tab key...
Seaton asked 25/11, 2011 at 23:53

© 2022 - 2024 — McMap. All rights reserved.