win32: Add keycode_to_key method for getting logical keys from physical#4454
win32: Add keycode_to_key method for getting logical keys from physical#4454Aceeri wants to merge 2 commits intorust-windowing:masterfrom
keycode_to_key method for getting logical keys from physical#4454Conversation
keycode_to_key method for getting logical keys from physicalkeycode_to_key method for getting logical keys from physical
|
The problem is that on platforms like linux we'd need to have a running event loop. I'm also not sure if the function is |
Gotcha, makes sense. Is the Also do you know if that applies to the appkit/macos version too (#4455)? Just trying to figure out which parts to try to salvage if I try to get this into the event loop. |
|
Can not speak for windows here, for linux caching is useless. |
As in you can't cache across frames at all? I'll take a bit of a look into the linux code, I haven't really touched it before so I'm pretty blind. |
|
In a sense that there's no point to cache anything, you have access to the entire keymap and thus you get things from it. It could have cache internally... |
Interesting that you would say this. I'm also looking to use this in a game, but according to my co-contributors the displayed key labels changing when the keyboard layout changes would be "disorienting", so we want to store the keyboard layout information (inside of RON) instead of just querying the currently active layout. So a |
#2678
Looking for thoughts on this, maybe it makes more sense to have a
KeyboardLayoutstruct that you can query, but the main usecase I (and other game devs) have for this is giving correct mappings in games.changelogmodule if knowledge of this change could be valuable to users