Replies: 1 comment 5 replies
-
|
I'm not sure about "splitting", but generally I like the idea of supporting commands as a way to facilitate cross-platform shortcuts. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is partly beyond the scope of Winit but deserves a little discussion.
Keyreplaces the oldVirtualKeyCodeas a listing of named keys. The main difference, besidesKeybeing much larger and based off a different standard is thatKeyincludesCharacter(Str),Unidentified(NativeKey)andDead(Option<char>)super-categories. (Aside: shouldKeymix named keys and super-categories in a single enum? Maybe it doesn't matter.)Fundamentally,
Keyis about naming keys. Shortcuts are similar, but not quite the same. My attempt at mapping common UI shortcuts resulted inCommand. Besides many omissions (e.g. all media controls) this includes a few things you don't see inKey:ViewUp,WordLeft,Italic,Fullscreen.The point is that there is a large (though not complete) overlap between these enums. Neither should ever be matched exhaustively. So should
Keybe split up to facilitate mapping "named keys" to "commands"?Examples:
Key::Alt,Key::Fnare modifier keys, not commandsBeta Was this translation helpful? Give feedback.
All reactions