summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-07-03 09:58:09 +0300
committerDevaev Maxim <[email protected]>2021-07-03 09:58:09 +0300
commit671627b768864e1c1b7396d9607ad4acfe87a32c (patch)
tree7e9ff186dd875bb96958b5b20231f0e10d194a80
parent3bcaca0cb8a07d704391a3905ea99eee01a71f9d (diff)
pikvm/pikvm#373: added yen key
-rw-r--r--hid/src/ps2/keymap.h1
-rw-r--r--hid/src/usb/keymap.h1
-rw-r--r--keymap.csv1
-rw-r--r--kvmd/keyboard/mappings.py2
-rw-r--r--web/kvm/index.html5
-rw-r--r--web/kvm/window-keyboard.pug2
6 files changed, 10 insertions, 2 deletions
diff --git a/hid/src/ps2/keymap.h b/hid/src/ps2/keymap.h
index 9307e9e0..f45d6eb9 100644
--- a/hid/src/ps2/keymap.h
+++ b/hid/src/ps2/keymap.h
@@ -143,5 +143,6 @@ void keymapPs2(uint8_t code, Ps2KeyType *ps2_type, uint8_t *ps2_code) {
case 104: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 113; return; // KEYPAD_DOT
case 105: *ps2_type = PS2_KEY_TYPE_SPEC; *ps2_code = 94; return; // KEY_POWER
case 106: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 97; return; // KEY_NON_US
+ case 107: *ps2_type = PS2_KEY_TYPE_REG; *ps2_code = 106; return; // KEY_INTERNATIONAL3
}
}
diff --git a/hid/src/usb/keymap.h b/hid/src/usb/keymap.h
index 1ce4ce90..d1954d3a 100644
--- a/hid/src/usb/keymap.h
+++ b/hid/src/usb/keymap.h
@@ -133,6 +133,7 @@ KeyboardKeycode keymapUsb(uint8_t code) {
case 104: return KEYPAD_DOT;
case 105: return KEY_POWER;
case 106: return KEY_NON_US;
+ case 107: return KEY_INTERNATIONAL3;
default: return KEY_ERROR_UNDEFINED;
}
}
diff --git a/keymap.csv b/keymap.csv
index eba07c64..18684e94 100644
--- a/keymap.csv
+++ b/keymap.csv
@@ -105,3 +105,4 @@ Numpad0,103,KEYPAD_0,0x62,reg:0x70,0x52,XK_KP_0
NumpadDecimal,104,KEYPAD_DOT,0x63,reg:0x71,0x53,XK_KP_Decimal
Power,105,KEY_POWER,0x66,spec:0x5e,0xe05e,XK_XF86_Sleep
IntlBackslash,106,KEY_NON_US,0x64,reg:0x61,0x56
+IntlYen,107,KEY_INTERNATIONAL3,0x89,reg:0x6a,0x7d
diff --git a/kvmd/keyboard/mappings.py b/kvmd/keyboard/mappings.py
index 1b855cd0..9608dbab 100644
--- a/kvmd/keyboard/mappings.py
+++ b/kvmd/keyboard/mappings.py
@@ -150,6 +150,7 @@ KEYMAP: Dict[str, Key] = {
"NumpadDecimal": Key(mcu=McuKey(code=104), otg=OtgKey(code=99, is_modifier=False)),
"Power": Key(mcu=McuKey(code=105), otg=OtgKey(code=102, is_modifier=False)),
"IntlBackslash": Key(mcu=McuKey(code=106), otg=OtgKey(code=100, is_modifier=False)),
+ "IntlYen": Key(mcu=McuKey(code=107), otg=OtgKey(code=137, is_modifier=False)),
}
@@ -436,6 +437,7 @@ AT1_TO_WEB = {
86: "IntlBackslash",
87: "F11",
88: "F12",
+ 125: "IntlYen",
57372: "NumpadEnter",
57373: "ControlRight",
57397: "NumpadDivide",
diff --git a/web/kvm/index.html b/web/kvm/index.html
index f05af711..cba06ec0 100644
--- a/web/kvm/index.html
+++ b/web/kvm/index.html
@@ -951,7 +951,10 @@
<div class="keypad-block">
<div class="keypad-row">
<div class="empty-key"></div>
- <div class="empty-key"></div>
+ <div class="key small" data-code="IntlYen">
+ <div class="label">Yen
+ </div>
+ </div>
<div class="key small" data-code="IntlBackslash">
<div class="label">N/US
</div>
diff --git a/web/kvm/window-keyboard.pug b/web/kvm/window-keyboard.pug
index 95322f2b..2df36b3b 100644
--- a/web/kvm/window-keyboard.pug
+++ b/web/kvm/window-keyboard.pug
@@ -98,7 +98,7 @@ div(id="keyboard-window" class="window" data-show-by-button="show-keyboard-butto
div(class="keypad-block")
div(class="keypad-row")
+empty_key()
- +empty_key()
+ +key("IntlYen", "small") Yen
+key("IntlBackslash", "small") N/US
+key("Power", "small") PWR
hr