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