de-duplicate consumer keys

This commit is contained in:
xs5871 2022-07-14 12:02:46 +00:00 committed by Kyle Brown
parent f46e3d59e6
commit ed94ad06da
3 changed files with 9 additions and 44 deletions

View File

@ -127,16 +127,6 @@
|`KC.RSHIFT` |`KC.RSFT` |Right Shift |
|`KC.RALT` | |Right Alt |
|`KC.RGUI` |`KC.RCMD`, `KC.RWIN`|Right GUI (Windows/Command/Meta key) |
|`KC.AUDIO_MUTE` |`KC.MUTE` |Mute |
|`KC.AUDIO_VOL_UP` |`KC.VOLU` |Volume Up |
|`KC.AUDIO_VOL_DOWN` |`KC.VOLD` |Volume Down |
|`KC.MEDIA_NEXT_TRACK` |`KC.MNXT` |Next Track (Windows) |
|`KC.MEDIA_PREV_TRACK` |`KC.MPRV` |Previous Track (Windows) |
|`KC.MEDIA_STOP` |`KC.MSTP` |Stop Track (Windows) |
|`KC.MEDIA_PLAY_PAUSE` |`KC.MPLY` |Play/Pause Track |
|`KC.MEDIA_EJECT` |`KC.EJCT` |Eject (macOS) |
|`KC.MEDIA_FAST_FORWARD`|`KC.MFFD` |Next Track (macOS) |
|`KC.MEDIA_REWIND` |`KC.MRWD` |Previous Track (macOS) |
## [US ANSI Shifted Symbols]
@ -229,3 +219,7 @@
|`KC.BT_CLEAR_BONDS` |`KC.BT_CLR` |Clears all stored bondings |
|`KC.BT_NEXT_CONN` |`KC.BT_NXT` |Selects the next BT connection |
|`KC.BT_PREV_CONN` |`KC.BT_PRV` |Selects the previous BT connection|
## [Media Keys]
See [MediaKeys extension](media_keys.md).

View File

@ -127,16 +127,6 @@
| `KC.RSHIFT` | `KC.RSFT` | Right Shift |
| `KC.RALT` | | Right Alt |
| `KC.RGUI` | `KC.RCMD`, `KC.RWIN` | Right GUI (Windows/Comme/Meta key) |
| `KC.AUDIO_MUTE` | `KC.MUTE` | Mute |
| `KC.AUDIO_VOL_UP` | `KC.VOLU` | Volume Up |
| `KC.AUDIO_VOL_DOWN` | `KC.VOLD` | Volume Down |
| `KC.MEDIA_NEXT_TRACK` | `KC.MNXT` | Next Track (Windows) |
| `KC.MEDIA_PREV_TRACK` | `KC.MPRV` | Previous Track (Windows) |
| `KC.MEDIA_STOP` | `KC.MSTP` | Stop Track (Windows) |
| `KC.MEDIA_PLAY_PAUSE` | `KC.MPLY` | Play/Pause Track |
| `KC.MEDIA_EJECT` | `KC.EJCT` | Eject (macOS) |
| `KC.MEDIA_FAST_FORWARD` | `KC.MFFD` | Next Track (macOS) |
| `KC.MEDIA_REWIND` | `KC.MRWD` | Previous Track (macOS) |
## [US ANSI Shift]
@ -229,3 +219,8 @@
| `KC.BT_CLEAR_BONDS` | `KC.BT_CLR` | Limpa todas as ligações armazenadas |
| `KC.BT_NEXT_CONN` | `KC.BT_NXT` | Seleciona a conexão BT anterior |
| `KC.BT_PREV_CONN` | `KC.BT_PRV` | Seleciona a conexão BT seguinte |
# [Teclas de Mídia]
Vejo [MediaKeys extensão](ptBR/media_keys.md).

View File

@ -360,30 +360,6 @@ class KeyAttrDict:
(151, ('LANG8',)),
(152, ('LANG9',)),
),
# Consumer ("media") keys. Most known keys aren't supported here. A much
# longer list used to exist in this file, but the codes were almost certainly
# incorrect, conflicting with each other, or otherwise 'weird'. We'll add them
# back in piecemeal as needed. PRs welcome.
#
# A super useful reference for these is http://www.freebsddiary.org/APC/usb_hid_usages.php
# Note that currently we only have the PC codes. Recent MacOS versions seem to
# support PC media keys, so I don't know how much value we would get out of
# adding the old Apple-specific consumer codes, but again, PRs welcome if the
# lack of them impacts you.
lambda key: left_pipe_until_some(
key,
maybe_make_consumer_key,
(226, ('AUDIO_MUTE', 'MUTE')), # 0xE2
(233, ('AUDIO_VOL_UP', 'VOLU')), # 0xE9
(234, ('AUDIO_VOL_DOWN', 'VOLD')), # 0xEA
(181, ('MEDIA_NEXT_TRACK', 'MNXT')), # 0xB5
(182, ('MEDIA_PREV_TRACK', 'MPRV')), # 0xB6
(183, ('MEDIA_STOP', 'MSTP')), # 0xB7
(205, ('MEDIA_PLAY_PAUSE', 'MPLY')), # 0xCD (this may not be right)
(184, ('MEDIA_EJECT', 'EJCT')), # 0xB8
(179, ('MEDIA_FAST_FORWARD', 'MFFD')), # 0xB3
(180, ('MEDIA_REWIND', 'MRWD')), # 0xB4
),
)
if DEBUG_OUTPUT: