#Any way to listen to keyboard events like in javascript?

9 messages · Page 1 of 1 (latest)

frosty pike
#

I want to be able to get a press/released key state and the modifiers that were pressed with the key.

grave fulcrum
#

generally input events are provided by whatever library you use to create/manage the window that's being typed into

#

if you are writing a terminal program, then https://docs.rs/crossterm/ can get you some modifiers info, but terminals do not support key-up events at all.

frosty pike
#

Im using tauri but its seem that their globalShortcut api cancel de default function of a key or shortcut

grave fulcrum
#

ah, not familiar and can't tell you any advice there

frosty pike
#

I just want to listen to keyboard events in the background

grim cradle
#

oh you mean when the window isn't focused i guess

#

¯_(ツ)_/¯