-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support all 10bit HID Consumer code.
By moving the IS_CONSUMER flag to B00001000 instead of B00000010 (swap with IS_INTERNAL) we can detect the if the key is a consumer key and strip out the flags and use the full 10bit to send to the hid report. This enable us to use all the Consumer_* keys
- Loading branch information
Showing
3 changed files
with
252 additions
and
252 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,9 +83,9 @@ typedef union Key_ { | |
|
||
// we assert that synthetic keys can never have keys held, so we reuse the _HELD bits | ||
#define IS_SYSCTL B00000001 | ||
#define IS_CONSUMER B00000010 | ||
#define IS_INTERNAL B00000010 | ||
#define SWITCH_TO_KEYMAP B00000100 | ||
#define IS_INTERNAL B00001000 | ||
#define IS_CONSUMER B00001000 | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gedankenexperimenter
Collaborator
|
||
/* HID types we need to encode in the key flags for system and consumer control hid controls | ||
Each key can only have one, so we don't need to use a bit vector. | ||
|
Oops, something went wrong.
Is this really compatible with the various
HID_TYPE_*
values below? TheB00001000
bit overlaps the bits used in those values. For example,HID_TYPE_LC | IS_CONSUMER
has the same value asHID_TYPE_OOC | IS_CONSUMER
. If the different Consumer HID types don't need to be distinguished, why bother with them? If they do, then there's another bit that could be used forIS_CONSUMER
that doesn't conflict:B00100000
.