"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".
Questions tagged [keydown]
1434 questions
-1
votes
3 answers
What are the keycodes returned by the .KeyDown event for UK keyboards?
Is there a list of the keycodes returned by VB.NET and C# in the .KeyDown event?
The values returned don't match the usual ASCII codes.

David Wilson
- 4,369
- 3
- 18
- 31
-1
votes
1 answer
How do I fix this 'no overload for pictureBox_1 matches delegate 'System.Event.Handler''
I have been trying to teach myself c# through tutorials and this website and I didn't know how to make my "character" move using the arrow keys so I copied code from here hoping it would work and everything is fine until I run and then it throws me…

Russ Perlow
- 7
- 1
- 5
-1
votes
1 answer
how to fire a keydown or keypress event
I want key press event fire without pressing a key by user.
so I use
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_U);
also
System.Windows.Forms.SendKeys.Send("a");
that did not cause it
so I use
var key = Key.Insert; …

user3567615
- 31
- 1
- 5
-1
votes
1 answer
Change Label text to what is written, when ListView as active object
When I click on my ListView and write "this text!", I want my Label (or TextBox if that's easier) to change text to "this text!".
How can I do this?

spunit
- 523
- 2
- 6
- 23
-1
votes
1 answer
KeyDown event handler is not working
I am developing an app for Windows 8.1
am using XAML + C#
I read the article this article in MSDN for Responding to keyboard interaction
I did as they say , but the problem is that the event occurs only when i press a key inside a TextBox
but i want…

GabourX
- 283
- 2
- 5
- 14
-1
votes
1 answer
keyup keydown jquery handling
Im struggeling with the event listener for keys is jquery.
My problem is that it only fires when i let go of each key i pressed before.
As example:
Im often working with cmd+left to select my text and i still hold down cmd to copy it.
But the text…

ceed
- 689
- 1
- 6
- 15
-1
votes
1 answer
Disable a form's KeyDown after timer.stop()
I just created a letter game. While the timer is on it prints letters to a listbox.
The user must press the correct key. If he does, a label with the mumber of correct presses is updated. If not, a missed label is updated. In both cases, the Total…

Andreas777
- 377
- 1
- 3
- 14
-1
votes
2 answers
Toggle pause with key in HTML5 game
I want to make a function for a html5 game to pause and unpause with the keyboard key p. I can get the game to pause while pressing p, but not to unpause while pressing p again. What am I doing wrong here?
document.addEventListener('keydown',…

Justin
- 73
- 1
- 12
-1
votes
1 answer
Can someone help me with this hotkey script?
Okay so i wanted to make a script that when the hotkey is pressed it moves your mouse down a few pixels.
I've tried to do it myself but i just don't understand it.
It can be a script or program
thanks,

user3576529
- 3
- 1
-1
votes
1 answer
Keydown Eventhandler Process
I am trying to process to keydown event but the below code is process only first char of string and not able to remove second char of string.
private void Game_KeyDown(object sender, KeyEventArgs e)
{
…

Ram Kumar
- 23
- 1
- 4
-1
votes
3 answers
KeyDown KeyEventArgs won't work
I am trying to include HotKeys in my program but I don't know how to execute this code:
private void Form_KeyDown(object data, KeyEventArgs e)
{
if (e.KeyCode == Keys.Insert)
{
timer1.Stop();
}
}

user3002135
- 237
- 1
- 4
- 15
-1
votes
2 answers
An error in key Down function
I am working with c# windows application and i need to enter some record to database after inserting in to textbox. I have tried this code
private void textBoxItemCode_KeyDown(object sender, EventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
…

Moz
- 39
- 3
- 11
-1
votes
2 answers
Form1_KeyDown calling button1_Click
I have such piece of code:
private void button1_Click(object sender, EventArgs e) {
// Do something...
}
private void Form1_KeyDown(object sender, KeyEventArgs e) {
if (e.KeyData == Keys.A) {
// Call…

nhtrnm
- 1,411
- 3
- 15
- 24
-1
votes
1 answer
bind mousewheel and keydown in jquery
I got these code, which should react on mousewheel and keydown:
$('#wellcome-box').bind('mousewheel, keydown', function(event){
console.log(event);
if(event.which.keyCode == 40){
alert();
}
else
{
…

weird-dreams
- 159
- 2
- 16
-1
votes
2 answers
AttributeError: 'int' object has no attribute 'KEYDOWN'
I'm relatively new to python and I've been having a go messing pith PyGame.. To me, this code looks fine:
import pygame
class Game(object):
def main(self, screen):
image = pygame.image.load("images\player.png")
while 1:
…

Jonathon Quick
- 29
- 1
- 3