From 193660c520f929891d016d936b8ad63b99c20e74 Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 21 Dec 2020 15:35:44 +0900 Subject: [PATCH] ibmpc_usb: Fix comment of scan code mapping --- converter/ibmpc_usb/unimap_trans.h | 88 ++++++++++++++++++------------ 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/converter/ibmpc_usb/unimap_trans.h b/converter/ibmpc_usb/unimap_trans.h index 21819002..97472b7b 100644 --- a/converter/ibmpc_usb/unimap_trans.h +++ b/converter/ibmpc_usb/unimap_trans.h @@ -25,30 +25,9 @@ along with this program. If not, see . -/* Mapping to Universal keyboard layout - * - * Universal keyboard layout - * ,-----------------------------------------------. - * |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24| - * ,---. |-----------------------------------------------| ,-----------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut| - * `---' `-----------------------------------------------' `-----------' `-----------' - * ,-----------------------------------------------------------. ,-----------. ,---------------. - * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| - * |-----------------------------------------------------------| |-----------| |---------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| - * |-----------------------------------------------------------| `-----------' |---------------| - * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| ^a|Retn| | 4| 5| 6|KP,| - * |-----------------------------------------------------------| ,---. |---------------| - * |Shft| <| Z| X| C| V| B| N| M| ,| .| /| RO|Shift | |Up | | 1| 2| 3|KP=| - * |-----------------------------------------------------------| ,-----------. |---------------| - * |Ctl|Gui|Alt|MHEN| Space |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | #| 0| .|Ent| - * `-----------------------------------------------------------' `-----------' `---------------' - */ - - /* * Scan Code Set 1: + * 83-key: * ,-------. ,--------------------------------------------------------------------------. * | F1| F2| |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |NumLck |ScrLck | * |-------| |--------------------------------------------------------------------------| @@ -72,8 +51,44 @@ along with this program. If not, see . * |-------| |----------------------------------------------------------------------| | * | 43| 44| | 38 | 39 | 3A | 52 | 53 | | * `-------' `--------------------------------------------------------------------------' - * [3], [a] - * unused: UNIMAP_NUBS + * Full-key: + * ,-----------------------------------------------. + * |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24| + * ,---. |-----------------------------------------------| ,-----------. ,-----------. + * |Esc| |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut| + * `---' `-----------------------------------------------' `-----------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| + * |-----------------------------------------------------------| |-----------| |---------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| + * |-----------------------------------------------------------| `-----------' |---------------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #|Entr| | 4| 5| 6|KP,| + * |-----------------------------------------------------------| ,---. |---------------| + * |Shft| ^a| Z| X| C| V| B| N| M| ,| .| /| RO|Shift | |Up | | 1| 2| 3|Ent| + * |-----------------------------------------------------------| ,-----------. |---------------| + * |Ctl|Gui|Alt|MHEN| Space |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|KP=| + * `-----------------------------------------------------------' `-----------' `---------------' + * ,-----------------------------------------------. + * | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E| 76| + * ,---. |-----------------------------------------------| ,-----------. ,-----------. + * | 01| | 3B| 3C| 3D| 3E| 3F| 40| 41| 42| 43| 44| 57| 58| |*37| 46|*46| |*2E|*30|*20| + * `---' `-----------------------------------------------' `-----------' `-----------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. + * | 29| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 7D| 0E| |*52|*47|*49| | 45|*35| 37| 4A| + * |-----------------------------------------------------------| |-----------| |---------------| + * | 0F | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 2B | |*53|*4F|*51| | 47| 48| 49| 4E| + * |-----------------------------------------------------------| `-----------' |---------------| + * | 3A | 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 56| 1C | | 4B| 4C| 4D| 7E| + * |-----------------------------------------------------------| ,---. |---------------| + * | 2A | ^a| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 73| 36 | |*48| | 4F| 50| 51|*1C| + * |-----------------------------------------------------------| ,-----------. |---------------| + * | 1D|*5B| 38| 7B | 39 | 79 | 70 |*38|*5C|*5D|*1D| |*4B|*50|*4D| | 52| 53| 59| + * `-----------------------------------------------------------' `-----------' `---------------' + * *: E0-prefixed codes. See cs1_e0code() for remapping to unimap array. + * PrintScreen: E0 37 or 54(with Alt) -> 54 + * Pause: E1 1D 45 or E0 46(with Ctrl) -> 55 + * ^a: ISO backslash and US backslash use identical code 2B. [3], [a] + * Unsupported codes or error -> 00. UNIMAP_NUBS is unused. */ const uint8_t PROGMEM unimap_cs1[MATRIX_ROWS][MATRIX_COLS] = { { UNIMAP_NO, UNIMAP_ESC, UNIMAP_1, UNIMAP_2, UNIMAP_3, UNIMAP_4, UNIMAP_5, UNIMAP_6 }, /* 00-07 */ @@ -130,9 +145,9 @@ const uint8_t PROGMEM unimap_cs1[MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------| ,-----------. |---------------| * | 14|*1F| 11| 67 | 29 | 64 | 13 |*11|*27|*2F|*14| |*6B|*72|*74| | 68| 70| 71| 63| * `-----------------------------------------------------------' `-----------' `---------------' - * *: E0-prefixed codes + * *: E0-prefixed codes. See cs2_e0code() for remapping to unimap array. * +: Special codes sequence - * ^a: ISO hash key uses identical scancode 5D to US backslash. + * ^a: ISO hash key and US backslash use identical code 5D. * 51, 63, 68, 6A, 6D: Hidden keys in IBM model M [6] */ const uint8_t PROGMEM unimap_cs2[MATRIX_ROWS][MATRIX_COLS] = { @@ -163,16 +178,16 @@ const uint8_t PROGMEM unimap_cs2[MATRIX_ROWS][MATRIX_COLS] = { * |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| * `-----------------------------------------------' * ,-------. ,-----------------------------------------------------------. ,-----------. ,---------------. - * |Mut|Hkn| | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY| BS| | /|PgU|PgD| |Esc|NmL|ScL| *| + * |Mut|HEN| | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY| BS| | /|PgU|PgD| |Esc|NmL|ScL| *| * |-------| |-----------------------------------------------------------| |-----------| |---------------| - * |VoU|Pau| |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |End|Ins|Del| | 7| 8| 9| +| + * |VUp|Pau| |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |End|Ins|Del| | 7| 8| 9| +| * |-------| |-----------------------------------------------------------| `-----------' |-----------|---| - * |VoD|Mhk| |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| #| Ret| |Up | | 4| 5| 6| -| + * |VDn|MHE| |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #| Ret| |JPY|Up | #| | 4| 5| 6| -| * |-------| |-----------------------------------------------------------| ,-----------. |---------------| - * |Psc|App| |Shif| \| Z| X| C| V| B| N| M| ,| ,| /| RO| Shift| |Lef|Hom|Rig| | 1| 2| 3|Ent| + * |PrS|App| |Shif| \| Z| X| C| V| B| N| M| ,| ,| /| RO| Shift| |Lef|Hom|Rig| | 1| 2| 3|Ent| * |-------| |-----------------------------------------------------------| `-----------' |-----------|---| - * |Gui|Gui| |Ctrl| |Alt | Space |Alt | |Ctrl| |Dow| | ,| 0| .| =| - * `-------' `----' `---------------------------------------' `----' `---' `---------------' + * |Gui|Gui| |Ctrl| |Alt | Space |Alt | |Ctrl| | RO|Dow|KAN| | ,| 0| .| =| + * `-------' `----' `---------------------------------------' `----' ---`---'--- `---------------' * * ,-----------------------------------------------. * | 08| 10| 18| 20| 28| 30| 38| 40| 48| 50| 57| 5F| @@ -184,13 +199,14 @@ const uint8_t PROGMEM unimap_cs2[MATRIX_ROWS][MATRIX_COLS] = { * |-------| |-----------------------------------------------------------| |-----------| |---------------| * | 04| 0C| | 0D | 15| 1D| 24| 2D| 2C| 35| 3C| 43| 44| 4D| 54| 5B| 5C | | 64| 65| 6D| | 6C| 75| 7D| 7C| * |-------| |-----------------------------------------------------------| `-----------' |---------------| - * | 03| 0B| | 14 | 1C| 1B| 23| 2B| 34| 33| 3B| 42| 4B| 4C| 52| 53| 5A | | 63| | 6B| 73| 74| 7B| + * | 03| 0B| | 14 | 1C| 1B| 23| 2B| 34| 33| 3B| 42| 4B| 4C| 52| 53| 5A | |-26| 63|-25| | 6B| 73| 74| 7B| * |-------| |-----------------------------------------------------------| ,-----------. |---------------| * |*83| 0A| | 12 | 13| 1A| 22| 21| 2A| 32| 31| 3A| 41| 49| 4A| 51| 59 | | 61| 62| 6A| | 69| 72| 7A| 79| * |-------| |-----------------------------------------------------------| `-----------' |---------------| - * | 01| 09| | 11 | |19 | 29 |39 | | 58 | | 60| | 68| 70| 71| 78| - * `-------' `-----' `---------------------------------------' `-----' `---' `---------------' - * *: remapped 83->02, 84->7F + * | 01| 09| | 11 | |19 | 29 |39 | | 58 | |-16| 60|-1E| | 68| 70| 71| 78| + * `-------' `-----' `---------------------------------------' `-----' ---`---'--- `---------------' + * *: Special codes remapped 83->02, 84->7F + * -: G80-2551 specific 80-prefixed codes remapped: 26->5D, 25->53, 16->51, 1E->00 * 51, 5C, 5D, 68, 78: Hidden keys in IBM 122-key terminal keyboard [7] */ const uint8_t PROGMEM unimap_cs3[MATRIX_ROWS][MATRIX_COLS] = { -- 2.46.2