diff options
| author | marksard <38324387+marksard@users.noreply.github.com> | 2018-08-08 13:05:35 +0900 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2018-08-07 21:05:35 -0700 |
| commit | 619b5d1e6d40c37eb77036158b8f2b99d673e2ba (patch) | |
| tree | 68208ac8ab4e4106c6085bb4c175a945972f5e2e | |
| parent | 69fef83b0ea6dde3d20e2b239f8a7b54c42ddb12 (diff) | |
| download | qmk_firmware-619b5d1e6d40c37eb77036158b8f2b99d673e2ba.tar.gz qmk_firmware-619b5d1e6d40c37eb77036158b8f2b99d673e2ba.zip | |
Keymap: add like jis(iso) layout keymap for crkbd (#3562)
* add like jis(iso) layout keymap for crkbd
* Modified code by review.
| -rw-r--r-- | keyboards/crkbd/keymaps/like_jis/config.h | 49 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/like_jis/glcdfont.c | 244 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/like_jis/keymap.c | 229 | ||||
| -rw-r--r-- | keyboards/crkbd/keymaps/like_jis/rules.mk | 21 |
4 files changed, 543 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/like_jis/config.h b/keyboards/crkbd/keymaps/like_jis/config.h new file mode 100644 index 000000000..4c31cc779 --- /dev/null +++ b/keyboards/crkbd/keymaps/like_jis/config.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /* | ||
| 2 | This is the c configuration file for the keymap | ||
| 3 | |||
| 4 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 5 | Copyright 2015 Jack Humbert | ||
| 6 | |||
| 7 | This program is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 2 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | This program is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #pragma once | ||
| 22 | |||
| 23 | /* Use I2C or Serial */ | ||
| 24 | |||
| 25 | #define USE_I2C | ||
| 26 | #define USE_SERIAL | ||
| 27 | //#define USE_MATRIX_I2C | ||
| 28 | |||
| 29 | /* Select hand configuration */ | ||
| 30 | |||
| 31 | #define MASTER_LEFT | ||
| 32 | // #define MASTER_RIGHT | ||
| 33 | // #define EE_HANDS | ||
| 34 | |||
| 35 | #define SSD1306OLED | ||
| 36 | |||
| 37 | #define USE_SERIAL_PD2 | ||
| 38 | |||
| 39 | #define PREVENT_STUCK_MODIFIERS | ||
| 40 | #define TAPPING_FORCE_HOLD | ||
| 41 | #define TAPPING_TERM 150 | ||
| 42 | |||
| 43 | #undef RGBLED_NUM | ||
| 44 | #define RGBLIGHT_ANIMATIONS | ||
| 45 | #define RGBLED_NUM 27 | ||
| 46 | #define RGBLIGHT_LIMIT_VAL 120 | ||
| 47 | #define RGBLIGHT_HUE_STEP 10 | ||
| 48 | #define RGBLIGHT_SAT_STEP 17 | ||
| 49 | #define RGBLIGHT_VAL_STEP 17 | ||
diff --git a/keyboards/crkbd/keymaps/like_jis/glcdfont.c b/keyboards/crkbd/keymaps/like_jis/glcdfont.c new file mode 100644 index 000000000..4e7b27bc0 --- /dev/null +++ b/keyboards/crkbd/keymaps/like_jis/glcdfont.c | |||
| @@ -0,0 +1,244 @@ | |||
| 1 | // This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. | ||
| 2 | // See gfxfont.h for newer custom bitmap font info. | ||
| 3 | |||
| 4 | #ifndef FONT5X7_H | ||
| 5 | #define FONT5X7_H | ||
| 6 | |||
| 7 | #ifdef __AVR__ | ||
| 8 | #include <avr/io.h> | ||
| 9 | #include <avr/pgmspace.h> | ||
| 10 | #elif defined(ESP8266) | ||
| 11 | #include <pgmspace.h> | ||
| 12 | #else | ||
| 13 | #define PROGMEM | ||
| 14 | #endif | ||
| 15 | |||
| 16 | // Standard ASCII 5x7 font | ||
| 17 | |||
| 18 | static const unsigned char font[] PROGMEM = { | ||
| 19 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 20 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | ||
| 21 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | ||
| 22 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | ||
| 23 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | ||
| 24 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | ||
| 25 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | ||
| 26 | 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | ||
| 27 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | ||
| 28 | 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | ||
| 29 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | ||
| 30 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | ||
| 31 | 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | ||
| 32 | 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | ||
| 33 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | ||
| 34 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, | ||
| 35 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | ||
| 36 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | ||
| 37 | 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | ||
| 38 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | ||
| 39 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | ||
| 40 | 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | ||
| 41 | 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | ||
| 42 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | ||
| 43 | 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | ||
| 44 | 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | ||
| 45 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | ||
| 46 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | ||
| 47 | 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
| 48 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | ||
| 49 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | ||
| 50 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | ||
| 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 52 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, | ||
| 53 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, | ||
| 54 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, | ||
| 55 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | ||
| 56 | 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, | ||
| 57 | 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, | ||
| 58 | 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, | ||
| 59 | 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, | ||
| 60 | 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, | ||
| 61 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, | ||
| 62 | 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | ||
| 63 | 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, | ||
| 64 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | ||
| 65 | 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | ||
| 66 | 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | ||
| 67 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, | ||
| 68 | 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, | ||
| 69 | 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, | ||
| 70 | 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, | ||
| 71 | 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, | ||
| 72 | 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, | ||
| 73 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, | ||
| 74 | 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, | ||
| 75 | 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 76 | 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, | ||
| 77 | 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | ||
| 78 | 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | ||
| 79 | 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 80 | 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | ||
| 81 | 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, | ||
| 82 | 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, | ||
| 83 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | ||
| 84 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, | ||
| 85 | 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 86 | 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, | ||
| 87 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 88 | 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, | ||
| 89 | 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, | ||
| 90 | 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, | ||
| 91 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, | ||
| 92 | 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, | ||
| 93 | 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, | ||
| 94 | 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 95 | 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 96 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, | ||
| 97 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, | ||
| 98 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 99 | 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, | ||
| 100 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, | ||
| 101 | 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, | ||
| 102 | 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, | ||
| 103 | 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, | ||
| 104 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, | ||
| 105 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, | ||
| 106 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, | ||
| 107 | 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, | ||
| 108 | 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, | ||
| 109 | 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, | ||
| 110 | 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, | ||
| 111 | 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | ||
| 112 | 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, | ||
| 113 | 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, | ||
| 114 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 115 | 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, | ||
| 116 | 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, | ||
| 117 | 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, | ||
| 118 | 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, | ||
| 119 | 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, | ||
| 120 | 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, | ||
| 121 | 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, | ||
| 122 | 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, | ||
| 123 | 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 124 | 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, | ||
| 125 | 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, | ||
| 126 | 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, | ||
| 127 | 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, | ||
| 128 | 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | ||
| 129 | 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 130 | 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | ||
| 131 | 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, | ||
| 132 | 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, | ||
| 133 | 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | ||
| 134 | 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | ||
| 135 | 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, | ||
| 136 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, | ||
| 137 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | ||
| 138 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | ||
| 139 | 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | ||
| 140 | 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, | ||
| 141 | 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | ||
| 142 | 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, | ||
| 143 | 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, | ||
| 144 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, | ||
| 145 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, | ||
| 146 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | ||
| 147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 148 | 0x00, 0x00, 0x0E, 0x3F, 0xFF, 0xFF, | ||
| 149 | 0xFF, 0xFF, 0xFE, 0xE0, 0x80, 0x00, | ||
| 150 | 0x00, 0x00, 0x00, 0x00, 0x1E, 0xBE, | ||
| 151 | 0x7F, 0xFF, 0xFF, 0xFE, 0xFE, 0xF0, | ||
| 152 | 0xE0, 0xC0, 0x80, 0x00, 0x0E, 0xEF, | ||
| 153 | 0xDF, 0xDE, 0xBE, 0x3C, 0x38, 0x70, | ||
| 154 | 0xE0, 0xDD, 0xBB, 0x7B, 0x07, 0x0E, | ||
| 155 | 0x0E, 0x0C, 0x98, 0xF0, 0xE0, 0xF0, | ||
| 156 | 0xF0, 0xF8, 0x78, 0x3C, 0x1C, 0x1E, | ||
| 157 | 0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x0F, | ||
| 158 | 0x1F, 0xFE, 0xFE, 0xF8, 0x00, 0x00, | ||
| 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 163 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 164 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 166 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 168 | 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, | ||
| 169 | 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, | ||
| 170 | 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, | ||
| 171 | 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 172 | 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, | ||
| 173 | 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, | ||
| 174 | 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, | ||
| 175 | 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, | ||
| 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 178 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 179 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 180 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, | ||
| 181 | 0x0F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFE, | ||
| 182 | 0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x7F, | ||
| 183 | 0xFF, 0xFE, 0xFD, 0xFB, 0x1B, 0x07, | ||
| 184 | 0x07, 0x0F, 0x1F, 0x1F, 0x1E, 0x1D, | ||
| 185 | 0x0B, 0x07, 0x01, 0x00, 0x00, 0x00, | ||
| 186 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, | ||
| 187 | 0xF8, 0xFE, 0xFF, 0xFF, 0x1F, 0x07, | ||
| 188 | 0x01, 0x01, 0x01, 0x03, 0x06, 0x06, | ||
| 189 | 0x0C, 0x0C, 0x08, 0x0C, 0x0C, 0x0E, | ||
| 190 | 0x07, 0x83, 0xC1, 0xE0, 0x70, 0x30, | ||
| 191 | 0x18, 0x1C, 0x7C, 0xCC, 0x8C, 0xDC, | ||
| 192 | 0xF8, 0xC0, 0xE0, 0xE0, 0x70, 0xB8, | ||
| 193 | 0xF0, 0x60, 0x00, 0x00, 0x80, 0xC0, | ||
| 194 | 0xE0, 0xF0, 0x70, 0xF8, 0xFC, 0xFC, | ||
| 195 | 0x3C, 0x30, 0x38, 0xF8, 0xF8, 0xF8, | ||
| 196 | 0x78, 0x00, 0x80, 0x80, 0xC0, 0xE0, | ||
| 197 | 0x70, 0x38, 0x38, 0x9C, 0xDC, 0xFC, | ||
| 198 | 0x7C, 0x38, 0x00, 0x00, 0x00, 0x00, | ||
| 199 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 200 | 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 201 | 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, | ||
| 202 | 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, | ||
| 203 | 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 204 | 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, | ||
| 205 | 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, | ||
| 206 | 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, | ||
| 207 | 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, | ||
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 210 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 212 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 213 | 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, | ||
| 214 | 0x1F, 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 215 | 0x7E, 0x7D, 0x3B, 0x17, 0x00, 0x00, | ||
| 216 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 217 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, | ||
| 219 | 0x0F, 0x1F, 0x3F, 0x3F, 0x7E, 0x7C, | ||
| 220 | 0x78, 0x70, 0x70, 0x70, 0x70, 0x70, | ||
| 221 | 0x70, 0x78, 0x38, 0x18, 0x1C, 0x0E, | ||
| 222 | 0x07, 0x0F, 0x1F, 0x3F, 0x3C, 0x38, | ||
| 223 | 0x38, 0x18, 0x0C, 0x06, 0x03, 0x01, | ||
| 224 | 0x01, 0x01, 0x01, 0x0E, 0x1F, 0x1F, | ||
| 225 | 0x1C, 0x1C, 0x1E, 0x0F, 0x0F, 0x03, | ||
| 226 | 0x1D, 0x0E, 0x07, 0x03, 0x01, 0x00, | ||
| 227 | 0x00, 0x0E, 0x1F, 0x1F, 0x1D, 0x1E, | ||
| 228 | 0x0F, 0x07, 0x03, 0x03, 0x0F, 0x1F, | ||
| 229 | 0x1F, 0x19, 0x19, 0x19, 0x19, 0x0C, | ||
| 230 | 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 237 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 238 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 241 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 242 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 243 | }; | ||
| 244 | #endif // FONT5X7_H | ||
diff --git a/keyboards/crkbd/keymaps/like_jis/keymap.c b/keyboards/crkbd/keymaps/like_jis/keymap.c new file mode 100644 index 000000000..0dd9c1550 --- /dev/null +++ b/keyboards/crkbd/keymaps/like_jis/keymap.c | |||
| @@ -0,0 +1,229 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "bootloader.h" | ||
| 3 | #ifdef PROTOCOL_LUFA | ||
| 4 | #include "lufa.h" | ||
| 5 | #include "split_util.h" | ||
| 6 | #endif | ||
| 7 | #ifdef SSD1306OLED | ||
| 8 | #include "ssd1306.h" | ||
| 9 | #endif | ||
| 10 | |||
| 11 | #include "../lib/mode_icon_reader.c" | ||
| 12 | #include "../lib/layer_state_reader.c" | ||
| 13 | #include "../lib/host_led_state_reader.c" | ||
| 14 | #include "../lib/logo_reader.c" | ||
| 15 | #include "../lib/keylogger.c" | ||
| 16 | #include "../lib/timelogger.c" | ||
| 17 | |||
| 18 | extern keymap_config_t keymap_config; | ||
| 19 | |||
| 20 | #ifdef RGBLIGHT_ENABLE | ||
| 21 | //Following line allows macro to read current RGB settings | ||
| 22 | extern rgblight_config_t rgblight_config; | ||
| 23 | #endif | ||
| 24 | |||
| 25 | extern uint8_t is_master; | ||
| 26 | |||
| 27 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 28 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 29 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 30 | // entirely and just use numbers. | ||
| 31 | #define _QWERTY 0 | ||
| 32 | #define _LOWER 3 | ||
| 33 | #define _RAISE 4 | ||
| 34 | #define _ADJUST 16 | ||
| 35 | |||
| 36 | enum custom_keycodes { | ||
| 37 | LOWER = SAFE_RANGE, | ||
| 38 | RAISE, | ||
| 39 | ADJUST, | ||
| 40 | RGBRST | ||
| 41 | }; | ||
| 42 | |||
| 43 | #define KC______ KC_TRNS | ||
| 44 | #define KC_XXXXX KC_NO | ||
| 45 | #define KC_KANJI KC_GRV | ||
| 46 | |||
| 47 | #define KC_LOWER LOWER | ||
| 48 | #define KC_RAISE RAISE | ||
| 49 | |||
| 50 | #define KC_RST RESET | ||
| 51 | |||
| 52 | #define KC_LRST RGBRST | ||
| 53 | #define KC_LTOG RGB_TOG | ||
| 54 | #define KC_LHUI RGB_HUI | ||
| 55 | #define KC_LHUD RGB_HUD | ||
| 56 | #define KC_LSAI RGB_SAI | ||
| 57 | #define KC_LSAD RGB_SAD | ||
| 58 | #define KC_LVAI RGB_VAI | ||
| 59 | #define KC_LVAD RGB_VAD | ||
| 60 | #define KC_LSMOD RGB_SMOD | ||
| 61 | |||
| 62 | #define KC_KNRM AG_NORM | ||
| 63 | #define KC_KSWP AG_SWAP | ||
| 64 | #define KC_GUAP LALT_T(KC_APP) | ||
| 65 | |||
| 66 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 67 | [_QWERTY] = LAYOUT_kc( \ | ||
| 68 | //,-----------------------------------------. ,-----------------------------------------. | ||
| 69 | ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\ | ||
| 70 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 71 | LSFT, A, S, D, F, G, H, J, K, L, UP, ENT,\ | ||
| 72 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 73 | LCTRL, Z, X, C, V, B, N, M, COMM, LEFT, DOWN, RGHT,\ | ||
| 74 | //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| | ||
| 75 | LGUI, LOWER, BSPC, SPC, RAISE, GUAP \ | ||
| 76 | //`--------------------' `--------------------' | ||
| 77 | ), | ||
| 78 | |||
| 79 | [_LOWER] = LAYOUT_kc( \ | ||
| 80 | //,-----------------------------------------. ,-----------------------------------------. | ||
| 81 | TAB, F1, F2, F3, F4, F5, XXXXX, MINS, EQL, JYEN, LBRC, RBRC,\ | ||
| 82 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 83 | _____, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, SCLN, QUOT, BSLS,\ | ||
| 84 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 85 | _____, F11, F12, XXXXX, KANJI, ENT, XXXXX, XXXXX, COMM, DOT, SLSH, RO,\ | ||
| 86 | //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| | ||
| 87 | _____, _____, DEL, XXXXX, _____, APP \ | ||
| 88 | //`--------------------' `--------------------' | ||
| 89 | ), | ||
| 90 | |||
| 91 | [_RAISE] = LAYOUT_kc( \ | ||
| 92 | //,-----------------------------------------. ,-----------------------------------------. | ||
| 93 | _____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, XXXXX,\ | ||
| 94 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 95 | _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 4, 5, 6, QUOT, XXXXX,\ | ||
| 96 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 97 | _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 0, 1, 2, 3, DOT, XXXXX,\ | ||
| 98 | //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| | ||
| 99 | _____, _____, XXXXX, XXXXX, _____, LALT \ | ||
| 100 | //`--------------------' `--------------------' | ||
| 101 | ), | ||
| 102 | |||
| 103 | [_ADJUST] = LAYOUT_kc( \ | ||
| 104 | //,-----------------------------------------. ,-----------------------------------------. | ||
| 105 | RST, LRST, KNRM, KSWP, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ | ||
| 106 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 107 | LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, PGUP, XXXXX,\ | ||
| 108 | //|------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 109 | LSMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, HOME, PGDN, END,\ | ||
| 110 | //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| | ||
| 111 | _____, _____, XXXXX, XXXXX, _____, XXXXX \ | ||
| 112 | //`--------------------' `--------------------' | ||
| 113 | ) | ||
| 114 | }; | ||
| 115 | |||
| 116 | int RGB_current_mode; | ||
| 117 | |||
| 118 | // Setting ADJUST layer RGB back to default | ||
| 119 | inline void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { | ||
| 120 | if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { | ||
| 121 | layer_on(layer3); | ||
| 122 | } else { | ||
| 123 | layer_off(layer3); | ||
| 124 | } | ||
| 125 | } | ||
| 126 | |||
| 127 | void matrix_init_user(void) { | ||
| 128 | #ifdef RGBLIGHT_ENABLE | ||
| 129 | RGB_current_mode = rgblight_config.mode; | ||
| 130 | #endif | ||
| 131 | //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h | ||
| 132 | #ifdef SSD1306OLED | ||
| 133 | iota_gfx_init(!has_usb()); // turns on the display | ||
| 134 | #endif | ||
| 135 | } | ||
| 136 | |||
| 137 | //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h | ||
| 138 | #ifdef SSD1306OLED | ||
| 139 | |||
| 140 | void matrix_scan_user(void) { | ||
| 141 | iota_gfx_task(); | ||
| 142 | } | ||
| 143 | |||
| 144 | inline void matrix_render_user(struct CharacterMatrix *matrix) { | ||
| 145 | if (is_master) { | ||
| 146 | matrix_write_ln(matrix, read_layer_state()); | ||
| 147 | matrix_write_ln(matrix, read_keylog()); | ||
| 148 | matrix_write_ln(matrix, read_keylogs()); | ||
| 149 | //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); | ||
| 150 | //matrix_write_ln(matrix, read_host_led_state()); | ||
| 151 | //matrix_write_ln(matrix, read_timelog()); | ||
| 152 | } else { | ||
| 153 | matrix_write(matrix, read_logo()); | ||
| 154 | } | ||
| 155 | } | ||
| 156 | |||
| 157 | inline void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { | ||
| 158 | if (memcmp(dest->display, source->display, sizeof(dest->display))) { | ||
| 159 | memcpy(dest->display, source->display, sizeof(dest->display)); | ||
| 160 | dest->dirty = true; | ||
| 161 | } | ||
| 162 | } | ||
| 163 | |||
| 164 | void iota_gfx_task_user(void) { | ||
| 165 | struct CharacterMatrix matrix; | ||
| 166 | matrix_clear(&matrix); | ||
| 167 | matrix_render_user(&matrix); | ||
| 168 | matrix_update(&display, &matrix); | ||
| 169 | } | ||
| 170 | |||
| 171 | #endif | ||
| 172 | |||
| 173 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 174 | #ifdef SSD1306OLED | ||
| 175 | if (record->event.pressed) { | ||
| 176 | set_keylog(keycode, record); | ||
| 177 | set_timelog(); | ||
| 178 | } | ||
| 179 | #endif | ||
| 180 | |||
| 181 | switch (keycode) { | ||
| 182 | case LOWER: | ||
| 183 | if (record->event.pressed) { | ||
| 184 | layer_on(_LOWER); | ||
| 185 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
| 186 | } else { | ||
| 187 | layer_off(_LOWER); | ||
| 188 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
| 189 | } | ||
| 190 | break; | ||
| 191 | case RAISE: | ||
| 192 | if (record->event.pressed) { | ||
| 193 | layer_on(_RAISE); | ||
| 194 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
| 195 | } else { | ||
| 196 | layer_off(_RAISE); | ||
| 197 | update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); | ||
| 198 | } | ||
| 199 | break; | ||
| 200 | case ADJUST: | ||
| 201 | if (record->event.pressed) { | ||
| 202 | layer_on(_ADJUST); | ||
| 203 | } else { | ||
| 204 | layer_off(_ADJUST); | ||
| 205 | } | ||
| 206 | break; | ||
| 207 | |||
| 208 | #ifdef RGBLIGHT_ENABLE | ||
| 209 | case RGB_MOD: | ||
| 210 | if (record->event.pressed) { | ||
| 211 | rgblight_mode(RGB_current_mode); | ||
| 212 | rgblight_step(); | ||
| 213 | RGB_current_mode = rgblight_config.mode; | ||
| 214 | } | ||
| 215 | break; | ||
| 216 | case RGBRST: | ||
| 217 | if (record->event.pressed) { | ||
| 218 | eeconfig_update_rgblight_default(); | ||
| 219 | rgblight_enable(); | ||
| 220 | RGB_current_mode = rgblight_config.mode; | ||
| 221 | } | ||
| 222 | break; | ||
| 223 | #endif | ||
| 224 | default: | ||
| 225 | return true; | ||
| 226 | } | ||
| 227 | |||
| 228 | return false; | ||
| 229 | } | ||
diff --git a/keyboards/crkbd/keymaps/like_jis/rules.mk b/keyboards/crkbd/keymaps/like_jis/rules.mk new file mode 100644 index 000000000..3f1bd9108 --- /dev/null +++ b/keyboards/crkbd/keymaps/like_jis/rules.mk | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | |||
| 2 | # Build Options | ||
| 3 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 4 | # the appropriate keymap folder that will get included automatically | ||
| 5 | # | ||
| 6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 7 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 8 | EXTRAKEY_ENABLE = no # Audio control and System control(+450) | ||
| 9 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 10 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 11 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 13 | MIDI_ENABLE = no # MIDI controls | ||
| 14 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 15 | UNICODE_ENABLE = no # Unicode | ||
| 16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 17 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 18 | SWAP_HANDS_ENABLE = no # Enable one-hand typing | ||
| 19 | |||
| 20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
