Questions tagged [keystroke]

The generic concept of capturing or generating a keystroke event in an application.

The generic concept of capturing or generating a keystroke event in an application.

May also refer to library-specific keystroke-capture code, for example questions relating to capturing keystrokes using jQuery.

531 questions
11
votes
4 answers

Simulate Key Press at hardware level - Windows

I'm looking for a language or library to allow me to simulate key strokes at the maximum level possible, without physically pressing the key. (My specific measure of the level of the keystroke is whether or not it will produce the same output as a…
Anti Earth
  • 4,671
  • 13
  • 52
  • 83
10
votes
1 answer

Why the Shift+Ctrl+e causing e underlined and start emoji input (linux)?

Why when i am inside chrome browser for example, when i want to center text using Shift+Ctrl+E key combination it causes appearing e̲ and if i type e̲j̲o̲y̲ and press Enter on keyboard it causes appearing emoji . How i can simply fix it?
Dominik
  • 1,233
  • 2
  • 14
  • 29
10
votes
2 answers

Use keypress to initiate action in node.js

I am using node.js v4.5 I wrote the function below to send repeated messages with a delay. function send_messages() { Promise.resolve() .then(() => send_msg() ) .then(() => Delay(1000) ) .then(() => send_msg() ) …
user6064424
10
votes
2 answers

how to get android app_id from google play services

I created android application and hosted it on google play, but suddenly I deleted my project in Eclipse (from disk too) and now I am restoring some files from backup but I don't have old app_id in res/values/strings.xml how can I get app_id from…
fpopic
  • 1,756
  • 3
  • 28
  • 40
10
votes
3 answers

Key binding for § symbol in Emacs

I'm working in Ubuntu, but since the standard way of inserting unicode characters (Ctrl+Shift+U and, after that, the unicode code) doesn't work inside emacs, I've, in my .emacs, some keystrokes for different unicode symbols which I use frequently,…
ABu
  • 10,423
  • 6
  • 52
  • 103
9
votes
2 answers

Sending keystrokes to a program

In window form, I made a button and I'm trying to make it send F1 to a specific window (Such as FireFox, My Computer, etc...) My questions are : How do I do it by the window's name? (such as "Mozilla Firefox") How do I do it by the process's name?…
Or Betzalel
  • 2,427
  • 11
  • 47
  • 70
9
votes
9 answers

How to disable backspace if anything other than input field is focused on using jquery

How do I disable backspace keystroke if anything other than 2 specific input fields are focused on using jquery? here is my current code (NOW INCLUDING 2 TEXTBOXES): $(document).keypress(function(e){ var elid =…
sadmicrowave
  • 39,964
  • 34
  • 108
  • 180
9
votes
3 answers

How to properly implement cheat codes?

what would be the best way to implement kind of cheat codes in general? I have WinForms application in mind, where a cheat code would unlock an easter egg, but the implementation details are not relevant. The best approach that comes to my mind is…
Axarydax
  • 16,353
  • 21
  • 92
  • 151
9
votes
4 answers

jQuery detect keystrokes and set variables accordingly

I have created a rudimentary EasterEgg within my code to activate when the following keystrokes are made (not simultaneously) Enter + c + o + l + o + r + s with the following code: isEnter = 0; isC = 0; isO = 0; isL = 0; isR = 0; isS =…
sadmicrowave
  • 39,964
  • 34
  • 108
  • 180
9
votes
3 answers

bash scripting - read single keystroke including special keys enter and space

Not sure if I should put this on stackoverflow or unix.stackexchange but I found some similar questions here, so here it goes. I'm trying to create a script to be called by .bashrc that allows me to select one of two options based on a single…
a.peganz
  • 318
  • 1
  • 4
  • 11
9
votes
4 answers

Reset INPUT without FORM

I have INPUT element and I want to reset the previous value (not necessary original value). There are 2 ways: Save the value in another variable and pull it out again Press ESC key. But I don't want users to press ESC but click a button. So for…
HP.
  • 19,226
  • 53
  • 154
  • 253
8
votes
2 answers

Flutter - actively check if special key (like ctrl) is pressed

Question: How to actively check if a certain (decoration) key is pressed, like CTRL or SHIFT, like: if (SomeKeyboardRelatedService.isControlPressed()) {...} background I'd like to check if a certain (decoration) key is pressed when the user clicks…
Meow Cat 2012
  • 928
  • 1
  • 9
  • 21
8
votes
1 answer

Send keyboard input to a running process linux

I am developing web interface for an mp3 player (mpg123 linux). The mpg123 is a command-line mp3 player and can be controlled using keyboard inputs. For example: $ mpg123 -C filename.mp3 it will start playing the song and monitor keyboard inputs…
Punit Soni
  • 1,229
  • 3
  • 17
  • 26
8
votes
1 answer

Java: How to remove default KeyStrokes from any JComponent?

I want to control which keystroke belong to which Jcomponent. I even want to get how to remove the default keystrokes associated with a Jcomponent and replace them with other favourite keystrokes. I followed this oracle tutorial, it gives an…
Saleh Feek
  • 2,048
  • 8
  • 34
  • 56
8
votes
4 answers

detect Ctrl + Enter

(using WPF) i try to detect when Ctrl + Enter gets hit. so i tried this code: if (e.Key == Key.Return && (e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl)) { //Do Something } Obviously this is not correct, as it does not…
Dante1986
  • 58,291
  • 13
  • 39
  • 54
1
2
3
35 36