The event that happens when a key on the keyboard gets lifted up after pressing it.
Questions tagged [keyup]
770 questions
53
votes
5 answers
Execute JS code after pressing the spacebar
this is my code in JavaScript:
var changeIdValue = function(id, value) {
document.getElementById(id).style.height = value;
};
document.getElementById ("balklongwaarde").addEventListener("click", function(){ changeIdValue("balklongwaarde",…

Melissa
- 719
- 1
- 6
- 16
49
votes
3 answers
What's the theory behind jQuery keypress, keydown, keyup black magic (on Macs)?
I am confused about the various behaviors of keypress, keydown, and keyup. It seems that I have missed an important piece of documentation, one that explains the subtleties and nuances of this trio. Could someone help me to figure out which document…

SaganRitual
- 3,143
- 2
- 24
- 40
24
votes
2 answers
jQuery - on text change while user typing or paste
I'm new to jQuery and I've tried to make something but I failed so here is my problem
when the user type it works but when the user paste something didn't work !!
$(document).ready(function(){
$('#username').keyup(username_check);
});
the…

Max Zag
- 249
- 1
- 2
- 5
21
votes
4 answers
jQuery: keyup event for mobile device
I'm having a few issues getting a keyup event to fire on my iPhone, my code is as follows:
var passwordArray = ["word", "test", "hello", "another", "here"];
var test = document.getElementById('enter-password');
…

user1374796
- 1,544
- 13
- 46
- 76
17
votes
8 answers
jquery keyup function check if number
i am trying to create an input field where the user can only type in numbers. this function is already working almost fine for me:
$('#p_first').keyup(function(event){
if(isNaN(String.fromCharCode(event.which))){
var…

Adam Sam
- 223
- 1
- 2
- 11
15
votes
1 answer
NSResponder not receiving keyUp event when Cmd ⌘ key held down
I'm using a custom subclass of NSView and receiving keyboard events through the keyDown/keyUp methods, everything works fine except when the "Cmd ⌘" key is pressed, keyDown events are fired as normal but the keyUp event never comes.
In our case we…

Jez Cooke
- 151
- 4
14
votes
2 answers
Bind on(keyup) to dynamic elements in jQuery (Twitter Bootstrap + typehead)
I guess some of you must have frowned eyebrows reading this title eh ? I'm sure people asks this every time, yet, I haven't seen my particular question around so, I'm trying ! Binding events to dynamically created elements is my kryptonite, I just…

Jean-Philippe Murray
- 1,208
- 2
- 12
- 34
14
votes
2 answers
UnsupportedOperationException: Tried to obtain display from a Context not associated with one
I'm getting UnsupportedOperationException crash on live app. All the crashes are associated with Moto Android 11 devices. Can see that it's somehow related to onKeyUp. But still no clue how to reproduce or fix this.
Any help would be…

Shahal
- 1,008
- 1
- 11
- 29
13
votes
2 answers
keydown + keyup events for specific keys
I'm trying to make the background color change when certain keys are held down. For example, when the 'r' key is being held down, the background should be red. When the 'r' key is not being pressed anymore, the background should default to…
user1115666
12
votes
3 answers
Angular2 keyup event update ngModel cursor position jumps to end
I am having an issue with an Angular2 directive that should do the following:
Detect if the user enters '.' character.
If the next char is also '.', remove the duplicate '.' and move the cursor position to after the '.' char
I have the above…

conor
- 883
- 5
- 14
- 25
10
votes
3 answers
iOS 9 - keyup event not firing
Is anybody else having problems with the keyup event in iOS 9 not firing?
Just a simple test bed replicates the issue for me.
Vanilla JS:
document.getElementById('txtInput').onkeyup = function () {
console.log('keyup…

keldar
- 6,152
- 10
- 52
- 82
9
votes
2 answers
Want to limit korean and chinese
I need to limit input box content based on lang. enter.
For example:-
If a string with Korean characters is input, then the number of permitted characters is 8.
If a string with Chinese characters is input, the number of permitted characters is…

user2981812
- 101
- 1
- 4
9
votes
2 answers
Jquery keyup not working on Android
i didn't tested this code on iPhone but i'm sure (tested) it doesn't works on android mobiles:
$('#search').live('keyup',function(key){
if(key.which == 13){
/*ANIMATE SEARCH*/
_key = $(this).val();
…

itsme
- 48,972
- 96
- 224
- 345
8
votes
3 answers
How to check for spacebar key event via angular?
I have an angular template that uses this syntax within:
(click)="dosomething()"
that works fine. I now need to have that same event fire on return or spacebar. I added this for return:
(keyup.return)="dosomething()"
that also works fine.
Got to…

DA.
- 39,848
- 49
- 150
- 213
8
votes
1 answer
C# Window_KeyUp() not working
Hey I have this piece of code:
private void Window_KeyUp(object sender, KeyEventArgs e)
{
if (playing == false)
{
return;
}
if (e.KeyCode == Keys.D1)
{
pictureBox6.Image =…

Joscplan
- 1,024
- 2
- 15
- 35