Open
Conversation
pdesaulniers
commented
Jul 29, 2019
| PUGL_KC_RightShift = 229, | ||
| PUGL_KC_RightAlt = 230, | ||
| PUGL_KC_RightGUI = 231 | ||
| } PuglKeyCodes; |
Contributor
Author
There was a problem hiding this comment.
We might want to expose this outside of pugl too. Otherwise, the users will have to include pugl.h to use these keycodes.
Contributor
|
Looks good, but a few things to do:
there are a little oddities regarding spaces vs tabs, but I can fix them later myself also, exposing the keycode API would be nice yes :) |
Contributor
Author
|
OK, I've made the changes. |
4fa52aa to
bd702d4
Compare
7599a6e to
52c2e78
Compare
59cc6ed to
470c5b7
Compare
8507aec to
7cd4819
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an initial attempt at adding keycodes support to DPF.
These allow to deal with keyboard keys in a layout-independent manner. It's particularly useful for piano-style widgets, to map keyboard keys to piano notes in the correct order.
This code is based on https://github.com/depp/keycode, especially the
<os>_tohid.cfiles andkeycode.hin thesrcdirectory.Tested with the piano widget on Linux, MacOS and Windows, with a couple of different layouts (Colemak, AZERTY, QWERTY).
The keycodes would be wrong when running the UI in Wine, but they would work fine on a real Windows 10 machine. I'm not sure if this is normal.
Perhaps it would be good to test this feature a little more before merging.