chrome_kb.h (263936) | chrome_kb.h (266872) |
---|---|
1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2014 Ruslan Bukin <br@bsdpad.com> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/arm/samsung/exynos/chrome_kb.h 263936 2014-03-30 15:22:36Z br $ | 26 * $FreeBSD: head/sys/arm/samsung/exynos/chrome_kb.h 266872 2014-05-30 06:45:50Z br $ |
27 */ 28 | 27 */ 28 |
29#include <dev/ofw/openfirm.h> 30 |
|
29void ckb_ec_intr(void *); 30 | 31void ckb_ec_intr(void *); 32 |
31struct key { 32 uint8_t row; 33 uint8_t col; 34 uint8_t key; 35}; 36 | |
37#define KEYMAP_LEN 75 38 | 33#define KEYMAP_LEN 75 34 |
39struct key keymap[KEYMAP_LEN] = { 40 { 0x00, 0x01, 0x7d }, /* lmeta */ 41 { 0x00, 0x02, 0x3b }, /* F1 */ 42 { 0x00, 0x03, 0x30 }, /* B */ 43 { 0x00, 0x04, 0x44 }, /* F10 */ 44 { 0x00, 0x06, 0x31 }, /* N */ 45 { 0x00, 0x08, 0x0d }, /* = */ 46 { 0x00, 0x0a, 0x64 }, /* ralt */ | 35pcell_t default_keymap[KEYMAP_LEN] = { 36 0x0001007d, /* lmeta */ 37 0x0002003b, /* F1 */ 38 0x00030030, /* B */ 39 0x00040044, /* F10 */ 40 0x00060031, /* N */ 41 0x0008000d, /* = */ 42 0x000a0064, /* ralt */ |
47 | 43 |
48 { 0x01, 0x01, 0x01 }, /* escape */ 49 { 0x01, 0x02, 0x3e }, /* F4 */ 50 { 0x01, 0x03, 0x22 }, /* G */ 51 { 0x01, 0x04, 0x41 }, /* F7 */ 52 { 0x01, 0x06, 0x23 }, /* H */ 53 { 0x01, 0x08, 0x28 }, /* ' */ 54 { 0x01, 0x09, 0x43 }, /* F9 */ 55 { 0x01, 0x0b, 0x0e }, /* backspace */ | 44 0x01010001, /* escape */ 45 0x0102003e, /* F4 */ 46 0x01030022, /* G */ 47 0x01040041, /* F7 */ 48 0x01060023, /* H */ 49 0x01080028, /* ' */ 50 0x01090043, /* F9 */ 51 0x010b000e, /* backspace */ |
56 | 52 |
57 { 0x02, 0x00, 0x1d }, /* lctrl */ 58 { 0x02, 0x01, 0x0f }, /* tab */ 59 { 0x02, 0x02, 0x3d }, /* F3 */ 60 { 0x02, 0x03, 0x14 }, /* t */ 61 { 0x02, 0x04, 0x40 }, /* F6 */ 62 { 0x02, 0x05, 0x1b }, /* ] */ 63 { 0x02, 0x06, 0x15 }, /* y */ 64 { 0x02, 0x07, 0x56 }, /* 102nd */ 65 { 0x02, 0x08, 0x1a }, /* [ */ 66 { 0x02, 0x09, 0x42 }, /* F8 */ | 53 0x0200001d, /* lctrl */ 54 0x0201000f, /* tab */ 55 0x0202003d, /* F3 */ 56 0x02030014, /* t */ 57 0x02040040, /* F6 */ 58 0x0205001b, /* ] */ 59 0x02060015, /* y */ 60 0x02070056, /* 102nd */ 61 0x0208001a, /* [ */ 62 0x02090042, /* F8 */ |
67 | 63 |
68 { 0x03, 0x01, 0x29 }, /* grave */ 69 { 0x03, 0x02, 0x3c }, /* F2 */ 70 { 0x03, 0x03, 0x06 }, /* 5 */ 71 { 0x03, 0x04, 0x3f }, /* F5 */ 72 { 0x03, 0x06, 0x07 }, /* 6 */ 73 { 0x03, 0x08, 0x0c }, /* - */ 74 { 0x03, 0x0b, 0x2b }, /* \ */ | 64 0x03010029, /* grave */ 65 0x0302003c, /* F2 */ 66 0x03030006, /* 5 */ 67 0x0304003f, /* F5 */ 68 0x03060007, /* 6 */ 69 0x0308000c, /* - */ 70 0x030b002b, /* \ */ |
75 | 71 |
76 { 0x04, 0x00, 0x61 }, /* rctrl */ 77 { 0x04, 0x01, 0x1e }, /* a */ 78 { 0x04, 0x02, 0x20 }, /* d */ 79 { 0x04, 0x03, 0x21 }, /* f */ 80 { 0x04, 0x04, 0x1f }, /* s */ 81 { 0x04, 0x05, 0x25 }, /* k */ 82 { 0x04, 0x06, 0x24 }, /* j */ 83 { 0x04, 0x08, 0x27 }, /* ; */ 84 { 0x04, 0x09, 0x26 }, /* l */ 85 { 0x04, 0x0a, 0x2b }, /* \ */ 86 { 0x04, 0x0b, 0x1c }, /* enter */ | 72 0x04000061, /* rctrl */ 73 0x0401001e, /* a */ 74 0x04020020, /* d */ 75 0x04030021, /* f */ 76 0x0404001f, /* s */ 77 0x04050025, /* k */ 78 0x04060024, /* j */ 79 0x04080027, /* ; */ 80 0x04090026, /* l */ 81 0x040a002b, /* \ */ 82 0x040b001c, /* enter */ |
87 | 83 |
88 { 0x05, 0x01, 0x2c }, /* z */ 89 { 0x05, 0x02, 0x2e }, /* c */ 90 { 0x05, 0x03, 0x2f }, /* v */ 91 { 0x05, 0x04, 0x2d }, /* x */ 92 { 0x05, 0x05, 0x33 }, /* , */ 93 { 0x05, 0x06, 0x32 }, /* m */ 94 { 0x05, 0x07, 0x2a }, /* lsh */ 95 { 0x05, 0x08, 0x35 }, /* / */ 96 { 0x05, 0x09, 0x34 }, /* . */ 97 { 0x05, 0x0B, 0x39 }, /* space */ | 84 0x0501002c, /* z */ 85 0x0502002e, /* c */ 86 0x0503002f, /* v */ 87 0x0504002d, /* x */ 88 0x05050033, /* , */ 89 0x05060032, /* m */ 90 0x0507002a, /* lsh */ 91 0x05080035, /* / */ 92 0x05090034, /* . */ 93 0x050B0039, /* space */ |
98 | 94 |
99 { 0x06, 0x01, 0x02 }, /* 1 */ 100 { 0x06, 0x02, 0x04 }, /* 3 */ 101 { 0x06, 0x03, 0x05 }, /* 4 */ 102 { 0x06, 0x04, 0x03 }, /* 2 */ 103 { 0x06, 0x05, 0x09 }, /* 8 */ 104 { 0x06, 0x06, 0x08 }, /* 7 */ 105 { 0x06, 0x08, 0x0b }, /* 0 */ 106 { 0x06, 0x09, 0x0a }, /* 9 */ 107 { 0x06, 0x0a, 0x38 }, /* lalt */ 108 { 0x06, 0x0b, 0x64 }, /* down */ 109 { 0x06, 0x0c, 0x62 }, /* right */ | 95 0x06010002, /* 1 */ 96 0x06020004, /* 3 */ 97 0x06030005, /* 4 */ 98 0x06040003, /* 2 */ 99 0x06050009, /* 8 */ 100 0x06060008, /* 7 */ 101 0x0608000b, /* 0 */ 102 0x0609000a, /* 9 */ 103 0x060a0038, /* lalt */ 104 0x060b0064, /* down */ 105 0x060c0062, /* right */ |
110 | 106 |
111 { 0x07, 0x01, 0x10 }, /* q */ 112 { 0x07, 0x02, 0x12 }, /* e */ 113 { 0x07, 0x03, 0x13 }, /* r */ 114 { 0x07, 0x04, 0x11 }, /* w */ 115 { 0x07, 0x05, 0x17 }, /* i */ 116 { 0x07, 0x06, 0x16 }, /* u */ 117 { 0x07, 0x07, 0x36 }, /* rsh */ 118 { 0x07, 0x08, 0x19 }, /* p */ 119 { 0x07, 0x09, 0x18 }, /* o */ 120 { 0x07, 0x0b, 0x5F }, /* up */ 121 { 0x07, 0x0c, 0x61 }, /* left */ | 107 0x07010010, /* q */ 108 0x07020012, /* e */ 109 0x07030013, /* r */ 110 0x07040011, /* w */ 111 0x07050017, /* i */ 112 0x07060016, /* u */ 113 0x07070036, /* rsh */ 114 0x07080019, /* p */ 115 0x07090018, /* o */ 116 0x070b005F, /* up */ 117 0x070c0061, /* left */ |
122}; | 118}; |