ameyadubey1618
2021-6-26 08:58:10

@ameyadubey1618 has joined the channel


soegaard2
2021-6-26 10:58:40

Hi All. Is there a way to see whether a key-press event is a repeat event or not? I can’t find anything here:

https://docs.racket-lang.org/gui/key-event_.html

By repeat event, I am thinking of the situation where a key is kept pressed and the OS sends multiple key pressed events for the same key.

I have dug up that is possible to get this information on both macOS [1] and Windows [2].

[1] https://developer.apple.com/documentation/appkit/nsevent/1528049-arepeat?changes=_10&language=objc

[2] https://docs.microsoft.com/en-us/windows/console/key-event-record-str


mflatt
2021-6-26 13:37:14

I’m not sure what you have in mind, but a library with forms/functions that compiles SRE patterns to the string syntax sounds like a good idea. If there’s enough support, I could see something like that being added to the main distribution.


mflatt
2021-6-26 13:47:30

Adding a get-repeat and set-repeat to key-event% would be fine. It looks like the information is not available via Gtk/Gdk (see also https://linux.die.net/man/3/xkbsetdetectableautorepeat), but if it’s useful to have information only on Windows and Mac OS, then seems ok.


soegaard2
2021-6-26 16:12:08

I’ll file a feature request - and try a workaround for now.


hzhang6
2021-6-27 06:48:22

@hzhang6 has joined the channel