From 826c929c4917fee467b5f1525e81d365e6cf35b1 Mon Sep 17 00:00:00 2001 From: Samuel Ryan Goodwin Date: Thu, 15 Dec 2016 09:52:57 +0100 Subject: Make keymap compile again. --- keyboards/planck/keymaps/sgoodwin/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/sgoodwin/Makefile b/keyboards/planck/keymaps/sgoodwin/Makefile index b2ca41944..9081c6d3e 100644 --- a/keyboards/planck/keymaps/sgoodwin/Makefile +++ b/keyboards/planck/keymaps/sgoodwin/Makefile @@ -19,6 +19,7 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +API_SYSEX_ENABLE = no # Disable extra stuff for ergodoxen # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -- cgit v1.2.3-24-g4f1b From c641e46567391276f7580996d544060d1bbac702 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Fri, 16 Dec 2016 01:16:55 +0700 Subject: QWERTZ style dot & comma, move QUOT to SCLN position --- keyboards/planck/keymaps/priyadi/keymap.c | 65 ++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 10 deletions(-) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 6e7f4e735..f0dafebf3 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT }, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} }, @@ -196,10 +196,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} + {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______}, + {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* Workman @@ -214,10 +214,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_WORKMAN] = { - {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, - {KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT }, - {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} + {_______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______}, + {_______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______}, + {_______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* Punc @@ -322,6 +322,7 @@ float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); +float tone_release[][2] = SONG(MUSICAL_NOTE(_A3, 2)); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -331,9 +332,49 @@ void persistant_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky - if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); + // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); + #ifdef AUDIO_ENABLE + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_click, false, 0); + } else { + PLAY_NOTE_ARRAY(tone_release, false, 0); + } + #endif switch (keycode) { + // QWERTZ style comma and dot: semicolon and colon when shifted + case KC_COMM: + if (record->event.pressed) { + bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + if (lshifted || rshifted) { + if (lshifted) unregister_code(KC_LSFT); + if (rshifted) unregister_code(KC_RSFT); + register_code(KC_SCLN); + unregister_code(KC_SCLN); + if (lshifted) register_code(KC_LSFT); + if (rshifted) register_code(KC_RSFT); + } else { + register_code(KC_COMM); + unregister_code(KC_COMM); + } + } + return false; + break; + case KC_DOT: + if (record->event.pressed) { + if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) { + register_code(KC_SCLN); + unregister_code(KC_SCLN); + } else { + register_code(KC_DOT); + unregister_code(KC_DOT); + } + } + return false; + break; + + // layout switcher case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE @@ -361,6 +402,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + + // layer switchers case PUNC: if (record->event.pressed) { layer_on(_PUNC); @@ -397,6 +440,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + + // OS switchers case LINUX: set_unicode_input_mode(UC_LNX); #ifdef AUDIO_ENABLE -- cgit v1.2.3-24-g4f1b From dd114e648e4ffada55727cdc7d907cca8c576b36 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 19 Dec 2016 21:01:23 -0500 Subject: planck preonic update --- keyboards/planck/keymaps/default/Makefile | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/default/Makefile b/keyboards/planck/keymaps/default/Makefile index 17487ebbf..457a3d01d 100644 --- a/keyboards/planck/keymaps/default/Makefile +++ b/keyboards/planck/keymaps/default/Makefile @@ -1,25 +1,3 @@ - - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - ifndef QUANTUM_DIR include ../../../../Makefile endif -- cgit v1.2.3-24-g4f1b From 5fca9ff4d5f448394b21799421708a84bdec1707 Mon Sep 17 00:00:00 2001 From: Jeremy Cowgar Date: Wed, 4 Jan 2017 10:51:00 -0500 Subject: Added Jeremy’s developers keymap for the Planck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/planck/keymaps/jeremy-dev/keymap.c | 180 ++++++++++++++++++++++++++ keyboards/planck/keymaps/jeremy-dev/readme.md | 85 ++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 keyboards/planck/keymaps/jeremy-dev/keymap.c create mode 100644 keyboards/planck/keymaps/jeremy-dev/readme.md (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/jeremy-dev/keymap.c b/keyboards/planck/keymaps/jeremy-dev/keymap.c new file mode 100644 index 000000000..e7ed09b12 --- /dev/null +++ b/keyboards/planck/keymaps/jeremy-dev/keymap.c @@ -0,0 +1,180 @@ +// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer. + +// Configuration options +#define PREVENT_STUCK_MODIFIERS + +#include "planck.h" +#include "action_layer.h" +#include "eeconfig.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +enum my_layers { + ALPH = 0, + NUMS, + CURS, + SYMB, + FKEY +}; + +// Each macro gets a name for readability. +enum my_keycodes { + MY_ABVE = SAFE_RANGE, + MY_BELW, + MY_TERM, + MY_DEQL, // /= + MY_MEQL, // *= + MY_SEQL, // -= + MY_PEQL, // += + MY_NEQL, // != + MY_LTGT, // <> + MY_DPIP, // || + MY_DAMP, // && +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [ALPH] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P}, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH)}, + {CTL_T(KC_TAB), OSL(FKEY), OSL(NUMS), OSL(SYMB), KC_SPC, ALT_T(KC_BSPC), GUI_T(KC_DELT), KC_ENT, OSL(SYMB), OSL(CURS), TG(CURS), CTL_T(KC_ESC)} + }, + [NUMS] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_COMM, KC_7, KC_8, KC_9, KC_SLSH}, + {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_TRNS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS}, + {KC_NO, KC_NO, KC_TRNS, TG(NUMS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} + }, + [CURS] = { + {KC_MPLY, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, + {KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KC_TRNS, KC_NO, KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT}, + {KC_VOLD, KC_NO, MY_ABVE, MY_TERM, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_LSFT}, + {KC_MUTE, KC_NO, MY_BELW, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO} + }, + [SYMB] = { + {MY_DEQL, MY_MEQL, MY_SEQL, MY_PEQL, MY_NEQL, KC_NO, KC_NO, MY_LTGT, KC_LABK, KC_RABK, KC_COLN, KC_DLR}, + {KC_SLSH, KC_ASTR, KC_MINS, KC_PLUS, KC_EQL, KC_NO, KC_PIPE, MY_DPIP, KC_GRV, KC_QUOT, KC_DQUO, KC_HASH}, + {KC_BSLS, KC_CIRC, KC_PERC, KC_UNDS, KC_NO, KC_NO, KC_AMPR, MY_DAMP, KC_TILD, KC_AT, KC_EXLM, KC_QUES}, + {KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO} + }, + [FKEY] = { + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_LSFT, KC_LGUI, KC_LALT, KC_LCTL, KC_NO, KC_NO, KC_NO, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8}, + {KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4}, + {KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} + } +}; + +void press_key(uint16_t key) { + register_code(key); + unregister_code(key); +} + +void press_two_keys(uint16_t key1, uint16_t key2) { + register_code(key1); + register_code(key2); + unregister_code(key2); + unregister_code(key1); +} + +void press_three_keys(uint16_t key1, uint16_t key2, uint16_t key3) { + register_code(key1); + register_code(key2); + register_code(key3); + unregister_code(key3); + unregister_code(key2); + unregister_code(key1); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MY_BELW: + if (record->event.pressed) { + press_two_keys(KC_LGUI, KC_RGHT); + press_key(KC_ENT); + } + + return false; + + case MY_ABVE: + if (record->event.pressed) { + press_two_keys(KC_LGUI, KC_LEFT); + press_key(KC_ENT); + press_key(KC_UP); + } + + return false; + + case MY_TERM: + if (record->event.pressed) { + press_three_keys(KC_LGUI, KC_LSFT, KC_ENT); + } + + return false; + + case MY_DEQL: // /= + if (record->event.pressed) { + press_key(KC_SLSH); + press_key(KC_EQL); + } + + return false; + + case MY_MEQL: // *= + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_ASTR); + press_key(KC_EQL); + } + + return false; + + case MY_SEQL: // -= + if (record->event.pressed) { + press_key(KC_MINS); + press_key(KC_EQL); + } + + return false; + + case MY_PEQL: // += + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_PLUS); + press_key(KC_EQL); + } + + return false; + + case MY_NEQL: // != + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_EXLM); + press_key(KC_EQL); + } + + return false; + + case MY_LTGT: // <> + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_LABK); + press_two_keys(KC_LSFT, KC_RABK); + } + + return false; + + case MY_DPIP: // || + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_PIPE); + press_two_keys(KC_LSFT, KC_PIPE); + } + + return false; + + case MY_DAMP: // && + if (record->event.pressed) { + press_two_keys(KC_LSFT, KC_AMPR); + press_two_keys(KC_LSFT, KC_AMPR); + } + + return false; + } + + return true; +} diff --git a/keyboards/planck/keymaps/jeremy-dev/readme.md b/keyboards/planck/keymaps/jeremy-dev/readme.md new file mode 100644 index 000000000..b6a402d69 --- /dev/null +++ b/keyboards/planck/keymaps/jeremy-dev/readme.md @@ -0,0 +1,85 @@ +Jeremy Cowgar's Planck Keymap +============================= + +I am a programmer by trade and suffer from the beginning stages of RSI. As a programmer, I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, within reason and for me. I made heavy use of momentary layer toggling. + +Layers +------ + +The key mapping is made up of 5 layers: Letters, Symbols, Navigation, Numbers, and Function Keys. + +The layout can be viewed visually at: + +http://www.keyboard-layout-editor.com/#/gists/319474e5e2d199e583371ed1d2aec316 + +* Purple buttons are dual function keys. +* Green buttons are layer momentary toggle keys. +* Red buttons are layer persistent toggle keys. + +The keys have multiple symbols: + +* Upper left: standard layer, the letter layer +* Upper right: function layer +* Lower left: navigation layer +* Lower right: symbol layer + +The symbols in the layout editor are not entirely clear. + +The Z and ? keys double as shift keys. Hold for a shift, tap for a Z or ? + +The bottom row from left to right: + +* Tab when pressed, Control when held. It also is the volume mute key when in the "Navigation" layer +* Function layer momentary toggle +* Number layer momentary toggle +* Symbol layer momentary toggle. When in the "Number" layer, this key also makes the "Number" layer sticky for using the 10 key for quite a bit of entry +* Space +* Backspace when tapped, Option when held +* Delete when tapped, Command when held +* Return +* Symbol layer momentary toggle. When in the "Number" layer, key also is the zero key. +* Navigation layer momentary toggle +* Navigation layer toggle. This was included for when you are browsing a website, document or otherwise wish to stay in navigation mode. When in the "Number" layer, the key is the = symbol +* Escape when pressed, Control when held. When in the "Number" layer, the key is the + symbol + +General Notes +------------- + +The letter layer is separated by 2 center rows of keys. This spreads the hands out a little further which helps not twist the wrists as much. The 2 center rows are [], (), [], and Ctrl and Alt keys. + +The symbol layer keys are accessed by the thumbs. They are the closest to the thumbs, instead of the number toggle, because in my code I found I used symbols much more often than numbers. There are two symbol layer keys because the symbols spread across the right and left half of the keyboard. Thus, some symbols are easier hit with the left hand modifier or right hand modifier. + +The number layer key is only accessible by the left thumb because all of the number keys are on the right side of the keyboard. When in the number layer, you can press the key to the right to make that layer sticky when you are going to do a lot of number entry. + +The function layer key is only accessible by the left thumb because all of the function keys are on the right side of the keyboard. + +The navigation layer key is only accessible by the right thumb because all of the navigation keys are on the left side of the keyboard. You can press the key to the right of the navigation layer to make the navigation layer sticky when you are doing a lot of navigation, reading a web page for example. + +When using the number or navigation layers, the same hand that accesses the momentary layer toggle key also has the 4 primary modifiers under their home row. + +* Pointer finger is control +* Middle finger is option +* Ring finger is command +* Pinky finger is shift + +This is so you can easily press Cmd+Shift+F4 or when navigating, select text or words of text by pressing Shift+Control, for example. + +Some keys are duplicated. For example, () are available in easy to reach locations while in the Number layer because they are often used in math. + +The symbol layer has additional helpers for programming including a single keys that enter /=, \*=, -=, +=, !=, <>, ||, and &&. It also includes three special Return keys on the left: + +* Up CR which moves the cursor up, to the end of the line and then presses CR +* Down CR which moves the cursor to the end of the line and then presses CR +* Right ; which moves the cursor to the end of the line and presses ; for C styled languages, such as JavaScript which is a primary language I use + +Word of Warning +--------------- + +I have been using the keymap for some time now and believe it to be a good keymap. There are a few things through the week that I wonder if it would have been better if this key were moved to that location. + +This keymap may change for further optimization. + +Please Give Feedback! +--------------------- + +I am very interested in your feedback. Send me a message here on GitHub, r/jcowgar or @jcowgar. -- cgit v1.2.3-24-g4f1b From 58b2536bf106fd18a265843ba43784fa3e6be384 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 8 Jan 2017 22:45:16 +0700 Subject: om telolet om --- keyboards/planck/keymaps/priyadi/Makefile | 2 +- keyboards/planck/keymaps/priyadi/keymap.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile index d9d4f3d1d..336608b8c 100644 --- a/keyboards/planck/keymaps/priyadi/Makefile +++ b/keyboards/planck/keymaps/priyadi/Makefile @@ -10,7 +10,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index f0dafebf3..57fe86ff7 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -11,6 +11,8 @@ #include "process_unicode.h" #include "quantum.h" +// #define TOLELOT_ENABLE + extern keymap_config_t keymap_config; enum layers { @@ -323,6 +325,7 @@ float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); float tone_release[][2] = SONG(MUSICAL_NOTE(_A3, 2)); +float tone_tolelot[][2] = SONG(Q__NOTE(_E5), Q__NOTE(_C5), Q__NOTE(_D5)); #endif void persistant_default_layer_set(uint16_t default_layer) { @@ -334,12 +337,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // faux clicky // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); #ifdef AUDIO_ENABLE + #ifdef TOLELOT_ENABLE + if (record->event.pressed) { + PLAY_NOTE_ARRAY(tone_tolelot, false, 0); + } + #else if (record->event.pressed) { PLAY_NOTE_ARRAY(tone_click, false, 0); } else { PLAY_NOTE_ARRAY(tone_release, false, 0); } #endif + #endif switch (keycode) { // QWERTZ style comma and dot: semicolon and colon when shifted -- cgit v1.2.3-24-g4f1b From 02055406e88253440decfc1af73bc8662e6ebd98 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 9 Jan 2017 02:50:13 +0700 Subject: Greek alphabet layer --- keyboards/planck/keymaps/priyadi/keymap.c | 187 +++++++++++++++++++++++++++++- 1 file changed, 183 insertions(+), 4 deletions(-) (limited to 'keyboards/planck/keymaps') diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 57fe86ff7..2e979221a 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c @@ -23,6 +23,8 @@ enum layers { _NUM, _FUNC, _EMOJI, + _GREEKU, + _GREEKL, _GUI, }; @@ -38,6 +40,7 @@ enum planck_keycodes { FUNC, EMOJI, GUI, + GREEK, // os switchers LINUX, @@ -100,6 +103,59 @@ enum unicode_name { SUN, // sun MOON, // moon SKULL, // skull + + // greek letters + UALPH, + UBETA, + UGAMM, + UDELT, + UEPSI, + UZETA, + UETA, + UTHET, + UIOTA, + UKAPP, + ULAMB, + UMU, + UNU, + UXI, + UOMIC, + UPI, + URHO, + USIGM, + UTAU, + UUPSI, + UPHI, + UCHI, + UPSI, + UOMEG, + + LALPH, + LBETA, + LGAMM, + LDELT, + LEPSI, + LZETA, + LETA, + LTHET, + LIOTA, + LKAPP, + LLAMB, + LMU, + LNU, + LXI, + LOMIC, + LPI, + LRHO, + LSIGM, + LTAU, + LUPSI, + LPHI, + LCHI, + LPSI, + LOMEG, + + FSIGM, }; const uint32_t PROGMEM unicode_map[] = { @@ -150,6 +206,57 @@ const uint32_t PROGMEM unicode_map[] = { [SUN] = 0x2600, [MOON] = 0x1F314, [SKULL] = 0x1F480, + + // greek letters + [UALPH] = 0x0391, + [UBETA] = 0x0392, + [UGAMM] = 0x0393, + [UDELT] = 0x0394, + [UEPSI] = 0x0395, + [UZETA] = 0x0396, + [UETA] = 0x0397, + [UTHET] = 0x0398, + [UIOTA] = 0x0399, + [UKAPP] = 0x039A, + [ULAMB] = 0x039B, + [UMU] = 0x039C, + [UNU] = 0x039D, + [UXI] = 0x039E, + [UOMIC] = 0x039F, + [UPI] = 0x03A0, + [URHO] = 0x03A1, + [USIGM] = 0x03A3, + [UTAU] = 0x03A4, + [UUPSI] = 0x03A5, + [UPHI] = 0x03A6, + [UCHI] = 0x03A7, + [UPSI] = 0x03A8, + [UOMEG] = 0x03A9, + [LALPH] = 0x03B1, + [LBETA] = 0x03B2, + [LGAMM] = 0x03B3, + [LDELT] = 0x03B4, + [LEPSI] = 0x03B5, + [LZETA] = 0x03B6, + [LETA] = 0x03B7, + [LTHET] = 0x03B8, + [LIOTA] = 0x03B9, + [LKAPP] = 0x03BA, + [LLAMB] = 0x03BB, + [LMU] = 0x03BC, + [LNU] = 0x03BD, + [LXI] = 0x03BE, + [LOMIC] = 0x03BF, + [LPI] = 0x03C0, + [LRHO] = 0x03C1, + [LSIGM] = 0x03C3, + [LTAU] = 0x03C4, + [LUPSI] = 0x03C5, + [LPHI] = 0x03C6, + [LCHI] = 0x03C7, + [LPSI] = 0x03C8, + [LOMEG] = 0x03C9, + [FSIGM] = 0x03C2, }; @@ -176,14 +283,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |AltGr | GUI | Ctrl | + * | Ctrl | GUI | Alt | Punc | Num | Space | Func |Emoji |Greek |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = { {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT }, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} + {KC_LCTL, KC_LALT, KC_LGUI, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, GREEK, KC_RALT, KC_RCTL} }, /* Colemak @@ -222,6 +329,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, +/* Uppercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKU] = { + {_______, _______, _______,X(UEPSI), X(URHO), X(UTAU),X(UUPSI),X(UTHET),X(UIOTA),X(UOMIC), X(UPI), _______}, + {_______,X(UALPH),X(USIGM),X(UDELT), X(UPHI),X(UGAMM), X(UETA), X(UXI),X(UKAPP),X(ULAMB), _______, _______}, + {_______,X(UZETA), X(UCHI), X(UPSI),X(UOMEG),X(UBETA), X(UNU), X(UMU), _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lowercase Greek + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_GREEKL] = { + {_______, _______,X(FSIGM),X(LEPSI), X(LRHO), X(LTAU),X(LUPSI),X(LTHET),X(LIOTA),X(LOMIC), X(LPI), _______}, + {_______,X(LALPH),X(LSIGM),X(LDELT), X(LPHI),X(LGAMM), X(LETA), X(LXI),X(LKAPP),X(LLAMB), _______, _______}, + {_______,X(LZETA), X(LCHI), X(LPSI),X(LOMEG),X(LBETA), X(LNU), X(LMU), _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + /* Punc * ,-----------------------------------------------------------------------------------. * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ` | @@ -350,12 +493,48 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif #endif + bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); + bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); + switch (keycode) { + // Greek layer handling + case GREEK: + if (record->event.pressed) { + if (lshifted || rshifted) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } else { + layer_off(_GREEKU); + layer_off(_GREEKL); + } + return false; + break; + + case KC_LSFT: + case KC_RSFT: + ; + uint8_t layer = biton32(layer_state); + if (layer == _GREEKU || layer == _GREEKL) { + if (record->event.pressed) { + layer_on(_GREEKU); + layer_off(_GREEKL); + } else { + if (lshifted ^ rshifted) { // if only one shift is pressed + layer_on(_GREEKL); + layer_off(_GREEKU); + } + } + } + return true; + break; + // QWERTZ style comma and dot: semicolon and colon when shifted case KC_COMM: if (record->event.pressed) { - bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); - bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); if (lshifted || rshifted) { if (lshifted) unregister_code(KC_LSFT); if (rshifted) unregister_code(KC_RSFT); -- cgit v1.2.3-24-g4f1b