"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
0
votes
4 answers
KeyDown/KeyPress and Indexing
Compelete noob working on my first app in C#. Here is what I am trying to do....
A user is going to enter an "ID" into a text box, all numbers. I have been trying to figure out how to trap a leading zero in the ID, for instance:
5031 is accepteble…

AvacadoRancher
- 135
- 1
- 8
0
votes
3 answers
DataGridView KeyDown appears twice
Please, what is wrong with this code:
InitializeComponent();
this.KeyDown += new KeyEventHandler(dgvC_KeyDown);
private void dgvC_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyValue == 188)
{
…

Bonaca
- 313
- 3
- 5
- 15
0
votes
1 answer
Trying to end editing of cell while on the last row of a gridview using the ENTER key
I have a Gridview within a WinForm. I have a column of that gridview that I edit. I can click in a cell edit and hit enter to complete the editing on every cell except the one in the last row. The "enter" key does nothing when there is no row below…

RicketyBowby
- 63
- 1
- 4
0
votes
4 answers
The modifier 'private' is not valid for this item in C#
It gives me such an error and I can't seem to work out what the problem is.
private void Form1.KeyDown(object sender, KeyEventArgs e) // **THE ERROR HERE**
{
if (ListBox1.Items.Contains(e.KeyCode))
{
…

eksponente
- 49
- 2
- 9
0
votes
2 answers
JQuery and setTimeout() not working
I am using JQuery to monitor key presses for an HTML game, but whenever I add the jquery code to my gameloop then I get an error about keydown not being defined.
//...Included JS files JQuery, and a JQuery plugin to bind…

Figitaki
- 139
- 1
- 1
- 11
0
votes
2 answers
keydown to correspond with button down
Hello I am trying to match the button down visual (on the WinForm, the button boarder gets a little darker, indicating it is pressed) with a keydown event. First of all I need to detect a keydown for numbers only. Then when the key goes down, the…

ikathegreat
- 2,311
- 9
- 49
- 80
0
votes
1 answer
javascript keydown event only work for html input tag?
I have used keyDown event to manage the input tag value by judge e.keycode,
but when I want use keyDown event do something on body element or img ,
I found it doesn't work,like :
$('body,img').keyDown(function(e){
…

hh54188
- 14,887
- 32
- 113
- 184
0
votes
2 answers
C# what is the necessary library for PostMessage?
I am trying to simulate a keypress in C# and I'm getting these errors:
Error 2 The name 'WM_KEYDOWN' does not exist in the current context c:\users\frk\documents\visual studio 2010\Projects\HaxBot3\HaxBot3\Form1.cs 28 52 HaxBot3
Error 5 …

void
- 1,876
- 8
- 24
- 30
0
votes
2 answers
Need to calculate fields after each keypress in Objective-C (four NSTextField)
I'm making a small program that has four NSTextField boxes. Each box is related to the others by a formula. Basically, I have it working right now where after you click out of the box, it'll calculate the other boxes just fine (you can enter numbers…

DrDavid
- 904
- 3
- 9
- 18
0
votes
1 answer
Implementing custom Ctrl+a in Objective-C
How can I implement modified behavior when the user clicks Ctrl+A (select all).
I tried modifying the keyDown: event but it didn't seem to catch the event.

Mace
- 201
- 2
- 5
0
votes
4 answers
Prevent KeyDown event from processing to next form
HI,
I have a form in C# app. On this form I capture a KeyDown event Alt+U which will open a second form. In the second form I have a toolStripButton with shortcutkey Alt+U (the same which I used to open the form with) which prints a document. Now,…
Johan
-1
votes
2 answers
What is WM_KEYDOWN in c++
I'm new to c++ and wondering what "WM_KEYDOWN" is?
And how to use it.
Thank you.

Kevinkeegan
- 57
- 2
- 7
-1
votes
0 answers
The screen is not responding to keydown event
So I have this basic app created where it does the lucky draw. The client now wanted to use presentation clicker device to operate instead of pressing the jewel button or the redo button on the app. I have tested the clicker device and it initiates…
-1
votes
1 answer
Limit keydown execution only to specific div
I want to limit execution with hit enter only to specific div, not on whole page so that this enter key not impact to divs outside this #targer-wrapper but code below with checking div length didn't works:
if ($('#targer-wrapper').length) {
…

alench
- 53
- 6
-1
votes
1 answer
How to remove keydown eventlistener?
I have the following code that will run when an iframe webapplet is loaded in the current page.
window.addEventListener("keydown", function(e)…

CapsaCool
- 67
- 5