Linked Questions
83 questions linked to/from jQuery Event Keypress: Which key was pressed?
7
votes
1
answer
9k
views
Detecting Command + C keypress [duplicate]
Is there a way to with jQuery keyCode to detect Command + C? The keycode only sends one key, not the pressed combo. I'm looking to setup a binding to detect Command + C. I've seen some keyboard ...
7
votes
1
answer
17k
views
Determine if a Letter or a number was pressed - Javascript [duplicate]
So I know that we can find if a key was pressed, and we can know which key was pressed by using javascript.
To determine if a key was down or pressed we can just use jQuery
$( "#some id" ).keydown(...
5
votes
4
answers
11k
views
HTML Form - Execute script when pressing 'Enter', without submitting [duplicate]
Possible Duplicate:
jQuery Event Keypress: Which key was pressed?
OK, here's my situation (I've solved this issue in the past, but since I'm not sure my approach was the best, I'm all ears for ...
0
votes
1
answer
3k
views
jQuery on keypress trigger button [duplicate]
I have two buttons:
$('#prev').click(function() {
// some code
});
$('#next').click(function() {
// some other code
});
what I now want to do is adding a .keypress() handler to the site which ...
0
votes
1
answer
6k
views
How to add arrow key navigation in addition to existing navigation on website code (similar to picture navigation on facebook) [duplicate]
Possible Duplicate:
jQuery Event Keypress: Which key was pressed?
I am trying to add arrow key navigation to my website code and having some problems. I don't think this can be done with html.....
0
votes
2
answers
2k
views
How do I target the enter key event? [duplicate]
I have the following code that works on all keys except enter, shift etc.
$(document).ready(function(){
$('input[name="tmp_post_tag"]').keypress(function(evt){
alert("hello");
});
});
Why won't ...
-6
votes
1
answer
1k
views
How do I use JavaScript to respond to a key press? [duplicate]
I'm sorry if this is a general question but what block of code should I use to make javascript or html respond to a key press or key event? Any way to do it is ok but I just want to make my website ...
-1
votes
3
answers
196
views
How to fire alert once for each new space found in text String? [duplicate]
Possible Duplicate:
jQuery Event Keypress: Which key was pressed?
I'm using below code to fire an alert every time a new space char is encountered as a user types into a text box.
This works until ...
204
votes
15
answers
478k
views
Jquery: how to trigger click event on pressing enter key
I need to execute a button click event upon pressing key enter.
As it is at the moment the event is not firing.
Please Help me with the syntax if possible.
$(document).on("click", "input[name='...
231
votes
10
answers
452k
views
Trigger a keypress/keydown/keyup event in JS/jQuery?
What is the best way to simulate a user entering text in a text input box in JS and/or jQuery?
I don't want to actually put text in the input box, I just want to trigger all the event handlers that ...
90
votes
12
answers
74k
views
keyCode on android is always 229
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="true&...
57
votes
8
answers
124k
views
How to detect when the user presses Enter in an input field
I only have 1 input field and I want to register onChange and onKeyPress event to detect when the users finish their input or press the Enter key. I need to use javascript only. Thanks for the help.
...
47
votes
7
answers
78k
views
How can I convert a char to its keycode?
How can I convert a character to its respective keycode?
For example:
a to 65
b to 66
c to 67
d to 68
50
votes
3
answers
58k
views
jQuery key code for command key
I have read jQuery Event Keypress: Which key was pressed? and How can i check if key is pressed during click event with jquery?
However my question is if you can get the same key event for all ...
37
votes
4
answers
50k
views
event.keyCode constants
When testing JavaScript in Firefox 3.5, I have access to constants such as KeyEvent.DOM_VK_D, but not in Google Chrome.
Is there a cross-browser way of accessing these constants?