Questions tagged [keyboard-input]

101 questions
640
votes
12 answers

How to make a script wait for a pressed key?

I want my script to wait until the user presses any key. How do I do that?
Janusz
  • 176,216
  • 111
  • 293
  • 365
71
votes
23 answers

Keyboard input with timeout?

How would you prompt the user for some input but timing out after N seconds? Google is pointing to a mail thread about it at http://mail.python.org/pipermail/python-list/2006-January/533215.html but it seems not to work. The statement in which the…
pupeno
  • 256,034
  • 114
  • 324
  • 541
24
votes
7 answers

How to Edit multiple lines in Visual studio 2017 at once

I'm following a series of videos on Youtube on how to develop a dashboard using bootstrap. The developer in that series uses the Sublime Text editor. I've noticed that sometimes he clicks on multiple places (one after another) then start typing, and…
Richard77
  • 17,505
  • 36
  • 124
  • 222
22
votes
5 answers

Interpret enter as tab WPF

I want to interpret Enter key as Tab key in whole my WPF application, that is, everywhere in my application when user press Enter I want to focus the next focusable control,except when button is focused. Is there any way to do that in application…
Arsen Mkrtchyan
  • 47,086
  • 29
  • 143
  • 178
11
votes
1 answer

Delphi: Can I differentiate between numpad's enter key and carriage return?

I've got a quaint little app that pops up an on screen numberpad/calculator written in Delphi. I'd like to make it so if you pressed 'enter' (on the number pad) you'd be pressing '=' and if you pressed 'return' (on the main keyboard) you'd be…
Peter Turner
  • 10,788
  • 9
  • 62
  • 106
10
votes
2 answers

Lispy way to read user input from the keyboard in Clojure?

I am writing a function for my Clojure program that reads user input from the keyboard. If the user enters invalid input, the user is warned and then prompted again. When using a procedural style in a language like Python, I would do something…
davidscolgan
  • 6,778
  • 5
  • 52
  • 74
6
votes
1 answer

Keyboard input using stdio.StandardIO in twisted python

I have a doubt in twisted python related to my multiclient chat server program. that is, when we give input from keyboard using stdio.StandardIO, where it is stored when we run the reactor? Can anybody give me the answer, please..
Suruchi
  • 171
  • 1
  • 7
6
votes
1 answer

Detecting key combinations

I want to detect when a combination like Ctrl-C is pressed in a WPF application. What I've read online says to use something like the following in the KeyDown (or KeyUp) Event: if ((Keyboard.Modifiers == ModifierKeys.Control) && (e.Key == Key.S)) { …
user584974
  • 127
  • 2
  • 6
5
votes
1 answer

Linux analog to windows GetAsyncKeyState()

Is there some Linux analog of windows function GetAsyncKeyState() ? Or maybe there exists some asynchronous function which returns - Does keyboard buffer empty or not ? Thanks.
Agnius Vasiliauskas
  • 10,413
  • 5
  • 46
  • 66
5
votes
4 answers

How do I read input that could be an int or a double?

I'm writing a program in which I need to take input from the keyboard. I need to take a number in, yet I'm not sure if it's an int or a double. Here's the code that I have (for that specific part): import java.io.*; import…
newplayer12132
  • 75
  • 1
  • 1
  • 5
5
votes
1 answer

Keyboard input between select() in Python

I write some codes to get the input from keyboard and also check something is alive or not: import sys from select import select timeout = 10 while is_alive(): # is_alive is a method to check some stuffs, might take 5 secs rlist, _, _ =…
justmaker
  • 53
  • 5
4
votes
1 answer

Using a DataMatrix code as a keyboard input

I have this program to read [code].txt files, according to what is the input on a textBox. For now, I type the code and make the search for the files. But I want to use a reading of a data matrix code as the input of that textBox. Basically, I need…
Renato Parreira
  • 758
  • 1
  • 6
  • 23
3
votes
3 answers

How to send keyboard input to dos application running in window mode in Windows98

My question is about very antique techologies. I have a task to automate old DOS software (spectrometric) that is running in Windows mode in Windows 98. I made two different solution hovewer both of them doesn't work with DOS application: First…
Michael Ushakov
  • 720
  • 2
  • 12
3
votes
2 answers

How to get key modifiers in Linux Chrome

How can my javascript program determine which modifiers were pressed along with a keydown event in Chrome on Linux? I tried this code: document.addEventListener('keydown', function(e) { console.log("KEY DOWN: key=" + e.key + ", code=" + e.code …
personal_cloud
  • 2,846
  • 1
  • 19
  • 25
3
votes
1 answer

Flutter keyboard issue when wrap under Stack > Opacity > Scrollable

In flutter app, when an input field is wrapped inside Scrollable, Opacity, Stack, when keyboard appear, the scrollable view is not correctly placed. How to make the scrollable view correctly when keyboard appear? If input field is not wrapped…
Kyaw Tun
  • 10,164
  • 7
  • 44
  • 72
1
2 3 4 5 6 7