onkeydown Questions

3

I'm trying to receive key strokes in a Window (Not a Form). I receive event, until a button is pressed. After that no matter what I do, the key down event doesn't fire anymore. Is there any solutio...
Monumental asked 3/4, 2012 at 10:11

1

The issue I am running into is I have a React App with a form with Input elements that I have a need to detect if the Enter Key or , has been pressed. It is working fine on desktop chrome but Andro...
Doornail asked 25/10, 2020 at 15:5

2

I am using the react-select vserion 2 component. I want to be able to trigger the OnKeyDown event when someone presses the backspace key. Does anyone know how to do this?
Individual asked 25/9, 2018 at 6:49

31

Solved

I have one text input and one button (see below). How can I use JavaScript to trigger the button's click event when the Enter key is pressed inside the text box? There is already a different submi...
Pitts asked 30/9, 2008 at 21:32

2

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:ke...
Nitrous asked 27/4, 2022 at 14:43

6

Solved

I am using the direct following and I do not detect the copy and paste with the keys inside the input, would someone know how? Thank you! export class OnlyNumberDirective { // Allow decimal numbe...
Exorcism asked 19/4, 2018 at 12:3

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

2

Solved

When I press one of the volume hardware buttons, Android's system is shown a depicted. Naturally this also happens when I press whithin my app. Is it possible to configure the style of these Androi...
Fictitious asked 27/10, 2020 at 10:4

2

Solved

Is it possible to trigger my "Add" button by pressing enter on the keyboard? //// This is the last div in the form, for the third gap: <div fd-form-item *ngIf="targetType.value ...
Purdum asked 27/7, 2020 at 7:58

2

Solved

I have the beginnings of a 2d Javascript game - at the moment the player can drive a triangle around the screen using the arrow keys. The problem is that sometimes the triangle will get stuck rota...
Liver asked 27/6, 2012 at 12:0

6

Solved

I don't understand why this piece of code is not working. Only backspace and return key are detected. Listener doesn't fire for any other key. My device is Nexus One. I tried to override activity'...
Minoan asked 26/11, 2010 at 2:47

6

Solved

I have Fragment activity with pager: List<Fragment> fragments = new Vector<Fragment>(); fragments.add(Fragment.instantiate(this, PastEventListFragment.class.getName(),bundle)); fragm...
Christachristabel asked 31/8, 2012 at 7:41

3

Solved

I am working on a Silverlight web app. It interacts with a module that sends SMS's. I want to limit the text to 160 and show a counter. I did it like this: public partial class SendSMSView { publi...
Wilbanks asked 27/10, 2011 at 14:25

2

What I'm basically trying to achieve is custom global hot keys or in other words 'things will happen when I push certain buttons no matter which program is currently on top'. I assume a service is ...
Viradis asked 11/8, 2010 at 1:36

5

Solved

I have a function that is triggered by the onkeydown event of a textbox. How can I tell if the user has hit either the backspace key or the del key?
Starnes asked 1/3, 2010 at 2:18

3

Solved

<html> <head> <title>Test</title> <script type="text/javascript"> function showChar(e) { if (e.keyCode != 16) { alert( "keyCode: " + e.keyCode + "\n" + "SHIFT ke...
Pisci asked 26/6, 2010 at 22:39

3

Can I keep Android activity alive in background, until user doesn't kill or close the application. I want to detect user clicks in background some specific hardware button clicks, as onKeyDown is ...
Imprison asked 18/5, 2017 at 5:58

3

Solved

I have an AutoCompleteTextView I use to select an item from a long list. The user should only be able to select a predetermined item from the list. They should not be able to enter their own item. ...

2

Solved

I've just upgraded my app to use the newly released v22.1.0 AppCompat and now onKeyDown and onKeyUp are not triggered when menu key is pressed. The other keys correctly trigger onKeyDown and onKeyU...
Snipes asked 24/4, 2015 at 16:4

2

Solved

Arun Singh gave a great answer to a similar question (Is there any event that fires when keys are pressed when editing a cell?). I want to set a flag to prevent execution of Selection_Change event ...
Lajoie asked 30/1, 2014 at 10:21

3

Solved

I am trying to capture app switch key and home key on android 3.1 and 4.0 but it doesn't seem like its working. here is what I am doing @Override public boolean onKeyDown(int keyCode, KeyEvent ev...
Chippy asked 20/12, 2011 at 17:59

2

In my activity the action bar shows only the left arrow and the title of the activity. When I press the left arrow the activity goes back to the previous activity, but no event is registered in th...
Mayonnaise asked 6/8, 2015 at 23:15

3

Doing a simple override in my base activity of onKeyDown, I'm able to capture all key presses except those of the enter and dpad center buttons (as determined via breakpoint). I've no clue as to wh...
Rubble asked 20/7, 2012 at 0:1

3

Solved

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...
Overexcite asked 13/8, 2010 at 10:29

3

I'm making a primitive game with Javascipt for fun. I have set up functions to move my character around when the arrow keys are pressed as follows: document.getElementById("character").style.top =...
Pryor asked 18/3, 2015 at 9:50

© 2022 - 2024 — McMap. All rights reserved.