Questions tagged [keydown]

"keydown" is an event used in writing software that is triggered when a key on the keyboard is being pressed. It usually precedes the event "keyup".

1434 questions
-2
votes
1 answer

javascript keyboard functions

How can i make a function that when i press down for example "A" key on my keyboard it pushes down On and sends out signal for nupp('/TS'). Also on "A" key relase it should top sending the signal for nupp('/TS').
in2d
  • 544
  • 9
  • 19
-2
votes
1 answer

IsLetter on DataGrid KeyDown Event

I am attempting to break down user input onto a KeyDown event on a DataGrid by working out whether their input is a letter or a number. This is the method I am using so far; private void OnDataGridKeyDown(object sender, KeyEventArgs e) { if…
CBreeze
  • 2,925
  • 4
  • 38
  • 93
-2
votes
1 answer

how can i repeat a code that i write in a form key down event each time i press that key

in c# how can i repeat a code that i write in a form key down event each time i press that key i mean i want to re run that code each time i press the key i think this can be so simple for u cause i am beginner thanks this code is what i already…
-2
votes
2 answers

input only allow english and non-english character javascript?

How can I make input box for name only allow both E and non-E character, not special character on keydown event. For example: Accept: a â è ㅎ 啊 Deny: . \ | } ) # + And also I don't know why: '.'.charCodeAt(0) = 46 (chrome console) In my keydown…
chiquyet
  • 527
  • 4
  • 14
-2
votes
4 answers

keyDown doesn't work swift

That's my code: override func keyDown(theEvent: NSEvent) { super.keyDown(theEvent) switch theEvent.character { case NSLeftArrowFunctionKey: println(1) case NSRightArrowFunctionKey: println(2) case…
pomo_mondreganto
  • 2,028
  • 2
  • 28
  • 56
-2
votes
1 answer

C# Form Keydown

I got the following problem Code: void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { byte[] outStream = System.Text.Encoding.ASCII.GetBytes(textBox1.Text + "$"); …
-2
votes
2 answers

Detect which key is pressed

How do I tell which key was pressed in a Cocoa Application (I know each key has an associated number)? In my case, I want to log the key to the console. This is my code: - (BOOL)acceptsFirstResponder { return YES; } -(void)keyUp:(NSEvent*)event…
Viper OS X
  • 291
  • 1
  • 5
  • 14
-3
votes
2 answers

Is it possible to have a key "Start" and then "Stop" a function?

I want to achieve the following: I press and release the C key, and the letter C is typed, as normal. But instead, I want to press and release the C key, and have CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.. typed continuously until I press…
Willicious
  • 13
  • 2
-3
votes
2 answers

How to check letter by letter using addEventListener 'keydown'?

I'm trying to check if is true or false the letter I typed. for exemplo, I have one String that I caught from a array doing join(' '): "problem test javascript css pc" My current code: document.addEventListener('keydown', (event) => { let count =…
SantGT5
  • 53
  • 4
-3
votes
1 answer

KeyPress or keyup not firing

ok i have a c# 2017 net net windows form frmFS the KeyPress, KeyDown or Keyup are not firing. I created a new project with select the events for keypress, keydown and keyup (put a messageboc.show("bla") in each function it works but my current…
Lee Hopkins
  • 135
  • 1
  • 11
-3
votes
1 answer

I want to know how many time I using "backspace" on VB.NET

In this RichTextBox I want to know how many times is used the "Backspace" key on keyboard. So far I have already used this code, but something is wrong. This is the scenario: when pressing Enter, a MessageBox will show how many times has the…
Esang
  • 1
  • 1
-3
votes
3 answers

c# Measuring interval between keyboard keydown and keyup?

I want to measure time (seconds) when a user presses the right arrow key on the keyboard and pick it up. I have researched about this and find some page but there is not a good answer. How can I measure this time? my code I define a List in top of…
saedbfd
  • 39
  • 2
  • 9
-3
votes
1 answer

Pygame drawings only appear once I exit window

I've created a rect, using Pygame display but it only appears in the Pygame window when I exit the window. Have I done something wrong with my game loop? I'm trying to set keydown events but it's not registering in the game loop. Maybe it's…
-3
votes
1 answer

How can I respond to a keyboard chord and replace the entered alpha key with a special one?

I want to, in a textbox on a WinForms app using C#, replace certain keyboard chords with special characters. For example, if the user enters "Ctrl+A", I want to insert into the textbox the character "á"; if the user enters "Ctrl+Shift+A", I want to…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
-3
votes
1 answer

Start thread with keydown and stop it by releasing it (keyup)?

So im trying to operate threads with key events, I managed to make them start by hitting key E and R( two thread), but i can't stop them by realeasing keys, keyup event doesnt work for some reason... (after starting, stopping i would like to restart…
Aron_t
  • 13
  • 4
1 2 3
95
96