receiver: add and remove some HID Consumer Codes to conform with Linux usage
This commit is contained in:
parent
3e6c92de70
commit
4c7f8c831b
|
@ -1042,7 +1042,6 @@ class MRKeyLED(_Setting):
|
||||||
return b'\x00'
|
return b'\x00'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Only implemented for devices that can produce HID and Consumer Key Codes
|
## Only implemented for devices that can produce HID and Consumer Key Codes
|
||||||
## Only interested in current host, so use 0xFF for it
|
## Only interested in current host, so use 0xFF for it
|
||||||
class PersistentRemappableAction(_Settings):
|
class PersistentRemappableAction(_Settings):
|
||||||
|
@ -1118,7 +1117,7 @@ SETTINGS = [
|
||||||
CrownSmooth, # working
|
CrownSmooth, # working
|
||||||
DivertGkeys, # working
|
DivertGkeys, # working
|
||||||
MKeyLEDs, # working
|
MKeyLEDs, # working
|
||||||
MRKeyLED, # working
|
MRKeyLED, # working
|
||||||
Multiplatform, # working
|
Multiplatform, # working
|
||||||
DualPlatform, # simple
|
DualPlatform, # simple
|
||||||
ChangeHost, # working
|
ChangeHost, # working
|
||||||
|
|
|
@ -626,6 +626,7 @@ MOUSE_BUTTONS = _NamedInts(
|
||||||
MOUSE_BUTTONS._fallback = lambda x: 'unknown:%02X' % x
|
MOUSE_BUTTONS._fallback = lambda x: 'unknown:%02X' % x
|
||||||
|
|
||||||
# HID USB Keycodes from https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
|
# HID USB Keycodes from https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
|
||||||
|
# Modified by information from Linux HID driver linux/drivers/hid/hid-input.c
|
||||||
USB_HID_KEYCODES = _NamedInts(
|
USB_HID_KEYCODES = _NamedInts(
|
||||||
A=0x04,
|
A=0x04,
|
||||||
B=0x05,
|
B=0x05,
|
||||||
|
@ -820,14 +821,14 @@ for val, name in modifiers.items():
|
||||||
KEYS[0x01000000 + (int(key) << 8) + val] = name + str(key)
|
KEYS[0x01000000 + (int(key) << 8) + val] = name + str(key)
|
||||||
|
|
||||||
HID_CONSUMERCODES = _NamedInts(
|
HID_CONSUMERCODES = _NamedInts(
|
||||||
Unassigned=0x00,
|
# Unassigned=0x00,
|
||||||
Consumer_Control=0x01,
|
# Consumer_Control=0x01,
|
||||||
Numeric_Key_Pad=0x02,
|
# Numeric_Key_Pad=0x02,
|
||||||
Programmable_Buttons=0x03,
|
# Programmable_Buttons=0x03,
|
||||||
Microphone=0x04,
|
# Microphone=0x04,
|
||||||
Headphone=0x05,
|
# Headphone=0x05,
|
||||||
Graphic_Equalizer=0x06,
|
# Graphic_Equalizer=0x06,
|
||||||
AM__PM=0x22,
|
# AM__PM=0x22,
|
||||||
Power=0x30,
|
Power=0x30,
|
||||||
Reset=0x31,
|
Reset=0x31,
|
||||||
Sleep=0x32,
|
Sleep=0x32,
|
||||||
|
@ -846,19 +847,33 @@ HID_CONSUMERCODES = _NamedInts(
|
||||||
Menu_Value_Decrease=0x48,
|
Menu_Value_Decrease=0x48,
|
||||||
Data_On_Screen=0x60,
|
Data_On_Screen=0x60,
|
||||||
Closed_Caption=0x61,
|
Closed_Caption=0x61,
|
||||||
Closed_Caption_Select=0x62,
|
# Closed_Caption_Select=0x62,
|
||||||
VCR__TV=0x63,
|
VCR__TV=0x63,
|
||||||
Broadcast_Mode=0x64,
|
# Broadcast_Mode=0x64,
|
||||||
Snapshot=0x65,
|
Snapshot=0x65,
|
||||||
Still=0x66,
|
# Still=0x66,
|
||||||
Selection=0x80,
|
Red=0x69,
|
||||||
Assign_Selection=0x81,
|
Green=0x6A,
|
||||||
|
Blue=0x6B,
|
||||||
|
Yellow=0x6C,
|
||||||
|
Aspect_Ratio=0x6D,
|
||||||
|
Brightness_Up=0x6F,
|
||||||
|
Brightness_Down=0x70,
|
||||||
|
Brightness_Toggle=0x72,
|
||||||
|
Brightness_Min=0x73,
|
||||||
|
Brightness_Max=0x74,
|
||||||
|
Brightness_Auto=0x75,
|
||||||
|
Keyboard_Illumination_Up=0x79,
|
||||||
|
Keyboard_Illumination_Down=0x7A,
|
||||||
|
Keyboard_Illumination_Toggle=0x7C,
|
||||||
|
# Selection=0x80,
|
||||||
|
# Assign_Selection=0x81,
|
||||||
Mode_Step=0x82,
|
Mode_Step=0x82,
|
||||||
Recall_Last=0x83,
|
Recall_Last=0x83,
|
||||||
Enter_Channel=0x84,
|
Enter_Channel=0x84,
|
||||||
Order_Movie=0x85,
|
# Order_Movie=0x85,
|
||||||
Channel=0x86,
|
# Channel=0x86,
|
||||||
Media_Selection=0x87,
|
# Media_Selection=0x87,
|
||||||
Media_Select_Computer=0x88,
|
Media_Select_Computer=0x88,
|
||||||
Media_Select_TV=0x89,
|
Media_Select_TV=0x89,
|
||||||
Media_Select_WWW=0x8A,
|
Media_Select_WWW=0x8A,
|
||||||
|
@ -878,15 +893,15 @@ HID_CONSUMERCODES = _NamedInts(
|
||||||
Media_Select_Satellite=0x98,
|
Media_Select_Satellite=0x98,
|
||||||
Media_Select_Security=0x99,
|
Media_Select_Security=0x99,
|
||||||
Media_Select_Home=0x9A,
|
Media_Select_Home=0x9A,
|
||||||
Media_Select_Call=0x9B,
|
# Media_Select_Call=0x9B,
|
||||||
Channel_Increment=0x9C,
|
Channel_Increment=0x9C,
|
||||||
Channel_Decrement=0x9D,
|
Channel_Decrement=0x9D,
|
||||||
Media_Select_SAP=0x9E,
|
# Media_Select_SAP=0x9E,
|
||||||
VCR_Plus=0xA0,
|
VCR_Plus=0xA0,
|
||||||
Once=0xA1,
|
# Once=0xA1,
|
||||||
Daily=0xA2,
|
# Daily=0xA2,
|
||||||
Weekly=0xA3,
|
# Weekly=0xA3,
|
||||||
Monthly=0xA4,
|
# Monthly=0xA4,
|
||||||
Play=0xB0,
|
Play=0xB0,
|
||||||
Pause=0xB1,
|
Pause=0xB1,
|
||||||
Record=0xB2,
|
Record=0xB2,
|
||||||
|
@ -903,37 +918,37 @@ HID_CONSUMERCODES = _NamedInts(
|
||||||
Tracking=0xBD,
|
Tracking=0xBD,
|
||||||
Track_Normal=0xBE,
|
Track_Normal=0xBE,
|
||||||
Slow_Tracking=0xBF,
|
Slow_Tracking=0xBF,
|
||||||
Frame_Forward=0xC0,
|
# Frame_Forward=0xC0,
|
||||||
Frame_Back=0xC1,
|
# Frame_Back=0xC1,
|
||||||
Mark=0xC2,
|
# Mark=0xC2,
|
||||||
Clear_Mark=0xC3,
|
# Clear_Mark=0xC3,
|
||||||
Repeat_From_Mark=0xC4,
|
# Repeat_From_Mark=0xC4,
|
||||||
Return_To_Mark=0xC5,
|
# Return_To_Mark=0xC5,
|
||||||
Search_Mark_Forward=0xC6,
|
# Search_Mark_Forward=0xC6,
|
||||||
Search_Mark_Backwards=0xC7,
|
# Search_Mark_Backwards=0xC7,
|
||||||
Counter_Reset=0xC8,
|
# Counter_Reset=0xC8,
|
||||||
Show_Counter=0xC9,
|
# Show_Counter=0xC9,
|
||||||
Tracking_Increment=0xCA,
|
# Tracking_Increment=0xCA,
|
||||||
Tracking_Decrement=0xCB,
|
# Tracking_Decrement=0xCB,
|
||||||
Stop__Eject=0xCC,
|
# Stop__Eject=0xCC,
|
||||||
Play__Pause=0xCD,
|
Play__Pause=0xCD,
|
||||||
Play__Skip=0xCE,
|
# Play__Skip=0xCE,
|
||||||
Volume=0xE0,
|
Volume=0xE0,
|
||||||
Balance=0xE1,
|
# Balance=0xE1,
|
||||||
Mute=0xE2,
|
Mute=0xE2,
|
||||||
Bass=0xE3,
|
# Bass=0xE3,
|
||||||
Treble=0xE4,
|
# Treble=0xE4,
|
||||||
Bass_Boost=0xE5,
|
Bass_Boost=0xE5,
|
||||||
Surround_Mode=0xE6,
|
# Surround_Mode=0xE6,
|
||||||
Loudness=0xE7,
|
# Loudness=0xE7,
|
||||||
MPX=0xE8,
|
# MPX=0xE8,
|
||||||
Volume_Up=0xE9,
|
Volume_Up=0xE9,
|
||||||
Volume_Down=0xEA,
|
Volume_Down=0xEA,
|
||||||
Speed_Select=0xF0,
|
# Speed_Select=0xF0,
|
||||||
Playback_Speed=0xF1,
|
# Playback_Speed=0xF1,
|
||||||
Standard_Play=0xF2,
|
# Standard_Play=0xF2,
|
||||||
Long_Play=0xF3,
|
# Long_Play=0xF3,
|
||||||
Extended_Play=0xF4,
|
# Extended_Play=0xF4,
|
||||||
Slow=0xF5,
|
Slow=0xF5,
|
||||||
Fan_Enable=0x100,
|
Fan_Enable=0x100,
|
||||||
Fan_Speed=0x101,
|
Fan_Speed=0x101,
|
||||||
|
|
Loading…
Reference in New Issue