Questions tagged [keyrelease]

A transition triggered by a key released event. Keys can be specified either by the ASCII character they represent or by their keycode.

A transition triggered by a key released event. Keys can be specified either by the ASCII character they represent or by their keycode.

Especially For JAVA: KeyRelease Tutorial

Some useful Links: Docs

49 questions
18
votes
10 answers

How to know when a user has really released a key in Java?

(Edited for clarity) I want to detect when a user presses and releases a key in Java Swing, ignoring the keyboard auto repeat feature. I also would like a pure Java approach the works on Linux, Mac OS and Windows. Requirements: When the user…
Luis Soeiro
  • 4,162
  • 5
  • 33
  • 45
14
votes
4 answers

Listening to keyboard events without trapping them?

I'm writing an command-line application which listens for Control key release events in X Windows and alerts another process when it detects them. Being new to GNU/Linux, I'd prefer avoiding to fumble with GCC and therefore I'm looking for a…
4
votes
1 answer

PyQt4 - Holding down a key detected as frequent press and release?

I've noticed some unusual behavior when the QApplication processes key events, which jeopardizes a small game I'd hoped to make. Holding down a key causes the keyPressEvent and then keyReleaseEvent methods to be repeatedly (and very frequently)…
Anti Earth
  • 4,172
  • 11
  • 45
  • 79
3
votes
2 answers

OpenGL/Gtkmm game - keyboard moving

I am programming a game in "OpenGL" and using "Gtkmm" as a window manager. I want to use the keyboard to camera moving (thus, "UP-key" to move forward, "DOWN-key" to move backward, etc...) Some time ago, when I programmed in Java, I used this…
Petike
  • 687
  • 4
  • 13
  • 20
2
votes
3 answers

How to detect key release with python ( not keypress)?

How can I detect key release with python 3 ? Like if I pressed the key a for 1 second , when I remove my finger from the key ( releasing the key ) , It will print("Key 'a' pressed then released"). I trying to do it with module keyboard but I have no…
Black Thunder
  • 5,331
  • 5
  • 22
  • 52
2
votes
1 answer

JMenuItem and ENTER key released

I have a JMenuItem and I want to receive user input. The user has to be able to start the item's functionality by mouse or keyboard. The item's functionality contains a JDialog to be opened. This dialog listens to released ENTER keys and starts its…
vern
  • 83
  • 1
  • 10
1
vote
1 answer

tkinter different behavior on Windows and Linux

In my CS class, my students just finished their first "clone your classic" contest. The PONG team went rapidly through the "Hey my paddle is frozen" issue with their two players on one keyboard version. I came across this problem 5 years ago and…
smed
  • 128
  • 8
1
vote
0 answers

Mac unable to register key-release in Tkinter

Running the code below works perfectly on a windows computer. However, when I run it on my MacBook the Key-Release event, canvas.bind_all('', func), returns when w is pressed, not released. Question: Is there a fixe/workaround inside…
1
vote
0 answers

Java Robot KeyPress KeyRelease Not Working Mac

Everytime I execute a simplistic algorithim (where my IDE detects no errors), I keep getting the following error in my console: java[4301:301618] pid(4301)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed.…
Xela
  • 31
  • 2
  • 7
1
vote
0 answers

Java Robot .keypress doesn't work on a Virtual Machine running Windows 10

I can't seem to make the Robot .keypress/keyrelease methods from Java to work inside a Virtual Machine when I'm not connected to that virtual machine. It works as expected when I'm connected to the VM using the remote connection from my station. The…
1
vote
1 answer

A Ruby module to simulate key press and key released events?

I want to create a application that simulates various users but I need this "ghost" users to type on the keyboard, how to I simulate a keypress and keyrealease events on Ruby?
Manuel de Leon
  • 2,583
  • 4
  • 17
  • 12
1
vote
1 answer

How does XCB's event handling detect the ESC key in C?

I've been studying an XCB tutorial, but I'm stuck on this one. In this example, the program quits when you press the ESC key. But in the example code, I can't figure out how "case 9" catches the ESC key. I've searched and looked all through xcb.h…
s0s
  • 45
  • 9
1
vote
1 answer

MATLAB: How to run function until the key is released?

I have a GUI and I want to repeat some process from the time the given key is pressed until the key is released. I know how to do some process once when the key is pressed. But is there any way how to for example display random number every second…
Jaja
  • 55
  • 4
1
vote
1 answer

How to know how many milliseconds Key is pressed in java

I want to find out the time in milliseconds that some key is pressed in java, but my result always prints a different number even though I pressed the key for less that one second or more. For Example If I pressed for less that one seconds shows…
Marcelo Alarcon
  • 280
  • 1
  • 3
  • 16
1
vote
1 answer

How to detect ALL keys released in jQuery?

I'm using .keydown() and .keyup() event handlers at the same time on a same object, jquery fires .keyup() whenever a key form the keyboard get released .. I want to prevent jquery from triggering .keyup() event until ALL keys get released (not only…
Saajid Akram
  • 65
  • 1
  • 7
1
2 3 4