1faf7f3fdSPhilip Chen /* SPDX-License-Identifier: GPL-2.0 */ 2faf7f3fdSPhilip Chen /* 3faf7f3fdSPhilip Chen * This header provides the constants of the standard Chrome OS key matrix 4faf7f3fdSPhilip Chen * for cros-ec keyboard-controller bindings. 5faf7f3fdSPhilip Chen * 6faf7f3fdSPhilip Chen * Copyright (c) 2021 Google, Inc 7faf7f3fdSPhilip Chen */ 8faf7f3fdSPhilip Chen 9faf7f3fdSPhilip Chen #ifndef _CROS_EC_KEYBOARD_H 10faf7f3fdSPhilip Chen #define _CROS_EC_KEYBOARD_H 11faf7f3fdSPhilip Chen 12faf7f3fdSPhilip Chen #define CROS_STD_TOP_ROW_KEYMAP \ 13faf7f3fdSPhilip Chen MATRIX_KEY(0x00, 0x02, KEY_F1) \ 14faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x02, KEY_F2) \ 15faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x02, KEY_F3) \ 16faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x02, KEY_F4) \ 17faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x04, KEY_F5) \ 18faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x04, KEY_F6) \ 19faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x04, KEY_F7) \ 20faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x09, KEY_F8) \ 21faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x09, KEY_F9) \ 22*3d283f0bSPhilip Chen MATRIX_KEY(0x00, 0x04, KEY_F10) 23faf7f3fdSPhilip Chen 24faf7f3fdSPhilip Chen #define CROS_STD_MAIN_KEYMAP \ 25faf7f3fdSPhilip Chen MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA) \ 26faf7f3fdSPhilip Chen MATRIX_KEY(0x00, 0x03, KEY_B) \ 27faf7f3fdSPhilip Chen MATRIX_KEY(0x00, 0x05, KEY_RO) \ 28faf7f3fdSPhilip Chen MATRIX_KEY(0x00, 0x06, KEY_N) \ 29faf7f3fdSPhilip Chen MATRIX_KEY(0x00, 0x08, KEY_EQUAL) \ 30faf7f3fdSPhilip Chen MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT) \ 31faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x01, KEY_ESC) \ 32faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x03, KEY_G) \ 33faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x06, KEY_H) \ 34faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE) \ 35faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE) \ 36faf7f3fdSPhilip Chen MATRIX_KEY(0x01, 0x0c, KEY_HENKAN) \ 37faf7f3fdSPhilip Chen \ 38faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL) \ 39faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x01, KEY_TAB) \ 40faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x03, KEY_T) \ 41faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE) \ 42faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x06, KEY_Y) \ 43faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x07, KEY_102ND) \ 44faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE) \ 45faf7f3fdSPhilip Chen MATRIX_KEY(0x02, 0x0a, KEY_YEN) \ 46faf7f3fdSPhilip Chen \ 47faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x00, KEY_LEFTMETA) \ 48faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x01, KEY_GRAVE) \ 49faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x03, KEY_5) \ 50faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x06, KEY_6) \ 51faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x08, KEY_MINUS) \ 52*3d283f0bSPhilip Chen MATRIX_KEY(0x03, 0x09, KEY_SLEEP) \ 53faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH) \ 54faf7f3fdSPhilip Chen MATRIX_KEY(0x03, 0x0c, KEY_MUHENKAN) \ 55faf7f3fdSPhilip Chen \ 56faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL) \ 57faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x01, KEY_A) \ 58faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x02, KEY_D) \ 59faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x03, KEY_F) \ 60faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x04, KEY_S) \ 61faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x05, KEY_K) \ 62faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x06, KEY_J) \ 63faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON) \ 64faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x09, KEY_L) \ 65faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH) \ 66faf7f3fdSPhilip Chen MATRIX_KEY(0x04, 0x0b, KEY_ENTER) \ 67faf7f3fdSPhilip Chen \ 68faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x01, KEY_Z) \ 69faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x02, KEY_C) \ 70faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x03, KEY_V) \ 71faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x04, KEY_X) \ 72faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x05, KEY_COMMA) \ 73faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x06, KEY_M) \ 74faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT) \ 75faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x08, KEY_SLASH) \ 76faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x09, KEY_DOT) \ 77faf7f3fdSPhilip Chen MATRIX_KEY(0x05, 0x0b, KEY_SPACE) \ 78faf7f3fdSPhilip Chen \ 79faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x01, KEY_1) \ 80faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x02, KEY_3) \ 81faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x03, KEY_4) \ 82faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x04, KEY_2) \ 83faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x05, KEY_8) \ 84faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x06, KEY_7) \ 85faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x08, KEY_0) \ 86faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x09, KEY_9) \ 87faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT) \ 88faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x0b, KEY_DOWN) \ 89faf7f3fdSPhilip Chen MATRIX_KEY(0x06, 0x0c, KEY_RIGHT) \ 90faf7f3fdSPhilip Chen \ 91faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x01, KEY_Q) \ 92faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x02, KEY_E) \ 93faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x03, KEY_R) \ 94faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x04, KEY_W) \ 95faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x05, KEY_I) \ 96faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x06, KEY_U) \ 97faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT) \ 98faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x08, KEY_P) \ 99faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x09, KEY_O) \ 100faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x0b, KEY_UP) \ 101faf7f3fdSPhilip Chen MATRIX_KEY(0x07, 0x0c, KEY_LEFT) 102faf7f3fdSPhilip Chen 103faf7f3fdSPhilip Chen #endif /* _CROS_EC_KEYBOARD_H */ 104