autorepeat

Delphi: How do I stop TAction shortcut keys autorepeating?

烂漫一生 提交于 2019-12-07 16:12:59
问题 I'm using a Delphi TActionList, with Shortcut Keys for some actions. I want to prevent certain actions from being triggered multiple times by keyboard auto-repeat, but I do not want to affect auto-repeat operation globally. What's the best way of doing this? Clarification : I still need to handle multiple fast keypresses - it's only the keypresses generated by auto-repeat that I want to ignore. 回答1: Intercept the WM_KEYDOWN messages, and look at bit 30 to see if it is auto-repeating. If it is

Delphi: How do I stop TAction shortcut keys autorepeating?

旧巷老猫 提交于 2019-12-06 04:22:58
I'm using a Delphi TActionList, with Shortcut Keys for some actions. I want to prevent certain actions from being triggered multiple times by keyboard auto-repeat, but I do not want to affect auto-repeat operation globally. What's the best way of doing this? Clarification : I still need to handle multiple fast keypresses - it's only the keypresses generated by auto-repeat that I want to ignore. Intercept the WM_KEYDOWN messages, and look at bit 30 to see if it is auto-repeating. If it is, just don't pass on the message as usual and it will not be seen. You may need to enable form key-preview

How is keyboard auto-repeat implemented on a Windows PC?

感情迁移 提交于 2019-11-28 11:16:35
问题 I want to be able to intercept (and do arbitrary processing on) auto-repeating key presses on Windows. I'd like to know how keyboard auto-repeat is implemented so that I know what options I have. i.e. can I intercept at the: application, device driver and/or hardware level ? Update: It looks like auto-repeat is (poorly?) generated at the hardware level and then overridden by device drivers (see here). 回答1: To modify or filter behavior, you can intercept keys using a hook: SetWindowsHookEx

Ignore auto repeat in X11 applications

六眼飞鱼酱① 提交于 2019-11-27 13:51:53
问题 If you press and hold a key in X11 while AutoRepeat is enabled, you continuously receive KeyPress and KeyRelease events. I know that AutoRepeat can be disabled using the function XAutoRepeatOff() , but this changes the setting for the whole X server. Is there a way to either disable AutoRepeat for a single application or to ignore repeated keystrokes? What I'm looking for is a single KeyPress event when a key is pressed and a single KeyRelease event when a key is released, without interfering

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

删除回忆录丶 提交于 2019-11-27 05:01:30
(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 presses some key I want to know what key is that; When the user releases some key, I want to know what key is that; I want to ignore the system auto repeat options: I want to receive just one keypress event for each key press and just one key release event for each key release; If possible, I would use items 1 to 3 to know if the user is holding more than

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

偶尔善良 提交于 2019-11-26 11:25:39
问题 (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 presses some key I want to know what key is that; When the user releases some key, I want to know what key is that; I want to ignore the system auto repeat options: I want to receive just one keypress event for each key press and just one key release