Questions tagged [keypress]

Occurs when a key is pressed while the control has focus.

Occurs when a key is pressed while the control has focus.

This is the key press template primarily designed to illustrate keys and keystrokes on a computer keyboard.

With additional parameters, a single template can even illustrate a combination of multiple simultaneous keystrokes. A sequence of keystrokes, on the other hand, need to be demonstrated with separate templates.

2619 questions
0
votes
1 answer

Identify key uniquely from WM_KEYDOWN message

I tried to use the virtual key code provided by wParam, however that didn't work very well: multiple keys mapped to the same key code some keys were not recognized at all virtual keys seemed to be adapted to the keyboard layout (which i don't…
HolleBolzen
  • 1
  • 1
  • 1
0
votes
1 answer

Auto Bracket Closing in Tkinter

I'm making a code editor and everything is good! But I want to make a feature which auto closes your bracket (testing with letter 'a'). Here is my code: (bracket close part) st is my scolled text and self is the root window, I am testing with when…
Chiz
  • 7
  • 2
0
votes
2 answers

Start a countdown by pressing a key with Javascript

I need to start and stop a 60-second countdown by pressing the space key, all via Javascript. To do this, I thought I would have to use setInterval() and clearInterval(), however, I can't make it work. I can start the countdown, but once it has been…
nectarponcho
  • 33
  • 1
  • 5
0
votes
2 answers

Javascript keydown won't call function twice on same key, must alternate keys, simple animation

Anybody know to resolve this? I just want to do a simple animation using js/css where the object starts in the middle of the screen. Upon right or left arrow keypress, the object then moves to either side of the screen for a few seconds and then…
0
votes
1 answer

Do a function if a key(enter) is pressed in kivy python

I want it so that a function is performed when a key is pressed in kivy. I would like to have a simple example of how to do this as I want to implement it in my app. Would appreciate any help.
Fat Trat
  • 65
  • 1
  • 10
0
votes
0 answers

Toggle the ability to use spacebar when enter is pressed

Currently I am trying to make it so whenever you click enter, it toggles the ability to use the spacebar. It will by default be set to let you not use the spacebar but when the enter key is hit, that is toggled and you can use it. when you click it…
J3B
  • 15
  • 2
0
votes
1 answer

how to change filter with key pressed function?

I was creating a mouse-based painter app. This is a code of a brush whose color is chosen by a color picker in p5js. all I want is = when i press [T] key, it should be changed into THRESHOLD filter i put this code on here: if (key === 'T')…
rose
  • 49
  • 6
0
votes
1 answer

What happens if I used Javascript deprecated features?

I am writing a program that intercepts user’s keystrokes to decide whether to display or reject the characters. The keypress event is more convenient for this analysis than keyup and keydown because I analyze only letters and digits, all other…
Victor
  • 5
  • 2
0
votes
2 answers

Enter Button Issue -- Jquery

I want to link an Enter Button (on a keyboard) to text box in javascript and the problem is there are two submit buttons linked to it. I researched a bit and realized that i can use keypress like this $('#searchbox input').bind('keypress',…
Ross Taylor
  • 109
  • 2
  • 9
0
votes
1 answer

Simulating key presses in a game using Python

Thank you for reading this. So e.g I start csgo, minecraft, or whatever game. When I'm in game I want to open the chat by pressing the key "y", nevertheless, I've tried using pyautogui, keyboard, win32api and win32con, they only simulate virtual key…
0
votes
0 answers

KeyPress Control Modifiers , number problem

I simply want to get the character 1...n inside my function when the user presses ctrl +1....n in the form. if i use keypress event for this: private void Form1_KeyPress(object sender, KeyPressEventArgs e) { if ((Control.ModifierKeys &…
0
votes
0 answers

vb6 win 10 keypress failure

I'm constructing a mouse centric form of cut and paste. the user points to an object with the mouse and types a single key to initiate an action. the Object being pointed to is in a picture box which is part of a form and keypreview is set to true…
Bill
  • 57
  • 4
0
votes
1 answer

Pause script until user presses enter in Node.JS

I have a script, and it has a little message. I want it to not do anything until the user presses enter. I tried this: console.log("Welcome to the Roblox cursor backup script!\n This script will backup your current Roblox cursor and replace it with…
0
votes
1 answer

Disable some letter keys in MaskedTextBox

I want a MaskedTextBox that is made for hex color codes, such as "#73E57E" for example. This means that only 0-9 and A-F shall be allowed. My mask is ">AAAAAA". What I can't figure out is how do disable some letters. So that when I hit the "G" key,…
spunit
  • 523
  • 2
  • 6
  • 23
0
votes
3 answers

jquery keypress replace character or string from json

Global Json object which is initialized through ajax post call to php and it returns values like following( $arr = array('h' => 'html', 'l' => 'li', 'p' => 'pre', 'd' =>'dom', 'e' => 'element'); echo json_encode($arr); I can get the value of json…
kiranking
  • 306
  • 11
  • 29