S3C6410支持矩阵键盘的使用,不需要做太多改动 修改的文件路径arch/arm/mach-s3c64xx/mach-smdk6410.c,把keycode改成你需要的键值static uint32_t smdk6410_keymap[] __initdata = { /* KEY(row, col, keycode) */ KEY(0, 0, KEY_1),KEY(0, 1, KEY_2), KEY(0, 2, KEY_3), KEY(0, 3, KEY_4), KEY(0, 4, KEY_5), KEY(0, 5, KEY_6),KEY(0, 6, KEY_7), KEY(0, 7, KEY_8), KEY(1, 0, KEY_9),KEY(1, 1, KEY_0), KEY(1, 2, KEY_A), KEY(1, 3, KEY_B), KEY(1, 4, KEY_C), KEY(1, 5, KEY_D),KEY(1, 6, KEY_E), KEY(1, 7, KEY_F), KEY(2, 0, KEY_G),KEY(2, 1, KEY_H), KEY(2, 2, KEY_I), KEY(2, 3, KEY_J), KEY(2, 4, KEY_K), KEY(2, 5, KEY_L),KEY(2, 6, KEY_M), KEY(2, 7, KEY_N), KEY(3, 0, KEY_O),KEY(3, 1, KEY_P), KEY(3, 2, KEY_Q), KEY(3, 3, KEY_R), KEY(3, 4, KEY_S), KEY(3, 5, KEY_T),KEY(3, 6, KEY_U), KEY(3, 7, KEY_V), KEY(4, 0, KEY_W),KEY(4, 1, KEY_X), KEY(4, 2, KEY_Y), KEY(4, 3, KEY_Z), KEY(4, 4, KEY_TAB), KEY(4, 5, KEY_BACKSPACE),KEY(4, 6, KEY_ENTER), KEY(4, 7, KEY_DOT), KEY(5, 0, KEY_SPACE),KEY(5, 1, KEY_UP), KEY(5, 2, KEY_DOWN), KEY(5, 3, KEY_LEFT), KEY(5, 4, KEY_RIGHT), KEY(5, 5, KEY_A),KEY(5, 6, KEY_B), KEY(5, 7, KEY_C), KEY(6, 0, KEY_D),KEY(6, 1, KEY_E), KEY(6, 2, KEY_F), KEY(6, 3, KEY_G), KEY(6, 4, KEY_H), KEY(6, 5, KEY_I),KEY(6, 6, KEY_J), KEY(6, 7, KEY_K), KEY(7, 0, KEY_L),KEY(7, 1, KEY_M), KEY(7, 2, KEY_N), KEY(7, 3, KEY_O), KEY(7, 4, KEY_P), KEY(7, 5, KEY_Q),KEY(7, 6, KEY_R), KEY(7, 7, KEY_S), }; |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-12-22 14:12
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.