mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-27 11:38:58 +06:00
added US-International support
This commit is contained in:
parent
ce0b8ea676
commit
9895e376e7
1
keyboards/ergodox/keymaps/familiar/Makefile
Normal file
1
keyboards/ergodox/keymaps/familiar/Makefile
Normal file
@ -0,0 +1 @@
|
||||
UNIS_ENABLE = yes
|
@ -3,10 +3,12 @@
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
// Layers
|
||||
#define BASE 0 // default layer
|
||||
#define ARRW 1 // function, media, arrow keys
|
||||
#define NUMP 2 // numpad
|
||||
#define INTL 3 // international symbols
|
||||
#define INTL 1 // international symbols
|
||||
#define INSF 2 // international symbols shifted
|
||||
#define NUMP 3 // numpad
|
||||
#define ARRW 4 // function, media, arrow keys
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
@ -22,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | CLEAR | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER |
|
||||
* | MO(3) | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER |
|
||||
* |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------|
|
||||
* | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
@ -40,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME,
|
||||
KC_CLEAR, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
MO(INTL), KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END,
|
||||
KC_LCTL, KC_LGUI, KC_MENU, KC_QUOT, S(KC_QUOT),
|
||||
KC_INS, KC_ESC,
|
||||
KC_PSCR, KC_ESC,
|
||||
KC_NLCK,
|
||||
ALT_T(KC_SPC), LT(ARRW,KC_SLSH), TG(INTL),
|
||||
// right hand
|
||||
@ -57,52 +59,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(NUMP), LT(ARRW,KC_BSLS), ALT_T(KC_SPC)
|
||||
),
|
||||
|
||||
/* layer 1 : functions and arrows
|
||||
/* layer 1: International symbols, etc
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | |
|
||||
* | ´ | ¡ | ² | ³ | ¤ | € | ¼ | | ½ | ¾ | ‘ | ’ | ¥ | × | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | UP | | | | | | | | | | | INSERT |
|
||||
* | | ä | å | é | ® | þ | | | | ü | ú | í | ó | ö | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* |CAPSLOCK| | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | |
|
||||
* | | á | ß | ð | | |------| |------| | | | Ø | ° | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | |
|
||||
* |MO(INSF)| æ | | © | | | | | | ñ | µ | ç | | |MO(INSF)|
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | HOME | PGDN | END |
|
||||
* | | | | ¬ | ¿ | | « | » | | | |
|
||||
* `------------------------------------' `------------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |SYSREQ| PAUSE| | | |
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | SCRLK| | | | |
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[ARRW] = KEYMAP(
|
||||
[INTL] = KEYMAP(
|
||||
// left hand
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
_______, _______, _______, KC_UP, _______, _______, _______,
|
||||
KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
KC_SYSREQ, KC_PAUSE,
|
||||
KC_SLCK,
|
||||
_______, _______, _______,
|
||||
UC(0x00B4), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), UC(0x00BC),
|
||||
_______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______,
|
||||
_______, UC(0x00E1), UC(0x00DF), UC(0x00F0), _______, _______,
|
||||
MO(INSF), UC(0x00E6), _______, UC(0x00A9), _______, _______, _______,
|
||||
_______, _______, _______, UC(0x00AC), UC(0x00BF),
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_INS,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||
_______, _______, KC_HOME, KC_PGDN, KC_END,
|
||||
UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), UC(0x00A5), UC(0x00D7), _______,
|
||||
_______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______,
|
||||
_______, _______, _______, UC(0x00D8), UC(0x00B0), _______,
|
||||
_______, UC(0x00F1), UC(0x00B5), UC(0x00E7), _______, _______, MO(INSF),
|
||||
UC(0x00AB), UC(0x00BB), _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* layer 2 : numberpad
|
||||
/* layer 2 : international symbols, shifted
|
||||
* This layer is an ugly workaround; it pretends that SHIFT still works normally on keys
|
||||
* which don't produce an "upper case" or "shifted" international symobol.
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | ( | ) | ÷ | × | |
|
||||
* | ¨ | ¹ | | | £ | | | | | | | | | ÷ | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | Ä | Å | É | | Þ | | | | Ü | Ú | Í | Ó | Ö | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Á | § | Ð | | |------| |------| | | | Ø | ° | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Æ | | ¢ | | | | | | Ñ | | Ç | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | ¦ | | | | | | | |
|
||||
* `------------------------------------' `------------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[INSF] = KEYMAP(
|
||||
// left hand
|
||||
UC(0x00A8), UC(0x00B9), S(KC_2), S(KC_3), UC(0x00A3), UC(0x2014), S(KC_6),
|
||||
_______, UC(0x00C4), UC(0x00C5), UC(0x00C9), S(KC_R), UC(0x00DE), _______,
|
||||
_______, UC(0x00C1), UC(0x00A7), UC(0x00D0), S(KC_F), S(KC_G),
|
||||
_______, UC(0x00C6), S(KC_X), UC(0x00A2), S(KC_V), S(KC_B), _______,
|
||||
_______, _______, _______, UC(0x00A6), _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
// right hand
|
||||
S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), UC(0x00F7), _______,
|
||||
_______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______,
|
||||
S(KC_H), S(KC_J), S(KC_K), UC(0x00D8), UC(0x00B0), _______,
|
||||
_______, UC(0x00D1), S(KC_M), UC(0x00C7), S(KC_DOT), _______, _______,
|
||||
S(KC_LBRC), S(KC_RBRC), _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* layer 3: numberpad
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | ( | ) | / | * | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | 7 | 8 | 9 | - | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
@ -141,43 +187,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* layer 3: International symbols, etc
|
||||
/* layer 4 : functions and arrows
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* | | | | UP | | | | | | | | | | | INSERT |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |CAPSLOCK| | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* | | | | | | | | | HOME | PGDN | END |
|
||||
* `------------------------------------' `------------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* |SYSREQ| PAUSE| | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | | SCRLK| | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[INTL] = KEYMAP(
|
||||
[ARRW] = KEYMAP(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
_______, _______, _______, KC_UP, _______, _______, _______,
|
||||
KC_CAPS, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
KC_SYSREQ, KC_PAUSE,
|
||||
KC_SLCK,
|
||||
_______, _______, _______,
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_INS,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||
_______, _______, KC_HOME, KC_PGDN, KC_END,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
@ -186,7 +232,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
set_unicode_input_mode(UC_LNX); // Linux
|
||||
//set_unicode_input_mode(UC_OSX); // Mac OSX
|
||||
//set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki)
|
||||
//set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki)
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
@ -199,13 +248,14 @@ void matrix_scan_user(void) {
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
case 1:
|
||||
case INTL:
|
||||
case INSF:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
case NUMP:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
case ARRW:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user