Compare commits

...
11 Commits
Author SHA1 Message Date
Drashna Jaelre afd5cda4a0 Fix up process_leader to be a bit more optimized (#4662)
* Fix up process_leader to be a bit more optimized

* Process dual function keys better

* Make leader start a callable function

* Fix per key timer call location

* Add escape if already leading

* Return false for KC_LEAD

* Add documentation
2018-12-20 16:54:06 -08:00
Takeshi ISHII 30c3f3b2bd Keymap: Add Helix/pico keymap 'mtei' (#4696)
* add pico keymap 'mtei'

* num layer key change
2018-12-20 09:50:51 -08:00
Drashna Jaelre 6395853148 Docs: Add additional clarification to Leader Key documention (#4660)
* Add clarification for Leader Timeout

* Add additional documentatin to config_options.md

* Add leader_start() and leader_end() documentation

* Add Examples

* Clarify timout

* Remove customization

* Improve docs based on feedback

* Better clarification of features

* Fix example

* Spelling/grammar issue

* Spelling and clarification
2018-12-20 08:58:12 -08:00
Emily Soldal 1586548b4f Enable RGB animations in Atom47 2018-12-20 08:55:32 -08:00
MakotoKurauchi 29830f306f Keyboard: Pr/helixpico add layout kc (#4686)
* add some comment about Helix customize and auto-setup RGBLIGHT_LIMIT_VAL

* add define USB_MAX_POWER_CONSUMPTION

* Helix keyboard OLED, RGBLIGHT enable/disable control integrate into rules.mk

rules.mk: add 4 Variables for compile control.

   # Helix keyboard customize
   # you can edit follows 4 Variables
   #  jp: 以下の4つの変数を必要に応じて編集します。
   OLED_ENABLE = no            # OLED_ENABLE
   LED_BACK_ENABLE = no        # LED backlight (Enable WS2812 RGB underlight.)
   LED_UNDERGLOW_ENABLE = no   # LED underglow (Enable WS2812 RGB underlight.)
   LED_ANIMATIONS = yes        # LED animations

config.h: auto set RGBLED_NUM by HELIX_ROWS and rules.mk's define

* HELIX_ROWS define move from config.h to rules.mk

* add readme.md

* rename readme.md to readme_jp.md

* add readme.md and modify readme_jp.md

* change helix/ssd1306.c for select glcdfont.c position

* add variable LOCAL_GLCDFONT into each keymaps rules.mk

* Add iPhone/iPad LED support to Helix default keymap

* renumber _ADJUST for shrink program size

* Fix Helix i2c wrong bit rate

* add helix serial debug code

* serial debug macro move from config.h to serial.h

* helix serial.c debugging...

* refine debug macros

* add some comments

* add SELECT_SERIAL_SPEED

* add comments

* debugging sync_send/sync_recv

* add very high speed

* fix sync_send/sync_recv

* fix com. start and switch send/recv

* debug mode off

* remove debug codes

* temporary change, compiling C, C++ and ASM without -g

* helix config.h refine

* Revert "temporary change, compiling C, C++ and ASM without -g"

This reverts commit e9730cbbfd94fbcf792d992e3a1a65ad279b24d6.

* add change_reciver2sender()/change_sender2reciver()

This is a change to improve readability.

* txled, rxled off in matrix_init()

* add serial_send_packet() / serial_recive_packet()

This is a change to reduce object size.

* add serial_low() at ISR() top

* add __attribute__((always_inline)) to some functions

* modify serial_send_packet()/serial_recive_packet()

A little, object size reduction.
A little, speedup.

* add debug code to helix/serial.c

* Adjust sampling timing of serial signal being received

* add split_scomm.c/split_scomm.h and change serial.c/serial.h

serial.c was divided into 2 layers, split_scom.c and serial.c.
The upper layer split_scomm.c is called from matrix.c.
The lower layer serial.c accesses the hardware.

* add split_scomm.c/split_scomm.h into helix/rev1

* reduce object size helix/rev2/matrix.c

* remove checksum check, add parity check

* force occur parity error for test

* parity test ok. remove test code

* change some comment & add skip code when buffer_size == 0

* serial.c: multiple types of transaction support

Add 4 bits transaction-type field at packet top.
Select Transaction Descriptor Table entry by transaction-type.

* helix serial master-slave transaction optimize

Using multi-type transaction feature of serial.c, communication contents between master slaves were optimized.

* add debug code for retry

* add comment into each config.h

* fix ISR status drop

* add a debug macro 'debug_retry_chg()'

* reduce led_test size

* remove debug code from helix/serial.c and etc.

* helix:five_rows change TAPPING_TERM value 140

* Improved compatibility with let's split of serial.c. Finish helix/serial.c improvement.

- The difference with the original let's split's serial.c
  - It's high-speed about 4 times.
  - Stable bi-directional data transfer. (Helix need master to slave transfer)
  - serial.h was divided 2 files, serial_config.h and sereial.h
  - With multiple types of transaction support, communication contents can be optimized. (NEW flexible API)

- USE OLD Simple APIs (compatible with let's split serial.c)
  - files :
    - serial_config.h -- hardware configuration (need include by config.h)
    - serial.c/serial.h -- serial communication

- USE NEW flexible APIs. (Support multi-type transaction function.)
  serial.c was divided into 2 layers, split_scom.c and serial.c.
  The upper layer split_scomm.c is called from matrix.c.
  The lower layer serial.c accesses the hardware.
  - files
    - split_scomm.c -- communication buffer is defined in here. call by matrix.c.
    - split_scomm.h -- buffer size is defined in here. include by matrix.c, split_util.c
    - serial_config.h -- hardware configuration (need include by config.h)
      To use the NEW API, specify #define SERIAL_USE_MULTI_TRANSACTION
    - serial.c/serial.h -- serial communication lower layer

- NEW APIs for serial.c / serial.h (The lower layer)
  // Soft Serial Transaction Descriptor
  typedef struct _SSTD_t  {
      uint8_t *status;
      uint8_t initiator2target_buffer_size;
      uint8_t *initiator2target_buffer;
      uint8_t target2initiator_buffer_size;
      uint8_t *target2initiator_buffer;
  } SSTD_t;

  // initiator is transaction start side
  void soft_serial_initiator_init(SSTD_t *sstd_table);
  // target is interrupt accept side
  void soft_serial_target_init(SSTD_t *sstd_table);
  int soft_serial_transaction(int sstd_index);
  int soft_serial_get_and_clean_target_status(int sstd_index);

- NEW APIs for split_scomm.c / split_scomm.h (The upper layer)
   move from old serial.c the following buffer and functions
     serial_slave_buffer[]
     serial_master_buffer[]
     void serial_master_init(void)
     void serial_slave_init(void)
     int serial_update_buffers(void)
   define SERIAL_xxxxx_BUFFER_LENGTH move from serial_config.h to split_scomm.h

* fix comment typo

* Fix the value of helix:five_rows variable HELIX_ROWS to 5.

* led_test rules.mk some change

* Separate common parts of helix/rev2/keymaps/*/rules.mk into helix/rev2/keymaps_common.mk

* helix/rev2/keymaps/edvorakjp/rules.mk use helix/rev2/keymaps_common.mk

* Separate common parts of helix/pico/keymaps/*/rules.mk into helix/pico/keymaps_common.mk

* Helix each keymap's using rgblight mode symbol instead magic number

No change in build result.

* Helix pico keymaps: make rgblight modes selectable.

No change in build result.

* Helix rev2 keymaps: make rgblight modes selectable.

No change in build result.

* fixed Helix froggy/keymap.c: invalid rgblight mode value 0 to 1 (=RGBLIGHT_MODE_STATIC_LIGHT)

* Deselect RGB_TEST and ALTERNATING in Helix rev2,pico keymaps config.h.

* Merge branch 'master' of https://github.com/qmk/qmk_firmware

* revert 955dcbc

* delete keymaps_common.mk

* add LAYOUT_kc() to keyboards/helix/pico/pico.h
2018-12-20 08:55:03 -08:00
noroadsleft af55ef8418 GSKT-00 Configurator update
- add JSON data for LAYOUT_all layout
- fix ISO Enter on LAYOUT_60_iso_tsangan layout
2018-12-20 08:52:54 -08:00
Kevin Hogeland 374ed67e87 Add PROGMEM keyword to Clueboard keymaps 2018-12-20 08:44:42 -08:00
Skyler Lewis f3cbb7bd6e update the alairock keymap for dichotomy (#4687)
Just a couple placement updates to my layout on the dichotomy keyboard.
2018-12-19 16:54:19 -08:00
Ismael Venegas Castelló 5eb8f3f6b5 Keymap: Refactor Hacker Dvorak (#4688)
Programmer Dvorak based layout for the Ergodox EZ.
2018-12-19 16:49:56 -08:00
yiancar b13162f7fd Also fix use of weak stm32 internal pullup 2018-12-19 11:52:05 -08:00
yiancar df33618b26 Minor STM32 i2c driver cleanup 2018-12-19 11:52:05 -08:00
37 changed files with 1836 additions and 892 deletions

No files matched your search

+3
View File
@@ -143,8 +143,11 @@ If you define these options you will enable the associated feature, which may in
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle) * Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
* `#define LEADER_TIMEOUT 300` * `#define LEADER_TIMEOUT 300`
* how long before the leader key times out * how long before the leader key times out
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
* `#define LEADER_PER_KEY_TIMING` * `#define LEADER_PER_KEY_TIMING`
* sets the timer for leader key chords to run on each key press rather than overall * sets the timer for leader key chords to run on each key press rather than overall
* `#define LEADER_KEY_STRICT_KEY_PROCESSING`
* Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify `MT(MOD_CTL, KC_A)` if you want to use `KC_A`.
* `#define ONESHOT_TIMEOUT 300` * `#define ONESHOT_TIMEOUT 300`
* how long before oneshot times out * how long before oneshot times out
* `#define ONESHOT_TAP_TOGGLE 2` * `#define ONESHOT_TAP_TOGGLE 2`
+81 -7
View File
@@ -5,10 +5,11 @@ If you've ever used Vim, you know what a Leader key is. If not, you're about to
That's what `KC_LEAD` does. Here's an example: That's what `KC_LEAD` does. Here's an example:
1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else. 1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else.
2. Include the line `#define LEADER_TIMEOUT 300` in your config.h. The 300 there is 300ms -- that's how long you have for the sequence of keys following the leader. You can tweak this value for comfort, of course. 2. Include the line `#define LEADER_TIMEOUT 300` in your `config.h`. This sets the timeout for the `KC_LEAD` key. Specifically, when you press the `KC_LEAD` key, you only have a certain amount of time to complete the Leader Key sequence. The `300` here sets that to 300ms, and you can increase this value to give you more time to hit the sequence. But any keys pressed during this timeout are intercepted and not sent, so you may want to keep this value low. .
3. Within your `matrix_scan_user` function, do something like this: * By default, this timeout is how long after pressing `KC_LEAD` to complete your entire sequence. This may be very low for some people. So you may want to increase this timeout. Optionally, you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. This allows you to maintain a low value here, but still be able to use the longer sequences. To enable this option, add `#define LEADER_PER_KEY_TIMING` to your `config.h`.
3. Within your `matrix_scan_user` function, add something like this:
``` ```c
LEADER_EXTERNS(); LEADER_EXTERNS();
void matrix_scan_user(void) { void matrix_scan_user(void) {
@@ -44,7 +45,7 @@ Each of these accepts one or more keycodes as arguments. This is an important po
To add support for Leader Key you simply need to add a single line to your keymap's `rules.mk`: To add support for Leader Key you simply need to add a single line to your keymap's `rules.mk`:
``` ```make
LEADER_ENABLE = yes LEADER_ENABLE = yes
``` ```
@@ -53,20 +54,93 @@ LEADER_ENABLE = yes
Rather than relying on an incredibly high timeout for long leader key strings or those of us without 200wpm typing skills, we can enable per key timing to ensure that each key pressed provides us with more time to finish our stroke. This is incredibly helpful with leader key emulation of tap dance (read: multiple taps of the same key like C, C, C). Rather than relying on an incredibly high timeout for long leader key strings or those of us without 200wpm typing skills, we can enable per key timing to ensure that each key pressed provides us with more time to finish our stroke. This is incredibly helpful with leader key emulation of tap dance (read: multiple taps of the same key like C, C, C).
In order to enable this, place this in your `config.h`: In order to enable this, place this in your `config.h`:
``` ```c
#define LEADER_PER_KEY_TIMING #define LEADER_PER_KEY_TIMING
``` ```
After this, it's recommended that you lower your `LEADER_TIMEOUT` to something less that 300ms. After this, it's recommended that you lower your `LEADER_TIMEOUT` to something less that 300ms.
``` ```c
#define LEADER_TIMEOUT 250 #define LEADER_TIMEOUT 250
``` ```
Now, something like this won't seem impossible to do without a 1000MS leader key timeout: Now, something like this won't seem impossible to do without a 1000MS leader key timeout:
``` ```c
SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { SEQ_THREE_KEYS(KC_C, KC_C, KC_C) {
SEND_STRING("Per key timing is great!!!"); SEND_STRING("Per key timing is great!!!");
} }
``` ```
## Strict Key Processing
By default, the Leader Key feature will filter the keycode out of [`Mod-Tap`](feature_advanced_keycodes.md#mod-tap) and [`Layer Tap`](feature_advanced_keycodes.md#switching-and-toggling-layers) functions when checking for the Leader sequences. That means if you're using `LT(3, KC_A)`, it will pick this up as `KC_A` for the sequence, rather than `LT(3, KC_A)`, giving a more expected behavior for newer users.
While, this may be fine for most, if you want to specify the whole keycode (eg, `LT(3, KC_A)` from the example above) in the sequence, you can enable this by added `#define LEADER_KEY_STRICT_KEY_PROCESSING` to your `config.h` file. This well then disable the filtering, and you'll need to specify the whole keycode.
## Customization
The Leader Key feature has some additional customization to how the Leader Key feature works. It has two functions that can be called at certain parts of the process. Namely `leader_start()` and `leader_end()`.
The `leader_start()` function is called when you tap the `KC_LEAD` key, and the `leader_end()` function is called when either the leader sequence is completed, or the leader timeout is hit.
You can add these functions to your code (`keymap.c` usually) to add feedback to the Leader sequences (such as beeping or playing music).
```c
void leader_start(void) {
// sequence started
}
void leader_end(void) {
// sequence ended (no success/failuer detection)
}
```
### Example
This example will play the Mario "One Up" sound when you hit `KC_LEAD` to start the Leader Sequence, and will play "All Star" if it completes successfully or "Rick Roll" you if it fails.
```c
bool did_leader_succeed;
#ifdef AUDIO_ENABLE
float leader_start[][2] = SONG(ONE_UP_SOUND );
float leader_succeed[][2] = SONG(ALL_STAR);
float leader_fail[][2] = SONG(RICK_ROLL);
#endif
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
did_leader_succeed = leading = false;
SEQ_ONE_KEY(KC_E) {
// Anything you can do in a macro.
SEND_STRING(SS_LCTRL(SS_LSFT("t")));
did_leader_succeed = true;
} else
SEQ_TWO_KEYS(KC_E, KC_D) {
SEND_STRING(SS_LGUI("r")"cmd"SS_TAP(KC_ENTER)SS_LCTRL("c"));
did_leader_succeed = true;
}
leader_end();
}
}
void leader_start(void) {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_start);
#endif
}
void leader_end(void) {
if (did_leader_succeed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_succeed);
#endif
} else {
#ifdef AUDIO_ENABLE
PLAY_SONG(leader_fail);
#endif
}
}
```
+2 -4
View File
@@ -45,16 +45,14 @@ static const I2CConfig i2cconfig = {
__attribute__ ((weak)) __attribute__ ((weak))
void i2c_init(void) void i2c_init(void)
{ {
//palSetGroupMode(GPIOB, GPIOB_PIN6 | GPIOB_PIN7, 0, PAL_MODE_INPUT);
// Try releasing special pins for a short time // Try releasing special pins for a short time
palSetPadMode(GPIOB, 6, PAL_MODE_INPUT); palSetPadMode(GPIOB, 6, PAL_MODE_INPUT);
palSetPadMode(GPIOB, 7, PAL_MODE_INPUT); palSetPadMode(GPIOB, 7, PAL_MODE_INPUT);
chThdSleepMilliseconds(10); chThdSleepMilliseconds(10);
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
//i2cInit(); //This is invoked by halInit() so no need to redo it. //i2cInit(); //This is invoked by halInit() so no need to redo it.
} }
+1 -1
View File
@@ -61,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN F5 // The pin the LED strip is connected to #define RGB_DI_PIN F5 // The pin the LED strip is connected to
#define RGBLED_NUM 6 // Number of LEDs in your strip #define RGBLED_NUM 6 // Number of LEDs in your strip
#define RGBLIGHT_ANIMATIONS
#define QMK_ESC_OUTPUT B7 // usually COL #define QMK_ESC_OUTPUT B7 // usually COL
#define QMK_ESC_INPUT B3 // usually ROW #define QMK_ESC_INPUT B3 // usually ROW
#define QMK_LED E6 #define QMK_LED E6
@@ -1,4 +1,4 @@
#include "60.h" #include QMK_KEYBOARD_H
#define _______ KC_TRNS #define _______ KC_TRNS
@@ -32,7 +32,7 @@ enum custom_keycodes {
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
#endif #endif
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer /* Layer 0: Default Layer
* ,-----------------------------------------------------------. * ,-----------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp|
@@ -1,4 +1,4 @@
#include "60.h" #include QMK_KEYBOARD_H
#define _______ KC_TRNS #define _______ KC_TRNS
@@ -8,7 +8,7 @@ enum keyboard_layers {
_CL _CL
}; };
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer /* Layer 0: Default Layer
* ,-----------------------------------------------------------. * ,-----------------------------------------------------------.
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BkSp| * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BkSp|
@@ -1,4 +1,4 @@
#include "60.h" #include QMK_KEYBOARD_H
#define _______ KC_TRNS #define _______ KC_TRNS
@@ -33,7 +33,7 @@ enum custom_keycodes {
float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE);
#endif #endif
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer /* Layer 0: Default Layer
* ,-----------------------------------------------------------------. * ,-----------------------------------------------------------------.
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp|
+14 -14
View File
@@ -43,34 +43,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_RAISE] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */ [_RAISE] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
_______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MFFD, KC_MUTE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MFFD, KC_MUTE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
_______, _______, _______, _______, _______, KC_MRWD, _______, _______, _______, KC_BSLS, KC_QUOT, _______, _______, _______, KC_GRV, _______, _______, KC_MRWD, _______, _______, _______, KC_BSLS, KC_QUOT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_LABK, _______, _______, KC_RABK, _______, _______ _______, _______, KC_LABK, _______, _______, KC_RABK, _______, _______
), ),
[_LOWER] = LAYOUT( /* Number layout, basically the main function layer */ [_LOWER] = LAYOUT( /* Number layout, basically the main function layer */
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MFFD, KC_MUTE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
_______, KC_TILD, KC_GRV, KC_F13, KC_F14, KC_F15, KC_F16, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, KC_TILD, _______, _______, KC_MRWD, _______, _______, _______, KC_PIPE, KC_DQT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, RAISE, _______, _______, _______, _______, _______, _______ _______, RAISE, _______, _______, _______, _______, _______, _______
), ),
[_ADJUST] = LAYOUT( /* Shifted number/function layout, for per-key control. Only active when shift is held, and number is toggled or held */ [_ADJUST] = LAYOUT( /* Shifted number/function layout, for per-key control. Only active when shift is held, and number is toggled or held */
_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_UP, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______ _______, _______, _______, _______, _______, _______, _______, _______
), ),
[_MOUSE] = LAYOUT( /* Mouse layer, including buttons for clicking. */ [_MOUSE] = LAYOUT( /* Mouse layer, including buttons for clicking. */
_______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______,
_______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_UP, _______,
_______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______ _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______
) )
}; // end keymaps block }; // end keymaps block
@@ -5,26 +5,33 @@
#pragma once #pragma once
/* Keyboard Settings */
#undef TAPPING_TERM #undef TAPPING_TERM
#define TAPPING_TERM 150 #define TAPPING_TERM 200
#undef DEBOUNCE #undef DEBOUNCE
#define DEBOUNCE 10 #define DEBOUNCE 10
#undef IGNORE_MOD_TAP_INTERRUPT #undef IGNORE_MOD_TAP_INTERRUPT
#define IGNORE_MOD_TAP_INTERRUPT
#undef FORCE_NKRO #undef FORCE_NKRO
#define FORCE_NKRO #define FORCE_NKRO
/* This isn't defined by default, so there is no need to undefine it first. */ #undef TAPPING_TOGGLE
#define LEADER_TIMEOUT 500 #define TAPPING_TOGGLE 5
#define LEADER_TIMEOUT 1000
#define IGNORE_MOD_TAP_INTERRUPT
#define PERMISSIVE_HOLD #define PERMISSIVE_HOLD
#define QMK_KEYS_PER_SCAN 4 #define QMK_KEYS_PER_SCAN 4
#define DANCING_TERM 175
#define ONESHOT_TAP_TOGGLE 5
#define ONESHOT_TIMEOUT 5000
#define COMBO_COUNT 4
#define COMBO_TERM 200
// RGB Lights
#undef RGBLIGHT_HUE_STEP #undef RGBLIGHT_HUE_STEP
#define RGBLIGHT_HUE_STEP 24 #define RGBLIGHT_HUE_STEP 24
@@ -40,11 +47,7 @@
#undef RGBLIGHT_LIMIT_VAL #undef RGBLIGHT_LIMIT_VAL
#define RGBLIGHT_LIMIT_VAL 255 #define RGBLIGHT_LIMIT_VAL 255
/* This isn't defined by default, so there is no need to undefine it first. */
#define RGBLIGHT_SLEEP
// Mouse
#undef MOUSEKEY_INTERVAL #undef MOUSEKEY_INTERVAL
#define MOUSEKEY_INTERVAL 10 #define MOUSEKEY_INTERVAL 10
@@ -52,31 +55,34 @@
#define MOUSEKEY_DELAY 15 #define MOUSEKEY_DELAY 15
#undef MOUSEKEY_MAX_SPEED #undef MOUSEKEY_MAX_SPEED
#define MOUSEKEY_MAX_SPEED 15 #define MOUSEKEY_MAX_SPEED 20
#undef MOUSEKEY_TIME_TO_MAX #undef MOUSEKEY_TIME_TO_MAX
#define MOUSEKEY_TIME_TO_MAX 150 #define MOUSEKEY_TIME_TO_MAX 200
#undef MOUSEKEY_WHEEL_MAX_SPEED #undef MOUSEKEY_WHEEL_MAX_SPEED
#define MOUSEKEY_WHEEL_MAX_SPEED 15 #define MOUSEKEY_WHEEL_MAX_SPEED 20
#undef MOUSEKEY_WHEEL_TIME_TO_MAX #undef MOUSEKEY_WHEEL_TIME_TO_MAX
#define MOUSEKEY_WHEEL_TIME_TO_MAX 150 #define MOUSEKEY_WHEEL_TIME_TO_MAX 200
/* This is defined only if CONSOLE_ENABLE is set to "yes" */
// #undef NO_DEBUG // #undef NO_DEBUG
// #define NO_DEBUG // #define NO_DEBUG
// #undef NO_PRINT // #undef NO_PRINT
// #define NO_PRINT // #define NO_PRINT
/* For COMBO only*/ // #define RETRO_TAPPING
// #define COMBO_COUNT 1 // #define TAPPING_FORCE_HOLD
// #define COMBO_TERM 200
/* For tap toggle */ // #define AUTO_SHIFT_TIMEOUT 150
// #define TAPPING_TOGGLE 2 // #define NO_AUTO_SHIFT_SPECIAL
// #define ONESHOT_TAP_TOGGLE 2 // #define NO_AUTO_SHIFT_NUMERIC
// #define ONESHOT_TIMEOUT 300 // #define NO_AUTO_SHIFT_ALPHA
// #define EXTRA_LONG_COMBOS
// #define EXTRA_EXTRA_LONG_COMBOS
// #define COMBO_ALLOW_ACTION_KEYS
// #define RGBLIGHT_SLEEP
@@ -1 +0,0 @@
https://i.imgur.com/fKX0Zbs.png
@@ -1 +0,0 @@
https://i.imgur.com/giAc3M9.jpg
@@ -1,7 +1,7 @@
let gulp = require('gulp'); let gulp = require('gulp');
let run = require('gulp-run-command').default; let run = require('gulp-run-command').default;
gulp.task('clean', run('rm -rf ../../../../.build')); gulp.task('clean', run('rm -rf ../../../../.build'));
gulp.task('build', ['clean'], run('make -C ../../../../ ergodox_ez:hacker_dvorak', { gulp.task('build', ['clean'], run('make -C ../../../../ ergodox_ez:hacker_dvorak', {
@@ -9,5 +9,11 @@ gulp.task('build', ['clean'], run('make -C ../../../../ ergodox_ez:hacker_dvorak
})); }));
gulp.task('watch', ['build'], () => { gulp.task('watch', ['build'], () => {
gulp.watch(['keymap.c', 'config.h', 'rules.mk'], ['build']); gulp.watch([
'keymap.c',
'config.h',
'rules.mk',
], ['build']);
}); });
gulp.task('default', ['watch']);
@@ -0,0 +1,353 @@
// Keyboard keymap:
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[DVORAK] = LAYOUT_ergodox(
// HACKER DVORAK left hand
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// ESCAPE | | | | | | START RECORDING //
// | | | | | | //
KC_ESC, TD(GRV_TILD), TD(AT_DLR), TD(LCBR_LABK), TD(LPRN_LBRC), TD(EXLM_QUES), DYN_REC_START1, //
// | ~ | $ | < | [ | ? | //
// | TAP DANCE: ` | TAP DANCE: @ TAP DANCE: { | TAP DANCE: ( | TAP DANCE: ! | DYNAMIC MARCO 1 //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// TAB | MOD TAP: ALT+SHIFT | MOD TAP: CTRL+ALT | MOD TAP: CTRL+SHIFT | P | Y | //
// | | | | | | //
KC_TAB, TD(NONE_LEAD), TD(QUOT_DQUO), TD(DOT_COMM), ALL_T(KC_P), MEH_T(KC_Y), DYN_MACRO_PLAY1, //
// | LEAD | " | , | | | //
// | TAP DANCE: NONE | TAP DANCE: ' | TAP DANCE: . | MOD TAP: HYPER | MOD TAP: MEH | //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| PLAY DYNAMIC MACRO 1 //
// | MOD TAP: ALT | MOD TAP: CTRL | LAYER TAP: SHIFT | LAYER TAP: ARROW KEYS | MOD TAP: GUI | //
// | | | | Ü | | //
TD(EQL_PLUS), ALT_T(KC_A), CTL_T(KC_O), SFT_T(KC_E), LT(ARROWS, KC_U), LGUI_T(KC_I), //-----------------------//
// + | Á | Ó | É | Ú | Í | //
// TAP DANCE: = | TAP DANCE: A | TAP DANCE: O | TAP DANCE: E | TAP DANCE: U | TAP DANCE: I | //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------| META //
// STOP RECORDING | MOD TAP: GUI+SHIFT+ALT | Q | J | K | X | //
// | | | | | | //
DYN_REC_STOP, TD(SCLN_COLN), SGUI_T(KC_Q), LT(MEDIA_FN, KC_J), LT(NUMPAD, KC_K), LCAG_T(KC_X), KC_LGUI, //
// | : | | | | | //
// DYNAMIC MACRO | TAP DANCE: ; | MOD TAP: SHIFT+GUI | LAYER TAP: MEDIA/F-KEYS | LAYER TAP: ATM NUMPAD | MOD TAP: CTL+ALT+GUI | //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// LAYERS SWITCHER | APPLICATION MENU | | | //
// | | | | SCROLL //
TG(LAYERS), KC_APP, KC_NLCK, KC_SLCK, KC_CAPS, //
// | | | | NUM //
// LAYER TOGGLE | | | | TAP DANCE: CAPS //
//------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// HACKER DVORAK left thumb
//------------------------+------------------------//
// MOUSE WHEEL LEFT | MOUSE WHEEL RIGHT //
// | //
KC_WH_L, KC_WH_R, //
// | //
// | //
//-------------------------+-------------------------+------------------------//
// | | HOME //
// | | //
/* SPACE | BACKSPACE */ KC_HOME, //
// | | //
// | | //
KC_SPC, KC_BSPC, //-----------------------//
// | | END //
// | | //
/* | */ KC_END, //
// | | //
// | | //
//-------------------------+-------------------------+------------------------//
// HACKER DVORAK right hand
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// | | | | | | //
// | | | | | | //
DYN_REC_START2, TD(APMR_PIPE), TD(RPRN_RBRC), TD(RCBR_RABK), TD(HASH_PERC), TD(ASTR_CIRC), XXXXXXX, //
// | | | | | | //
// | | | | | | //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// | | | | | | //
// | | | | | | //
DYN_MACRO_PLAY2, MEH_T(KC_F), ALL_T(KC_G), C_S_T(KC_C), LCA_T(KC_R), LAS_T(KC_L), TD(SLSH_BSLS), //
// | | | | | | //
// | | | | | | //
// |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// | | | | | | //
// | | | | | | //
/*-----------------------*/ LGUI_T(KC_D), LT(MOUSE, KC_H), SFT_T(KC_T), CTL_T(KC_N), ALT_T(KC_S), TD(MINS_UNDS), //
// | | | | | | //
// | | | | | | //
// |-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// | | | | | | //
// | | | | | | //
KC_LGUI, LCAG_T(KC_B), LT(HYPER, KC_M), LT(MEDIA_FN, KC_W), SGUI_T(KC_V), LGAS_T(KC_Z), COMPOSE, //
// | | | | | | //
// | | | | | | ⎄ //
//------------------------+-------------------------+-------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// | | | | //
// | | | | //
KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_SYSREQ, //
// | | | | //
// | | | | //
//------------------------+-------------------------+-------------------------+-------------------------+------------------------//
// HACKER DVORAK right thumb
//------------------------+------------------------//
// | //
// | //
KC_WH_U, KC_WH_D, //
// | //
// | //
//------------------------+-------------------------+------------------------//
// | | //
// | | //
KC_PGUP, // | //
// | | //
// | | //
//------------------------| | //
// | | //
// | | //
KC_PGDN, KC_DEL, KC_ENT //
// | | //
// | | //
//------------------------+-------------------------+------------------------//
),
[PLOVER] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN3, GUI_T(KC_NO),
KC_ESC, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN5, PV_NUM,
KC_TAB, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR,
KC_CLCK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
XXXXXXX, TG(LAYERS), PV_NUM, PV_NUM, PV_NUM,
// left thumb
KC_SPACE, KC_BSPACE,
KC_HOME,
PV_A, PV_O, KC_END,
// right hand
KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, KC_UP, KC_APPLICATION, XXXXXXX, KC_MS_WH_UP,
PV_NUM, KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_MS_WH_DOWN,
PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
PV_NUM, PV_NUM, PV_NUM, PV_NUM, XXXXXXX,
// right thumb
KC_DELETE, KC_ENTER,
KC_PGUP,
KC_PGDOWN, PV_E, PV_U
),
[GAMING] = LAYOUT_ergodox(
// left hand
KC_ESCAPE, GUI_T(KC_MINS), KC_I, KC_O, KC_P, ALGR_T(KC_EQL), KC_T,
KC_TAB, KC_LALT, KC_Q, KC_W, KC_E, ALL_T(KC_R), KC_G,
LT(MOUSE, KC_GRV), KC_LCTRL, KC_A, KC_S, KC_D, MEH_T(KC_F),
KC_BSLS, KC_LSHIFT, KC_Z, KC_X, KC_C, SCMD_T(KC_V), KC_M,
XXXXXXX, TG(LAYERS), KC_COMM, KC_DOT, KC_LBRC,
// left thumb
MO(MEDIA_FN), KC_NLCK,
KC_SCLN,
KC_SPACE, KC_ENTER, KC_BSPACE,
// right hand
KC_QUOT, KC_Y, KC_K, KC_U, KC_KP_7, KC_KP_8, KC_KP_9,
KC_MS_WH_UP, KC_H, KC_J, KC_L, KC_KP_4, KC_KP_2, KC_KP_6,
KC_B, KC_MS_UP, KC_N, KC_KP_1, KC_KP_5, KC_KP_3,
KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_UP, KC_KP_0, KC_SLASH,
KC_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX,
// right thumb
KC_MS_BTN5, MO(HYPER),
KC_MS_BTN4,
KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1
),
[ARROWS] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, SCMD_T(KC_NO), MEH_T(KC_NO), ALL_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, KC_LCTRL, KC_LSHIFT, XXXXXXX, _______, XXXXXXX,
XXXXXXX, KC_RALT, KC_LALT, GUI_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
KC_HOME,
KC_SPACE, KC_BSPACE, KC_END,
// right hand
LGUI(KC_X), XXXXXXX, LCTL(KC_X), KC_MS_WH_UP, XXXXXXX, XXXXXXX, XXXXXXX,
LGUI(KC_C), XXXXXXX, LCTL(KC_C), KC_UP, SCTL(KC_C), LCTL(KC_Z), LGUI(KC_Z),
KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_APPLICATION,
LGUI(KC_V), XXXXXXX, LCTL(KC_V), KC_MS_WH_DOWN, SCTL(KC_V), LCTL(KC_Y), SGUI(KC_Z),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK,
// right thumb
XXXXXXX, XXXXXXX,
KC_PGUP,
KC_PGDOWN, KC_DELETE, KC_ENTER
),
[MOUSE] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_UP, LCTL(KC_X), XXXXXXX, LGUI(KC_X),
LGUI(KC_Z), LCTL(KC_Z), SCTL(KC_C), KC_MS_UP, LCTL(KC_C), KC_MS_BTN4, LGUI(KC_C),
KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_RIGHT,
LGUI(KC_Z), LCTL(KC_Y), SCTL(KC_V), KC_MS_WH_DOWN, LCTL(KC_V), KC_MS_BTN5, LGUI(KC_V),
KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
KC_MS_BTN1, KC_MS_BTN2, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, ALL_T(KC_NO), MEH_T(KC_NO), SCMD_T(KC_NO), XXXXXXX,
XXXXXXX, _______, KC_MS_ACCEL1, KC_LSHIFT, KC_LCTRL, KC_MS_ACCEL2,
XXXXXXX, XXXXXXX, XXXXXXX, GUI_T(KC_NO), KC_LALT, KC_RALT, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, KC_MS_ACCEL0
),
[NUMPAD] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, GUI_T(KC_NO), XXXXXXX, ALL_T(KC_NO), XXXXXXX, XXXXXXX,
_______, KC_LCTRL, KC_LSHIFT, _______, MEH_T(KC_NO), XXXXXXX,
XXXXXXX, KC_RALT, KC_LALT, XXXXXXX, SCMD_T(KC_NO), XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
KC_HOME,
KC_SPACE, KC_BSPACE, KC_END,
// right hand
KC_X, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
KC_O, KC_I, KC_1, KC_2, KC_3, KC_SLSH, KC_PERC,
KC_M, KC_4, KC_5, KC_6, KC_PLUS, KC_MINS,
KC_L, KC_J, KC_7, KC_8, KC_9, KC_ASTR, KC_CIRC,
KC_DOT, KC_0, KC_COMM, KC_UNDS, KC_BSLS,
// right thumb
XXXXXXX, XXXXXXX,
KC_PGUP,
KC_PGDOWN, KC_DELETE, KC_ENTER
),
[LAYERS] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, TO(DVORAK), TO(PLOVER), TO(GAMING), XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[MEDIA_FN] = LAYOUT_ergodox(
// left hand
KC_VOLD, KC_MUTE, RGB_TOG, XXXXXXX, KC_MAIL, KC_FIND, KC_WWW_REFRESH,
KC_MPRV, KC_F9, KC_F7, KC_F5, KC_F3, KC_F1, KC_WWW_HOME,
KC_PAUS, KC_F19, KC_F17, KC_F15, KC_F13, KC_F11,
RGB_HUD, XXXXXXX, XXXXXXX, _______, KC_F23, KC_F21, KC_WWW_BACK,
RGB_VAD, KC_CLCK, KC_PSCREEN, XXXXXXX, MO(FIRMWARE),
// left thumb
_______, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, KC_MEDIA_EJECT,
// right hand
KC_WWW_FAVORITES, KC_MYCM, KC_CALC, XXXXXXX, RGB_MOD, RGB_M_P, KC_VOLU,
KC_WWW_SEARCH, KC_F2, KC_F4, KC_F6, KC_F8, KC_F10, KC_MNXT,
KC_F12, KC_F14, KC_F16, KC_F18, KC_F20, KC_MPLY,
KC_WWW_FORWARD, KC_F22, KC_F24, _______, XXXXXXX, XXXXXXX, RGB_HUI,
KC_PWR, XXXXXXX, KC_SLEP, KC_WAKE, RGB_VAI,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
RGB_GREEN, XXXXXXX, XXXXXXX
),
[HYPER] = LAYOUT_ergodox(
// left hand
XXXXXXX, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), XXXXXXX,
XXXXXXX, HYPR(KC_F6), HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), XXXXXXX,
XXXXXXX, HYPR(KC_F11), HYPR(KC_F12), HYPR(KC_F13), HYPR(KC_F14), HYPR(KC_F15),
XXXXXXX, HYPR(KC_F16), HYPR(KC_F17), HYPR(KC_F18), HYPR(KC_F19), HYPR(KC_F20), XXXXXXX,
XXXXXXX, HYPR(KC_F21), HYPR(KC_F22), HYPR(KC_F23), HYPR(KC_F24),
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, _______,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[FIRMWARE] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
RESET, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, EEP_RST
)
};
@@ -0,0 +1,5 @@
// Keycode aliases
#define SCTL(kc) LSFT(LCTL(kc)) // Modifier keys: SHIFT+CTRL+kc combination.
#define LGAS_T(kc) MT(MOD_LGUI | MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, GUI+ALT+SHIFT when held.
#define LAS_T(kc) MT(MOD_LALT | MOD_LSFT, kc) // Mod tap: kc when tapped, ALT+SHIFT whin held.
#define COMPOSE KC_RALT // Compose key (used to input characters like á, ñ, ü).
@@ -0,0 +1,8 @@
// Define custom user keycodes:
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // Can always be here.
RGB_GREEN, // To set default RGB layer as green once.
MY_CUSTOM_MACRO, // Custom macro example.
MY_OTHER_MACRO, // Custom macro example.
DYNAMIC_MACRO_RANGE // Should always be the last.
};
@@ -1,781 +1,19 @@
#include QMK_KEYBOARD_H #include QMK_KEYBOARD_H // Includes the QMK-verse.
#include "keymap_dvorak.h" #include "keymap_plover.h" // Includes the Plover keymap for easier readability.
#include "sendstring_dvorak.h"
#include "keymap_plover.h"
#include "keymap_plover_dvorak.h" // TODO: No eeprom changes unless needed, custom rgb settings for animations.
#include "keycodes/aliases_definitions.c"
#include "layers/layers_definitions.c"
#define SCTL(kc) LSFT(LCTL(kc)) #include "tap_dance/tap_dance_setup.c"
#include "tap_dance/tap_dances.c"
// Layers #include "user/matrix_scan_user.c"
enum layers { #include "tap_dance/mod_tap_layer_dances/none_lead.c"
DVORAK_US = 0, #include "tap_dance/tap_dance_actions.c"
PLOVER_US, #include "keycodes/custom_keycodes.c"
GAMING_US, #include "dynamic_macro.h" // Includes dynamic macro definitions, needed *after* the custom keycodes.
ARROWS_US, #include "hacker_dvorak.c"
MOUSE_US, #include "user/eeconfig_init_user.c"
NUMPAD_US, #include "user/process_record_user.c"
LAYERS_US, #include "plover/plover_mode.c"
DVORAK_DV, #include "user/layer_set_state_user.c"
PLOVER_DV,
GAMING_DV,
ARROWS_DV,
MOUSE_DV,
NUMPAD_DV,
LAYERS_DV,
MEDIA_FN,
HYPER_FN,
MEH_FN,
MEH_FN_PLUS,
FIRMWARE
};
int CAPS_LOCK = 0;
int NUM_LOCK = 0;
int SCROLL_LOCK = 0;
enum tap_dances {
TD_ESC_CAPS = 0
};
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CLCK)
};
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
RGB_GREEN // to set default RGB layer as green once
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | 7 | 8 | 9 | 10 | 11 | 12 | 13 | | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | 14 | 15 | 16 | 17 | 18 | 19 |------| |------| 52 | 53 | 54 | 55 | 56 | 57 |
* |--------+------+------+------+------+------| 26 | | 58 |------+------+------+------+------+--------|
* | 20 | 21 | 22 | 23 | 24 | 25 | | | | 59 | 60 | 61 | 62 | 63 | 64 |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | 27 | 28 | 29 | 30 | 31 | | 65 | 66 | 67 | 68 | 69 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | 32 | 33 | | 70 | 71 |
* ,------+------+------| |------+------+------.
* | | | 34 | | 72 | | |
* | 35 | 36 |------| |------| 74 | 75 |
* | | | 37 | | 73 | | |
* `--------------------' `--------------------'
*/
[DVORAK_US] = LAYOUT_ergodox(
// left hand
KC_ESC, KC_LABK, KC_LCBR, KC_LBRC, KC_LPRN, KC_EXLM, KC_AMPR,
KC_TAB, KC_QUOT, SCMD_T(KC_COMM), MEH_T(KC_DOT), ALL_T(KC_P), KC_Y, KC_AT,
KC_EQL, CTL_T(KC_A), SFT_T(KC_O), LT(NUMPAD_US, KC_E), LT(ARROWS_US, KC_U), KC_I,
KC_BSLS, ALGR_T(KC_SCLN), ALT_T(KC_Q), LT(MEDIA_FN, KC_J), GUI_T(KC_K), KC_X, KC_PERC,
MO(MEH_FN), TG(LAYERS_US), KC_CIRC, KC_PLUS, KC_COLN,
// left thumb
KC_LEFT, KC_RGHT,
KC_HOME,
KC_SPC, KC_BSPC, KC_END,
// right hand
KC_PIPE, KC_QUES, KC_RPRN, KC_RBRC, KC_RCBR, KC_RABK, KC_ASTR,
KC_HASH, KC_F, ALL_T(KC_G), MEH_T(KC_C), SCMD_T(KC_R), KC_L, KC_SLSH,
KC_D, LT(MOUSE_US, KC_H), LT(HYPER_FN, KC_T), SFT_T(KC_N), CTL_T(KC_S), KC_MINS,
KC_DLR, KC_B, GUI_T(KC_M), LT(MEDIA_FN, KC_W), ALT_T(KC_V), ALGR_T(KC_Z), KC_GRV,
KC_DQUO, KC_UNDS, KC_TILD, TG(DVORAK_DV), MO(MEH_FN_PLUS),
// right thumb
KC_UP, KC_DOWN,
KC_PGUP,
KC_PGDN, KC_DEL, KC_ENT
),
[PLOVER_US] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN3, GUI_T(KC_NO),
KC_ESC, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN5, PV_NUM,
KC_TAB, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR,
KC_CLCK, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
MO(MEH_FN), TG(LAYERS_US), PV_NUM, PV_NUM, PV_NUM,
// left thumb
KC_SPACE, KC_BSPACE,
KC_HOME,
PV_A, PV_O, KC_END,
// right hand
KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, KC_UP, KC_APPLICATION, XXXXXXX, KC_MS_WH_UP,
PV_NUM, KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_MS_WH_DOWN,
PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
PV_NUM, PV_NUM, PV_NUM, PV_NUM, MO(MEH_FN_PLUS),
// right thumb
KC_DELETE, KC_ENTER,
KC_PGUP,
KC_PGDOWN, PV_E, PV_U
),
[GAMING_US] = LAYOUT_ergodox(
// left hand
KC_ESCAPE, GUI_T(KC_MINS), KC_I, KC_O, KC_P, ALGR_T(KC_EQL), KC_T,
KC_TAB, KC_LALT, KC_Q, KC_W, KC_E, ALL_T(KC_R), KC_G,
LT(MOUSE_US, KC_GRV), KC_LCTRL, KC_A, KC_S, KC_D, MEH_T(KC_F),
KC_BSLS, KC_LSHIFT, KC_Z, KC_X, KC_C, SCMD_T(KC_V), KC_M,
MO(MEH_FN), TG(LAYERS_US), KC_COMM, KC_DOT, KC_LBRC,
// left thumb
MO(MEDIA_FN), KC_NLCK,
KC_SCLN,
KC_SPACE, KC_ENTER, KC_BSPACE,
// right hand
KC_QUOT, KC_Y, KC_K, KC_U, KC_KP_7, KC_KP_8, KC_KP_9,
KC_MS_WH_UP, KC_H, KC_J, KC_L, KC_KP_4, KC_KP_2, KC_KP_6,
KC_B, KC_MS_UP, KC_N, KC_KP_1, KC_KP_5, KC_KP_3,
KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_UP, KC_KP_0, KC_SLASH,
KC_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, MO(MEH_FN_PLUS),
// right thumb
KC_MS_BTN5, MO(HYPER_FN),
KC_MS_BTN4,
KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1
),
[ARROWS_US] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, SCMD_T(KC_NO), MEH_T(KC_NO), ALL_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, KC_LCTRL, KC_LSHIFT, XXXXXXX, _______, XXXXXXX,
XXXXXXX, KC_RALT, KC_LALT, GUI_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
KC_HOME,
KC_SPACE, KC_BSPACE, KC_END,
// right hand
LGUI(KC_X), XXXXXXX, LCTL(KC_X), KC_MS_WH_UP, XXXXXXX, XXXXXXX, XXXXXXX,
LGUI(KC_C), XXXXXXX, LCTL(KC_C), KC_UP, SCTL(KC_C), LCTL(KC_Z), LGUI(KC_Z),
KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_APPLICATION,
LGUI(KC_V), XXXXXXX, LCTL(KC_V), KC_MS_WH_DOWN, SCTL(KC_V), LCTL(KC_Y), SGUI(KC_Z),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK,
// right thumb
XXXXXXX, XXXXXXX,
KC_PGUP,
KC_PGDOWN, KC_DELETE, KC_ENTER
),
[MOUSE_US] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_UP, LCTL(KC_X), XXXXXXX, LGUI(KC_X),
LGUI(KC_Z), LCTL(KC_Z), SCTL(KC_C), KC_MS_UP, LCTL(KC_C), KC_MS_BTN4, LGUI(KC_C),
KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_RIGHT,
LGUI(KC_Z), LCTL(KC_Y), SCTL(KC_V), KC_MS_WH_DOWN, LCTL(KC_V), KC_MS_BTN5, LGUI(KC_V),
KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
KC_MS_BTN1, KC_MS_BTN2, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, ALL_T(KC_NO), MEH_T(KC_NO), SCMD_T(KC_NO), XXXXXXX,
XXXXXXX, _______, KC_MS_ACCEL1, KC_LSHIFT, KC_LCTRL, KC_MS_ACCEL2,
XXXXXXX, XXXXXXX, XXXXXXX, GUI_T(KC_NO), KC_LALT, KC_RALT, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, KC_MS_ACCEL0
),
[NUMPAD_US] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, GUI_T(KC_NO), XXXXXXX, ALL_T(KC_NO), XXXXXXX, XXXXXXX,
_______, KC_LCTRL, KC_LSHIFT, _______, MEH_T(KC_NO), XXXXXXX,
XXXXXXX, KC_RALT, KC_LALT, XXXXXXX, SCMD_T(KC_NO), XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
KC_HOME,
KC_SPACE, KC_BSPACE, KC_END,
// right hand
KC_X, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F,
KC_O, KC_I, KC_1, KC_2, KC_3, KC_SLSH, KC_PERC,
KC_M, KC_4, KC_5, KC_6, KC_PLUS, KC_MINS,
KC_L, KC_J, KC_7, KC_8, KC_9, KC_ASTR, KC_CIRC,
KC_DOT, KC_0, KC_COMM, KC_UNDS, KC_BSLS,
// right thumb
XXXXXXX, XXXXXXX,
KC_PGUP,
KC_PGDOWN, KC_DELETE, KC_ENTER
),
[LAYERS_US] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, TO(DVORAK_US), TO(PLOVER_US), TO(GAMING_US), XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[DVORAK_DV] = LAYOUT_ergodox(
// left hand
KC_ESC, DV_LABK, DV_LCBR, DV_LBRC, DV_LPRN, DV_EXLM, DV_AMPR,
KC_TAB, DV_QUOT, SCMD_T(DV_COMM), MEH_T(DV_DOT), ALL_T(DV_P), DV_Y, DV_AT,
DV_EQL, CTL_T(DV_A), SFT_T(DV_O), LT(NUMPAD_DV, DV_E), LT(ARROWS_DV, DV_U), DV_I,
DV_BSLS, ALGR_T(DV_SCLN), ALT_T(DV_Q), LT(MEDIA_FN, DV_J), GUI_T(DV_K), DV_X, DV_PERC,
MO(MEH_FN), TG(LAYERS_DV), DV_CIRC, DV_PLUS, DV_COLN,
// left thumb
KC_LEFT, KC_RGHT,
KC_HOME,
KC_SPC, KC_BSPC, KC_END,
// right hand
DV_PIPE, DV_QUES, DV_RPRN, DV_RBRC, DV_RCBR, DV_RABK, DV_ASTR,
DV_HASH, DV_F, ALL_T(DV_G), MEH_T(DV_C), SCMD_T(DV_R), DV_L, DV_SLSH,
DV_D, LT(MOUSE_DV, DV_H), LT(HYPER_FN, DV_T), SFT_T(DV_N), CTL_T(DV_S), DV_MINS,
DV_DLR, DV_B, GUI_T(DV_M), LT(MEDIA_FN, DV_W), ALT_T(DV_V), ALGR_T(DV_Z), DV_GRV,
DV_DQUO, DV_UNDS, DV_TILD, _______, MO(MEH_FN_PLUS),
// right thumb
KC_UP, KC_DOWN,
KC_PGUP,
KC_PGDN, KC_DEL, KC_ENT
),
[PLOVER_DV] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN3, GUI_T(KC_NO),
KC_ESC, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_BTN5, PD_NUM,
KC_TAB, PD_LS, PD_LT, PD_LP, PD_LH, PD_STAR,
KC_CLCK, PD_LS, PD_LK, PD_LW, PD_LR, PD_STAR, PD_STAR,
MO(MEH_FN), TG(LAYERS_DV), PD_NUM, PD_NUM, PD_NUM,
// left thumb
KC_SPACE, KC_BSPACE,
KC_HOME,
PD_A, PD_O, KC_END,
// right hand
KC_MS_ACCEL2, KC_MS_ACCEL1, KC_MS_ACCEL0, KC_UP, KC_APPLICATION, XXXXXXX, KC_MS_WH_UP,
PD_NUM, KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_MS_WH_DOWN,
PD_STAR, PD_RF, PD_RP, PD_RL, PD_RT, PD_RD,
PD_STAR, PD_STAR, PD_RR, PD_RB, PD_RG, PD_RS, PD_RZ,
PD_NUM, PD_NUM, PD_NUM, PD_NUM, MO(MEH_FN_PLUS),
// right thumb
KC_DELETE, KC_ENTER,
KC_PGUP,
KC_PGDOWN, PD_E, PD_U
),
[GAMING_DV] = LAYOUT_ergodox(
// left hand
KC_ESCAPE, GUI_T(DV_MINS), DV_I, DV_O, DV_P, ALGR_T(DV_EQL), DV_T,
KC_TAB, KC_LALT, DV_Q, DV_W, DV_E, ALL_T(DV_R), DV_G,
LT(MOUSE_DV, DV_GRV), KC_LCTRL, DV_A, DV_S, DV_D, MEH_T(DV_F),
DV_BSLS, KC_LSHIFT, DV_Z, DV_X, DV_C, SCMD_T(DV_V), DV_M,
MO(MEH_FN), TG(LAYERS_DV), DV_COMM, DV_DOT, DV_LBRC,
// left thumb
MO(MEDIA_FN), KC_NLCK,
DV_SCLN,
KC_SPACE, KC_ENTER, KC_BSPACE,
// right hand
DV_QUOT, DV_Y, DV_K, DV_U, KC_KP_7, KC_KP_8, KC_KP_9,
KC_MS_WH_UP, DV_H, DV_J, DV_L, KC_KP_4, KC_KP_2, KC_KP_6,
DV_B, KC_MS_UP, DV_N, KC_KP_1, KC_KP_5, KC_KP_3,
KC_MS_WH_DOWN, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_UP, KC_KP_0, DV_SLSH,
DV_RBRC, KC_LEFT, KC_DOWN, KC_RIGHT, MO(MEH_FN_PLUS),
// right thumb
KC_MS_BTN5, MO(HYPER_FN),
KC_MS_BTN4,
KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1
),
[ARROWS_DV] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, SCMD_T(KC_NO), MEH_T(KC_NO), ALL_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, KC_LCTRL, KC_LSHIFT, XXXXXXX, _______, XXXXXXX,
XXXXXXX, KC_RALT, KC_LALT, GUI_T(KC_NO), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
KC_HOME,
KC_SPACE, KC_BSPACE, KC_END,
// right hand
LGUI(DV_X), XXXXXXX, LCTL(DV_X), KC_MS_WH_UP, XXXXXXX, XXXXXXX, XXXXXXX,
LGUI(DV_C), XXXXXXX, LCTL(DV_C), KC_UP, SCTL(DV_C), LCTL(DV_Z), LGUI(DV_Z),
KC_MS_WH_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_RIGHT, KC_APPLICATION,
LGUI(DV_V), XXXXXXX, LCTL(DV_V), KC_MS_WH_DOWN, SCTL(DV_V), LCTL(DV_Y), SGUI(DV_Z),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK,
// right thumb
XXXXXXX, XXXXXXX,
KC_PGUP,
KC_PGDOWN, KC_DELETE, KC_ENTER
),
[MOUSE_DV] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_WH_UP, LCTL(DV_X), XXXXXXX, LGUI(DV_X),
LGUI(DV_Z), LCTL(DV_Z), SCTL(DV_C), KC_MS_UP, LCTL(DV_C), KC_MS_BTN4, LGUI(DV_C),
KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_RIGHT,
LGUI(DV_Z), LCTL(DV_Y), SCTL(DV_V), KC_MS_WH_DOWN, LCTL(DV_V), KC_MS_BTN5, LGUI(DV_V),
KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
KC_MS_BTN1, KC_MS_BTN2, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, ALL_T(KC_NO), MEH_T(KC_NO), SCMD_T(KC_NO), XXXXXXX,
XXXXXXX, _______, KC_MS_ACCEL1, KC_LSHIFT, KC_LCTRL, KC_MS_ACCEL2,
XXXXXXX, XXXXXXX, XXXXXXX, GUI_T(KC_NO), KC_LALT, KC_RALT, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, KC_MS_ACCEL0
),
[NUMPAD_DV] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, GUI_T(KC_NO), XXXXXXX, ALL_T(KC_NO), XXXXXXX, XXXXXXX,
_______, KC_LCTRL, KC_LSHIFT, _______, MEH_T(KC_NO), XXXXXXX,
XXXXXXX, KC_RALT, KC_LALT, XXXXXXX, SCMD_T(KC_NO), XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
KC_HOME,
KC_SPACE, KC_BSPACE, KC_END,
// right hand
DV_X, DV_A, DV_B, DV_C, DV_D, DV_E, DV_F,
DV_O, DV_I, DV_1, DV_2, DV_3, DV_SLSH, DV_PERC,
DV_M, DV_4, DV_5, DV_6, DV_PLUS, DV_MINS,
DV_L, DV_J, DV_7, DV_8, DV_9, DV_ASTR, DV_CIRC,
DV_DOT, DV_0, DV_COMM, DV_UNDS, DV_BSLS,
// right thumb
XXXXXXX, XXXXXXX,
KC_PGUP,
KC_PGDOWN, KC_DELETE, KC_ENTER
),
[LAYERS_DV] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, TO(DVORAK_DV), TO(PLOVER_DV), TO(GAMING_DV), XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[MEDIA_FN] = LAYOUT_ergodox(
// left hand
KC_AUDIO_VOL_DOWN, KC_AUDIO_MUTE, RGB_TOG, XXXXXXX, KC_MAIL, KC_FIND, KC_WWW_REFRESH,
KC_MEDIA_PREV_TRACK, KC_F9, KC_F7, KC_F5, KC_F3, KC_F1, KC_WWW_HOME,
KC_PAUSE, KC_F19, KC_F17, KC_F15, KC_F13, KC_F11,
RGB_HUD, XXXXXXX, XXXXXXX, _______, KC_F23, KC_F21, KC_WWW_BACK,
RGB_VAD, KC_CLCK, KC_PSCREEN, XXXXXXX, MO(FIRMWARE),
// left thumb
_______, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, KC_MEDIA_EJECT,
// right hand
KC_WWW_FAVORITES, KC_MY_COMPUTER, KC_CALCULATOR, XXXXXXX, RGB_MOD, RGB_M_P, KC_AUDIO_VOL_UP,
KC_WWW_SEARCH, KC_F2, KC_F4, KC_F6, KC_F8, KC_F10, KC_MEDIA_NEXT_TRACK,
KC_F12, KC_F14, KC_F16, KC_F18, KC_F20, KC_MEDIA_PLAY_PAUSE,
KC_WWW_FORWARD, KC_F22, KC_F24, _______, XXXXXXX, XXXXXXX, RGB_HUI,
KC_SYSTEM_POWER, XXXXXXX, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, RGB_VAI,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
RGB_GREEN, XXXXXXX, XXXXXXX
),
[HYPER_FN] = LAYOUT_ergodox(
// left hand
XXXXXXX, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), XXXXXXX,
XXXXXXX, HYPR(KC_F6), HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), XXXXXXX,
XXXXXXX, HYPR(KC_F11), HYPR(KC_F12), HYPR(KC_F13), HYPR(KC_F14), HYPR(KC_F15),
XXXXXXX, HYPR(KC_F16), HYPR(KC_F17), HYPR(KC_F18), HYPR(KC_F19), HYPR(KC_F20), XXXXXXX,
XXXXXXX, HYPR(KC_F21), HYPR(KC_F22), HYPR(KC_F23), HYPR(KC_F24),
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, _______,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[MEH_FN] = LAYOUT_ergodox(
// left hand
LCA(KC_F11), LCA(KC_F9), LCA(KC_F7), LCA(KC_F5), LCA(KC_F3), LCA(KC_F1), XXXXXXX,
LCAG(KC_F11), LCAG(KC_F9), LCAG(KC_F7), LCAG(KC_F5), LCAG(KC_F3), LCAG(KC_F1), XXXXXXX,
MEH(KC_F11), MEH(KC_F9), MEH(KC_F7), MEH(KC_F5), MEH(KC_F3), MEH(KC_F1),
SGUI(KC_F11), SGUI(KC_F9), SGUI(KC_F7), SGUI(KC_F5), SGUI(KC_F3), SGUI(KC_F1), XXXXXXX,
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, LCA(KC_F2), LCA(KC_F4), LCA(KC_F6), LCA(KC_F8), LCA(KC_F10), LCA(KC_F12),
XXXXXXX, LCAG(KC_F2), LCAG(KC_F4), LCAG(KC_F6), LCAG(KC_F8), LCAG(KC_F10), LCAG(KC_F12),
MEH(KC_F2), MEH(KC_F4), MEH(KC_F6), MEH(KC_F8), MEH(KC_F10), MEH(KC_F12),
XXXXXXX, SGUI(KC_F2), SGUI(KC_F4), SGUI(KC_F6), SGUI(KC_F8), SGUI(KC_F10), SGUI(KC_F12),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[MEH_FN_PLUS] = LAYOUT_ergodox(
// left hand
LCA(KC_F23), LCA(KC_F21), LCA(KC_F19), LCA(KC_F17), LCA(KC_F15), LCA(KC_F13), XXXXXXX,
LCAG(KC_F23), LCAG(KC_F21), LCAG(KC_F19), LCAG(KC_F17), LCAG(KC_F15), LCAG(KC_F13), XXXXXXX,
MEH(KC_F23), MEH(KC_F21), MEH(KC_F19), MEH(KC_F17), MEH(KC_F15), MEH(KC_F13),
SGUI(KC_F23), SGUI(KC_F21), SGUI(KC_F19), SGUI(KC_F17), SGUI(KC_F15), SGUI(KC_F13), XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, LCA(KC_F14), LCA(KC_F16), LCA(KC_F18), LCA(KC_F20), LCA(KC_F22), LCA(KC_F24),
XXXXXXX, LCAG(KC_F14), LCAG(KC_F16), LCAG(KC_F18), LCAG(KC_F20), LCAG(KC_F22), LCAG(KC_F24),
MEH(KC_F14), MEH(KC_F16), MEH(KC_F18), MEH(KC_F20), MEH(KC_F22), MEH(KC_F24),
XXXXXXX, SGUI(KC_F14), SGUI(KC_F16), SGUI(KC_F18), SGUI(KC_F20), SGUI(KC_F22), SGUI(KC_F24),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX
),
[FIRMWARE] = LAYOUT_ergodox(
// left hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
// left thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
RESET, XXXXXXX, XXXXXXX,
// right hand
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
// right thumb
XXXXXXX, XXXXXXX,
XXXXXXX,
XXXXXXX, XXXXXXX, EEP_RST
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case RGB_GREEN:
if (record->event.pressed) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable();
rgblight_mode(1);
rgblight_sethsv_red();
#endif
}
return false;
case KC_CLCK:
if (record->event.pressed) {
if (!(CAPS_LOCK)) {
ergodox_right_led_1_on();
CAPS_LOCK = 1;
} else {
ergodox_right_led_1_off();
CAPS_LOCK = 0;
}
}
return true;
case KC_NLCK:
if (record->event.pressed) {
if (!(NUM_LOCK)) {
ergodox_right_led_2_on();
NUM_LOCK = 1;
} else {
ergodox_right_led_2_off();
NUM_LOCK = 0;
}
}
return true;
case KC_SLCK:
if (record->event.pressed) {
if (!(SCROLL_LOCK)) {
ergodox_right_led_3_on();
SCROLL_LOCK = 1;
} else {
ergodox_right_led_3_off();
SCROLL_LOCK = 0;
}
}
case KC_MS_WH_LEFT:
if (record->event.pressed) {
if (SCROLL_LOCK) {
return false;
} else {
return true;
}
}
case KC_MS_WH_UP:
if (record->event.pressed) {
if (SCROLL_LOCK) {
return false;
} else {
return true;
}
}
case KC_MS_WH_DOWN:
if (record->event.pressed) {
if (SCROLL_LOCK) {
return false;
} else {
return true;
}
}
case KC_MS_WH_RIGHT:
if (record->event.pressed) {
if (SCROLL_LOCK) {
return false;
} else {
return true;
}
}
default:
return true;
}
}
uint32_t layer_state_set_user(uint32_t state) {
uint8_t layer = biton32(state);
switch (layer) {
case DVORAK_US:
rgblight_sethsv_noeeprom_red();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
break;
case PLOVER_US:
rgblight_sethsv_noeeprom_red();
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
break;
case GAMING_US:
rgblight_sethsv_noeeprom_red();
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
break;
case ARROWS_US:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case MOUSE_US:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case NUMPAD_US:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case LAYERS_US:
rgblight_sethsv_noeeprom_cyan();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case DVORAK_DV:
rgblight_sethsv_noeeprom_green();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
break;
case PLOVER_DV:
rgblight_sethsv_noeeprom_green();
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
break;
case GAMING_DV:
rgblight_sethsv_noeeprom_green();
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
break;
case ARROWS_DV:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case MOUSE_DV:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case NUMPAD_DV:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case LAYERS_DV:
rgblight_sethsv_noeeprom_cyan();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case MEDIA_FN:
rgblight_sethsv_noeeprom_yellow();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case HYPER_FN:
rgblight_sethsv_noeeprom_magenta();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
case MEH_FN:
rgblight_sethsv_noeeprom_magenta();
rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 4);
break;
case MEH_FN_PLUS:
rgblight_sethsv_noeeprom_magenta();
rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 5);
break;
case FIRMWARE:
rgblight_sethsv_noeeprom_pink();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
break;
default:
break;
}
return state;
};
@@ -0,0 +1,12 @@
enum layers { // Hacker Dvorak keyboard layers:
DVORAK = 0, // * Dvorak base layer.
PLOVER = 1, // * Steno layer for use with Plover.
GAMING = 2, // * Gaming layer intended for general purpose playing.
ARROWS = 3, // * Arrows movement keys and edition shortcuts.
MOUSE = 4, // * Mouse movement keys and edition shortcuts.
NUMPAD = 5, // * ATM style numpad with symbols and letters that should suffice to input any numeric literal.
LAYERS = 6, // * Layer switcher used to change between DVORAK, PLOVER and GAMING layers.
MEDIA_FN = 7, // * Media, RGB and function keys from F1 to F24 in symmetric fashion.
HYPER = 8, // * Hot keys layer (uses hyper + F1 .. F24) suitable for global shortcut tasks.
FIRMWARE = 9 // * Layer with firmware related functionality, like the reset and EEPROM keys.
};
@@ -0,0 +1,14 @@
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_ONE_KEY(TD(APMR_PIPE)) {
register_code(KC_LCTL);
register_code(KC_LSFT);
register_code(KC_U);
unregister_code(KC_U);
unregister_code(KC_LSFT);
unregister_code(KC_LCTL);
}
}
@@ -0,0 +1,14 @@
LEADER_EXTERNS();
void qk_leader_start(void) {
if (!leading) {
leading = true;
leader_time = timer_read();
leader_sequence_size = 0;
leader_sequence[0] = 0;
leader_sequence[1] = 0;
leader_sequence[2] = 0;
leader_sequence[3] = 0;
leader_sequence[4] = 0;
}
}
@@ -0,0 +1,20 @@
// TODO: improve feedback
void plover_toggle(void) {
// Press "PHROLG"
register_code(PV_LP);
register_code(PV_LH);
register_code(PV_LR);
register_code(PV_O);
register_code(PV_RL);
register_code(PV_RG);
// Release "PHROLG"
unregister_code(PV_LP);
unregister_code(PV_LH);
unregister_code(PV_LR);
unregister_code(PV_O);
unregister_code(PV_RL);
unregister_code(PV_RG);
}
bool PLOVER_MODE = false;
@@ -17,8 +17,8 @@ I plan to use [QMK](https://docs.qmk.fm) in the future, in order to overcome som
* All symbols (including shifted symbols). * All symbols (including shifted symbols).
* All modifier are dual keys positioned near the home row. * All modifier are dual keys positioned near the home row.
2. Querty 2. Querty
* Used to overcome the limitation pointed above, when your OS layout is set to Dvorak instead of US, this way you can use * Used to overcome the limitation pointed above, when your OS layout is set to Dvorak instead of US, this way you can use
Standard Dvorak (available by default on all the main operating systems) on other normal keybdoards and Hacker Dvorak on Standard Dvorak (available by default on all the main operating systems) on other normal keybdoards and Hacker Dvorak on
the Ergodox EZ Shine at the same time, without changing back and forth tho OS layout. the Ergodox EZ Shine at the same time, without changing back and forth tho OS layout.
3. Gaming 3. Gaming
* Still in development. * Still in development.
@@ -35,7 +35,7 @@ I plan to use [QMK](https://docs.qmk.fm) in the future, in order to overcome som
6. Numpad 6. Numpad
* ATM style numpad. * ATM style numpad.
* All modifier keys. * All modifier keys.
* Letters from `A` to `F` for hexadecimal numbers (`B` is also used for binary numeric literals in most programming * Letters from `A` to `F` for hexadecimal numbers (`B` is also used for binary numeric literals in most programming
languages, ie. `0b11001`). languages, ie. `0b11001`).
* `X` for hexadecimal numeric literals in most programming languages, ie. `0xbeef`. * `X` for hexadecimal numeric literals in most programming languages, ie. `0xbeef`.
* `O` for octal numeric literals in most programming languages, ie `0o123`. * `O` for octal numeric literals in most programming languages, ie `0o123`.
@@ -52,11 +52,11 @@ I plan to use [QMK](https://docs.qmk.fm) in the future, in order to overcome som
* Useful for custom application shortcuts. * Useful for custom application shortcuts.
10. Meh Fn + 10. Meh Fn +
* Useful for custom standard shortcuts. * Useful for custom standard shortcuts.
## To Do ## To Do
Add images. Add images.
*** ***
Please comment below if you have any ideas or suggestions. If you have used this layout or used it as a base, I'd love to hear about your experience! Please comment below if you have any ideas or suggestions. If you have used this layout or used it as a base, I'd love to hear about your experience!
@@ -1,35 +1,40 @@
# Set any rules.mk overrides for your specific keymap here. # Set any rules.mk overrides for your specific keymap here.
# See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
TAP_DANCE_ENABLE = yes
MOUSEKEY_ENABLE = yes # Mouse keys(+4700b).
EXTRAKEY_ENABLE = yes # Audio control and System control(+450b).
SLEEP_LED_ENABLE = yes # Turn off leds when computer is sleeping.
KEY_LOCK_ENABLE = yes # (+1730b)
RGBLIGHT_ENABLE = yes
LEADER_ENABLE = yes
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
TAP_DANCE_ENABLE = yes
MOUSEKEY_ENABLE = yes # Mouse keys(+4700b).
EXTRAKEY_ENABLE = yes # Audio control and System control(+450b).
RGBLIGHT_ENABLE = yes
LEADER_ENABLE = yes
UNICODE_ENABLE = no # For Unicode. UNICODE_ENABLE = no
COMMAND_ENABLE = no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard. SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard.
# This are by default off: # This are by default off:
# CONSOLE_ENABLE = no # Console for debug(+400) # COMBO_ENABLE = no
# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) # UCIS_ENABLE = no # For Unicode.
# UNICODEMAP_ENABLE = no
# SLEEP_LED_ENABLE = no # Turn off leds when computer is sleeping.
# KEY_LOCK_ENABLE = no # (+1730b)
# CONSOLE_ENABLE = no # Console for debug(+400b)
# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000b)
# API_SYSEX_ENABLE = no # API_SYSEX_ENABLE = no
# MIDI_ENABLE = no # MIDI_ENABLE = no
# UNICODEMAP_ENABLE = no
# BLUETOOTH_ENABLE = no # BLUETOOTH_ENABLE = no
# AUDIO_ENABLE = no # AUDIO_ENABLE = no
# FAUXCLICKY_ENABLE = no # FAUXCLICKY_ENABLE = no
# VARIABLE_TRACE = no # VARIABLE_TRACE = no
# BACKLIGHT_ENABLE = no # BACKLIGHT_ENABLE = no
# RGB_MATRIX_ENABLE = no # RGB_MATRIX_ENABLE = no
# COMBO_ENABLE = no
# POINTING_DEVICE_ENABLE = no
# This don't need argument: # AUTO_SHIFT_ENABLE = no
# AUTO_SHIFT_MODIFIERS = no
# This don't need argument?
# CUSTOM_MATRIX # Custom matrix file for the ErgoDox EZ # CUSTOM_MATRIX # Custom matrix file for the ErgoDox EZ
# SPLIT_KEYBOARD # SPLIT_KEYBOARD
@@ -0,0 +1,40 @@
//instanalize an instance of 'tap' for the None - Lead tap dance.
static tap none_lead_state = {
.is_press_action = true,
.state = 0
};
void none_lead_finished(qk_tap_dance_state_t *state, void *user_data) {
none_lead_state.state = current_dance(state);
switch (none_lead_state.state) {
case SINGLE_TAP:
register_code(KC_NO);
break;
case SINGLE_HOLD:
register_code(KC_LALT);
register_code(KC_LSFT);
break;
case DOUBLE_TAP:
qk_leader_start();
break;
}
}
void none_lead_reset(qk_tap_dance_state_t *state, void *user_data) {
switch (none_lead_state.state) {
case SINGLE_TAP:
unregister_code(KC_NO);
break;
case SINGLE_HOLD:
unregister_code(KC_LALT);
unregister_code(KC_LSFT);
break;
case DOUBLE_TAP:
break;
}
none_lead_state.state = 0;
}
@@ -0,0 +1,20 @@
// Register the double tap dances:
qk_tap_dance_action_t tap_dance_actions[] = {
[EQL_PLUS] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS),
[MINS_UNDS] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS),
[SLSH_BSLS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS),
[GRV_TILD] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD),
[QUOT_DQUO] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_DQUO),
[SCLN_COLN] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_COLN),
[ASTR_CIRC] = ACTION_TAP_DANCE_DOUBLE(KC_ASTR, KC_CIRC),
[APMR_PIPE] = ACTION_TAP_DANCE_DOUBLE(KC_AMPR, KC_PIPE),
[EXLM_QUES] = ACTION_TAP_DANCE_DOUBLE(KC_EXLM, KC_QUES),
[HASH_PERC] = ACTION_TAP_DANCE_DOUBLE(KC_HASH, KC_PERC),
[AT_DLR] = ACTION_TAP_DANCE_DOUBLE(KC_AT, KC_DLR),
[LPRN_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LPRN, KC_LBRC),
[RPRN_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_RBRC),
[LCBR_LABK] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR, KC_LABK),
[RCBR_RABK] = ACTION_TAP_DANCE_DOUBLE(KC_RCBR, KC_RABK),
[DOT_COMM] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COMM),
[NONE_LEAD] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, none_lead_finished, none_lead_reset, DANCING_TERM)
};
@@ -0,0 +1,75 @@
typedef struct {
bool is_press_action;
int state;
} tap;
enum {
SINGLE_TAP = 1,
SINGLE_HOLD = 2,
DOUBLE_TAP = 3,
DOUBLE_HOLD = 4,
DOUBLE_SINGLE_TAP = 5, // Send two single taps.
TRIPLE_TAP = 6,
TRIPLE_HOLD = 7,
TRIPLE_SINGLE_TAP = 8 // Send three single taps.
};
/* Return an integer that corresponds to what kind of tap dance should be executed.
*
* How to figure out tap dance state: interrupted and pressed.
*
* Interrupted: If the state of a dance dance is "interrupted", that means that another key has been hit
* under the tapping term. This is typically indicitive that you are trying to "tap" the key.
*
* Pressed: Whether or not the key is still being pressed. If this value is true, that means the tapping term
* has ended, but the key is still being pressed down. This generally means the key is being "held".
*
* One thing that is currenlty not possible with qmk software in regards to tap dance is to mimic the "permissive hold"
* feature. In general, advanced tap dances do not work well if they are used with commonly typed letters.
* For example "A". Tap dances are best used on non-letter keys that are not hit while typing letters.
*
* Good places to put an advanced tap dance:
* z,q,x,j,k,v,b, any function key, home/end, comma, semi-colon
*
* Criteria for "good placement" of a tap dance key:
* Not a key that is hit frequently in a sentence
* Not a key that is used frequently to double tap, for example 'tab' is often double tapped in a terminal, or
* in a web form. So 'tab' would be a poor choice for a tap dance.
* Letters used in common words as a double. For example 'p' in 'pepper'. If a tap dance function existed on the
* letter 'p', the word 'pepper' would be quite frustating to type.
*
* For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
*
*/
int current_dance(qk_tap_dance_state_t *state) {
int current_state = 0;
if (state->count == 1) {
if (state->interrupted || !state->pressed) {
current_state = SINGLE_TAP;
} else {
current_state = SINGLE_HOLD; //key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'.
}
} else if (state->count == 2) {
/*
* DOUBLE_SINGLE_TAP is to distinguish between typing "pepper", and actually wanting a double tap
* action when hitting 'pp'. Suggested use case for this return value is when you want to send two
* keystrokes of the key, and not the 'double tap' action/macro.
*/
if (state->interrupted) {
current_state = DOUBLE_SINGLE_TAP;
} else if (state->pressed) {
current_state = DOUBLE_HOLD;
} else {
current_state = DOUBLE_TAP;
}
} else if (state->count == 3) {
if (state->interrupted) {
current_state = TRIPLE_SINGLE_TAP;
} else if (state->pressed) {
current_state = TRIPLE_HOLD;
} else {
current_state = TRIPLE_TAP;
}
}
return current_state;
}
@@ -0,0 +1,74 @@
//--------------------------------------------------------------------------------------------//
// | | | | | //
// Single tap | Single hold | Double tap | Double hold | Triple tap | Triple hold //
// Mod tap dances: // | | | | | //
enum tap_dances { //--------------------------------------------------------------------------------------------//
// | | | | | //
EQL_PLUS = 0, // = | + | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
MINS_UNDS = 1, // - | _ | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
SLSH_BSLS = 2, // / | \ | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
GRV_TILD = 3, // ` | ~ | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
QUOT_DQUO = 4, // ' | " | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
SCLN_COLN = 5, // ; | : | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
ASTR_CIRC = 6, // * | ^ | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
APMR_PIPE = 7, // & | | | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
EXLM_QUES = 8, // ! | ? | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
HASH_PERC = 9, // # | % | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
AT_DLR = 10, // @ | $ | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
LPRN_LBRC = 11, // ( | [ | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
RPRN_RBRC = 12, // ) | ] | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
LCBR_LABK = 13, // { | < | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
RCBR_RABK = 14, // } | > | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
DOT_COMM = 15, // . | , | | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
// | | | | | //
NONE_LEAD = 16, // NONE | ALT+SHIFT | LEAD | | | //
// | | | | | //
//--------------------------------------------------------------------------------------------//
};
@@ -0,0 +1,3 @@
// void eeconfig_init_user(void) {
//
// };
@@ -0,0 +1,121 @@
uint32_t layer_state_set_user(uint32_t state) {
uint8_t layer = biton32(state);
switch (layer) {
case DVORAK:
rgblight_sethsv_noeeprom_green();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case PLOVER:
rgblight_sethsv_noeeprom_red();
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);
if (!(PLOVER_MODE)) {
plover_toggle();
PLOVER_MODE = true;
}
break;
case GAMING:
rgblight_sethsv_noeeprom_red();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case ARROWS:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case MOUSE:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case NUMPAD:
rgblight_sethsv_noeeprom_blue();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case LAYERS:
rgblight_sethsv_noeeprom_cyan();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case MEDIA_FN:
rgblight_sethsv_noeeprom_yellow();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case HYPER:
rgblight_sethsv_noeeprom_magenta();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
case FIRMWARE:
rgblight_sethsv_noeeprom_magenta();
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);
if (PLOVER_MODE) {
plover_toggle();
PLOVER_MODE = false;
}
break;
default:
break;
}
return state;
}
@@ -0,0 +1,12 @@
#include "../leader/leader_setup.c"
bool MATRIX_SCANNED = false;
void matrix_scan_user(void) {
if (!(MATRIX_SCANNED)) {
rgblight_sethsv_noeeprom_green();
MATRIX_SCANNED = true;
}
#include "../leader/leader_dictionary.c"
};
@@ -0,0 +1,75 @@
// TODO: Improve this currently there is no feedback if activated by other means.
bool CAPS_LOCK = false;
bool NUM_LOCK = false;
bool SCROLL_LOCK = false;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
switch (keycode) {
case KC_CLCK:
if (record->event.pressed) {
if (!(CAPS_LOCK)) {
ergodox_right_led_1_on();
CAPS_LOCK = true;
} else {
ergodox_right_led_1_off();
CAPS_LOCK = false;
}
}
return true;
case KC_NLCK:
if (record->event.pressed) {
if (!(NUM_LOCK)) {
ergodox_right_led_2_on();
NUM_LOCK = true;
} else {
ergodox_right_led_2_off();
NUM_LOCK = false;
}
}
return true;
case KC_SLCK:
if (record->event.pressed) {
if (!(SCROLL_LOCK)) {
ergodox_right_led_3_on();
SCROLL_LOCK = true;
} else {
ergodox_right_led_3_off();
SCROLL_LOCK = false;
}
}
return true;
case KC_MS_WH_UP ... KC_MS_WH_RIGHT:
if (record->event.pressed) {
if (SCROLL_LOCK) {
return false;
} else {
return true;
}
}
case MY_CUSTOM_MACRO:
if (record->event.pressed) {
SEND_STRING("QMK is the best thing ever!"); // this is our macro!
return false;
}
case MY_OTHER_MACRO:
if (record->event.pressed) {
SEND_STRING(SS_LCTRL("ac")); // selects all and copies
return false;
}
default:
return true;
}
}
+81 -13
View File
@@ -1,16 +1,84 @@
{ {
"keyboard_name": "gskt00", "keyboard_name": "gskt00",
"url": "", "url": "",
"maintainer": "nachie", "maintainer": "nachie",
"width": 15, "width": 15,
"height": 5, "height": 5,
"layouts": { "layouts": {
"LAYOUT_60_ansi_tsangan": { "LAYOUT_60_ansi_tsangan": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
}, },
"LAYOUT_60_iso_tsangan": { "LAYOUT_60_iso_tsangan": {
"layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
} },
"LAYOUT_all": {
"layout": [
{"label":"Esc", "x":0, "y":0},
{"label":"1", "x":1, "y":0},
{"label":"2", "x":2, "y":0},
{"label":"3", "x":3, "y":0},
{"label":"4", "x":4, "y":0},
{"label":"5", "x":5, "y":0},
{"label":"6", "x":6, "y":0},
{"label":"7", "x":7, "y":0},
{"label":"8", "x":8, "y":0},
{"label":"9", "x":9, "y":0},
{"label":"0", "x":10, "y":0},
{"label":"-", "x":11, "y":0},
{"label":"=", "x":12, "y":0},
{"label":"\\", "x":13, "y":0},
{"label":"`", "x":14, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":"[", "x":11.5, "y":1},
{"label":"]", "x":12.5, "y":1},
{"label":"Backspace", "x":13.5, "y":1, "w":1.5},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":";", "x":10.75, "y":2},
{"label":"'", "x":11.75, "y":2},
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
{"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"ISO \\", "x":1.25, "y":3},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":",", "x":9.25, "y":3},
{"label":".", "x":10.25, "y":3},
{"label":"/", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":1.75},
{"label":"Fn", "x":14, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.5},
{"label":"GUI", "x":1.5, "y":4},
{"label":"Alt", "x":2.5, "y":4, "w":1.5},
{"label":"Space", "x":4, "y":4, "w":7},
{"label":"Alt", "x":11, "y":4, "w":1.5},
{"label":"GUI", "x":12.5, "y":4},
{"label":"Ctrl", "x":13.5, "y":4, "w":1.5}
]
} }
} }
}
@@ -0,0 +1,52 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <[email protected]>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
// place overrides here
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(STARTUP_SOUND)
#define AUDIO_CLICKY
#endif
#undef TAPPING_TERM
#define TAPPING_TERM 300
#define PERMISSIVE_HOLD
/* when TAPPING_TERM >= 500 same effect PERMISSIVE_HOLD.
see tmk_core/common/action_tapping.c */
// If you need more program area, try select and reduce rgblight modes to use.
// Selection of RGBLIGHT MODE to use.
#if defined(LED_ANIMATIONS)
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
//#define RGBLIGHT_EFFECT_SNAKE
//#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
//#define RGBLIGHT_EFFECT_RGB_TEST
//#define RGBLIGHT_EFFECT_ALTERNATING
#endif
#endif /* CONFIG_USER_H */
+496
View File
@@ -0,0 +1,496 @@
#include QMK_KEYBOARD_H
#include "bootloader.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#ifdef SSD1306OLED
#include "ssd1306.h"
#endif
#ifdef CONSOLE_ENABLE
#include <print.h>
#endif
extern keymap_config_t keymap_config;
#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif
extern uint8_t is_master;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
enum layer_number {
_QWERTY = 0,
_COLEMAK,
_DVORAK,
_EUCALYN,
_NUML,
_NUMR,
_LOWER,
_RAISE,
_ADJUST,
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
EUCALYN,
NUML,
NUMR,
KC_xEISU,
KC_xKANA,
KC_ZERO2,
RGBRST
};
//Macros
#define KC_LOWER MO(_LOWER)
#define KC_NUML LT(_NUML,KC_SPC)
#define KC_NUMR LT(_NUMR,KC_SPC)
#define KC_RABS LT(_RAISE,KC_BSPC)
#define KC_RAEN LT(_RAISE,KC_ENT)
#define KC_____ _______
#define KC_XXXX XXXXXXX
#define KC_ADJ MO(_ADJUST)
#define KC_LSMI LSFT(KC_MINS)
#define KC_LSEQ LSFT(KC_EQL)
#define KC_LSRB LSFT(KC_RBRC)
#define KC_LSLB LSFT(KC_LBRC)
#define KC_LSGR LSFT(KC_GRV)
#define KC_LSQT LSFT(KC_QUOT)
#define ___ _______
#define KC_S0 LSFT(KC_0)
#define KC_S1 LSFT(KC_1)
#define KC_S2 LSFT(KC_2)
#define KC_S3 LSFT(KC_3)
#define KC_S4 LSFT(KC_4)
#define KC_S5 LSFT(KC_5)
#define KC_S6 LSFT(KC_6)
#define KC_S7 LSFT(KC_7)
#define KC_S8 LSFT(KC_8)
#define KC_S9 LSFT(KC_9)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | Ctrl |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | | N | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
* `-------------------------------------------------------------------------------------------------'
*/
[_QWERTY] = LAYOUT_kc( \
ESC, Q, W, E, R, T, Y, U, I, O, P, BSLS, \
LCTL, A, S, D, F, G, H, J, K, L, SCLN, RCTL, \
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, \
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
),
/* Colemak
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | Q | W | F | P | G | | J | L | U | Y | ; | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | Ctrl |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | | K | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
* `-------------------------------------------------------------------------------------------------'
*/
[_COLEMAK] = LAYOUT_kc( \
ESC, Q, W, F, P, G, J, L, U, Y, SCLN, BSLS, \
LCTL, A, R, S, T, D, H, N, E, I, O, RCTL, \
LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, RSFT, \
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
),
/* Dvorak
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | ' | , | . | P | Y | | F | G | C | R | L | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | Ctrl |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | | B | M | W | V | Z | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
* `-------------------------------------------------------------------------------------------------'
*/
[_DVORAK] = LAYOUT_kc( \
ESC, QUOT, COMM, DOT, P, Y, F, G, C, R, L, BSLS, \
LCTL, A, O, E, U, I, D, H, T, N, S, RCTL, \
LSFT, SCLN, Q, J, K, X, B, M, W, V, Z, RSFT, \
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
),
/* Eucalyn (http://eucalyn.hatenadiary.jp/entry/about-eucalyn-layout)
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | Q | W | , | . | ; | | M | R | D | Y | P | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Ctrl | A | O | E | I | U | | G | T | K | S | N | Ctrl |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Shift| Z | X | C | V | F | | B | H | J | L | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* |Lower | Lower| Caps | Alt | GUI | Space| BS | Enter| Space| GUI | Alt | Menu |Lower |Lower |
* `-------------------------------------------------------------------------------------------------'
*/
[_EUCALYN] = LAYOUT_kc( \
ESC, Q, W, COMM, DOT, SCLN, M, R, D, Y, P, BSLS, \
LCTL, A, O, E, I, U, G, T, K, S, N, RCTL, \
LSFT, Z, X, C, V, F, B, H, J, L, SLSH, RSFT, \
LOWER,LOWER, CAPS, LALT, LGUI,NUML, RABS, RAEN,NUMR, RGUI, RALT, APP,LOWER, LOWER \
),
/* Num
* ,-----------------------------------------. ,-----------------------------------------.
* | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_NUML] = LAYOUT_kc( \
____, S1, S2, S3, S4, S5, S6, S7, S8, S9, S0, ____, \
____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \
____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \
____, ____, ____, ____, ____, ____, ____, ____, SPC, ____, ____, ____, ____, ____ \
),
[_NUMR] = LAYOUT_kc( \
____, S1, S2, S3, S4, S5, S6, S7, S8, S9, S0, ____, \
____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, F12, \
____, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, \
____, ____, ____, ____, ____, SPC, ____, ____, ____, ____, ____, ____, ____, ____ \
),
/* Lower
* ,-----------------------------------------. ,-----------------------------------------.
* | | |Pause | ScrLk| Ins | | | | Ins | ScrLk|Pause | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | PgUp | | Up |Delete| Home | | Home |Delete| Up | | PgUp | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | PgDn | Left | Down | Right| End | | End | Left | Down | Right| PgDn | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | PrtSc| | | |Adjust|Adjust| | | | PrtSc| | |
* `-------------------------------------------------------------------------------------------------'
*/
[_LOWER] = LAYOUT_kc( \
XXXX, XXXX, PAUS, SLCK, INS, XXXX, XXXX, INS, SLCK, PAUS, XXXX, ____, \
____, HOME, XXXX, UP, DEL, PGUP, PGUP, DEL, UP, XXXX, HOME, ____, \
____, END, LEFT, DOWN, RGHT, PGDN, PGDN, LEFT, DOWN, RGHT, END, ____, \
____, ____, PSCR, ____, ____, ____, ADJ, ADJ, ____, ____, ____, PSCR, ____, ____ \
),
/* Raise
* ,-----------------------------------------. ,-----------------------------------------.
* | TAB | | | | _ | - | | = | + | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | EISU | | | | { | [ | | ] | } | | | | KANA |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | ~ | ` | | ' | " | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT_kc( \
TAB, XXXX, XXXX, XXXX, LSMI, MINS, EQL, LSEQ, XXXX, XXXX, XXXX, XXXX, \
xEISU, XXXX, XXXX, XXXX, LSLB, LBRC, RBRC, LSRB, XXXX, XXXX, XXXX, xKANA, \
XXXX, XXXX, XXXX, XXXX, LSGR, GRV, QUOT, LSQT, XXXX, XXXX, XXXX, XXXX, \
ADJ, ADJ, XXXX, ____, ____, XXXX, ____, ____, XXXX, ____, ____, XXXX, ADJ, ADJ \
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------. ,-----------------------------------------.
* | | Reset|RGBRST|RGB ON|Aud on| Win | | Win | |Qwerty|Euclyn|Colemk|Dvorak|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | HUE+ | SAT+ | VAL+ |RGB md|Audoff| Mac | | Mac | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | HUE- | SAT- | VAL- | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | | | |
* `-------------------------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT( \
XXXXXXX, RESET, RGBRST, RGB_TOG, AU_ON, AG_SWAP, AG_SWAP, XXXXXXX, QWERTY, EUCALYN, COLEMAK, DVORAK, \
RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, AU_OFF, AG_NORM, AG_NORM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
_______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ___,___, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______ \
)
};
#ifdef AUDIO_ENABLE
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
#endif
static int current_default_layer;
uint32_t default_layer_state_set_kb(uint32_t state) {
// 1<<_QWERTY - 1 == 1 - 1 == _QWERTY (=0)
// 1<<_COLEMAK - 1 == 2 - 1 == _COLEMAK (=1)
current_default_layer = state - 1;
// 1<<_DVORAK - 2 == 4 - 2 == _DVORAK (=2)
if ( current_default_layer == 3 ) current_default_layer -= 1;
// 1<<_EUCALYN - 5 == 8 - 5 == _EUCALYN (=3)
if ( current_default_layer == 7 ) current_default_layer -= 4;
return state;
}
void update_base_layer(int base)
{
if( current_default_layer != base ) {
eeconfig_update_default_layer(1UL<<base);
default_layer_set(1UL<<base);
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_qwerty);
#endif
update_base_layer(_QWERTY);
}
return false;
break;
case COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_colemak);
#endif
update_base_layer(_COLEMAK);
}
return false;
break;
case DVORAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_dvorak);
#endif
update_base_layer(_DVORAK);
}
return false;
break;
case EUCALYN:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_SONG(tone_dvorak);
#endif
update_base_layer(_EUCALYN);
}
return false;
break;
case KC_xEISU:
if (record->event.pressed) {
if(keymap_config.swap_lalt_lgui==false){
register_code(KC_LANG2);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LANG2);
}
return false;
break;
case KC_xKANA:
if (record->event.pressed) {
if(keymap_config.swap_lalt_lgui==false){
register_code(KC_LANG1);
}else{
SEND_STRING(SS_LALT("`"));
}
} else {
unregister_code(KC_LANG1);
}
return false;
break;
case RGBRST:
#ifdef RGBLIGHT_ENABLE
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
}
#endif
break;
}
return true;
}
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
startup_user();
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
iota_gfx_init(!has_usb()); // turns on the display
#endif
}
#ifdef AUDIO_ENABLE
void startup_user()
{
_delay_ms(50); // gets rid of tick
}
void shutdown_user()
{
_delay_ms(150);
stop_all_notes();
}
void music_on_user(void)
{
music_scale_user();
}
void music_scale_user(void)
{
PLAY_SONG(music_scale);
}
#endif
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED
void matrix_scan_user(void) {
iota_gfx_task(); // this is what updates the display continuously
}
void matrix_update(struct CharacterMatrix *dest,
const struct CharacterMatrix *source) {
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
memcpy(dest->display, source->display, sizeof(dest->display));
dest->dirty = true;
}
}
static void render_logo(struct CharacterMatrix *matrix) {
static char logo[]={
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
0};
matrix_write(matrix, logo);
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_ANIMATIONS)
char buf[30];
if(rgblight_config.enable) {
snprintf(buf, sizeof(buf), " LED %2d: %d,%d,%d ",
rgblight_config.mode,
rgblight_config.hue/RGBLIGHT_HUE_STEP,
rgblight_config.sat/RGBLIGHT_SAT_STEP,
rgblight_config.val/RGBLIGHT_VAL_STEP);
matrix_write(matrix, buf);
}
#endif
//matrix_write_P(&matrix, PSTR(" Split keyboard kit"));
}
static const char Qwerty_name[] PROGMEM = " Qwerty";
static const char Colemak_name[] PROGMEM = " Colemak";
static const char Dvorak_name[] PROGMEM = " Dvorak";
static const char Eucalyn_name[] PROGMEM = " Eucalyn";
static const char NumL_name[] PROGMEM = ":NumL";
static const char NumR_name[] PROGMEM = ":NumR";
static const char Lower_name[] PROGMEM = ":Func";
static const char Raise_name[] PROGMEM = ":Extra";
static const char Adjust_name[] PROGMEM = ":Adjust";
static const char *layer_names[] = {
[_QWERTY] = Qwerty_name,
[_COLEMAK] = Colemak_name,
[_DVORAK] = Dvorak_name,
[_EUCALYN] = Eucalyn_name,
[_NUML] = NumL_name,
[_NUMR] = NumR_name,
[_LOWER] = Lower_name,
[_RAISE] = Raise_name,
[_ADJUST] = Adjust_name
};
void render_status(struct CharacterMatrix *matrix) {
// Render to mode icon
static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}};
if(keymap_config.swap_lalt_lgui==false){
matrix_write(matrix, logo[0][0]);
matrix_write_P(matrix, PSTR("\n"));
matrix_write(matrix, logo[0][1]);
}else{
matrix_write(matrix, logo[1][0]);
matrix_write_P(matrix, PSTR("\n"));
matrix_write(matrix, logo[1][1]);
}
// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below
int name_num;
uint32_t lstate;
matrix_write_P(matrix, layer_names[current_default_layer]);
matrix_write_P(matrix, PSTR("\n"));
for( lstate = layer_state, name_num = 0;
lstate && name_num < sizeof(layer_names)/sizeof(char *);
lstate >>=1, name_num++ ) {
if( (lstate & 1) != 0 ) {
if( layer_names[name_num] ) {
matrix_write_P(matrix, layer_names[name_num]);
}
}
}
// Host Keyboard LED Status
char led[40];
snprintf(led, sizeof(led), "\n%s %s %s",
(host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ",
(host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ",
(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " ");
matrix_write(matrix, led);
}
void iota_gfx_task_user(void) {
struct CharacterMatrix matrix;
#if DEBUG_TO_SCREEN
if (debug_enable) {
return;
}
#endif
matrix_clear(&matrix);
if(is_master){
render_status(&matrix);
}else{
render_logo(&matrix);
}
matrix_update(&display, &matrix);
}
#endif
+129
View File
@@ -0,0 +1,129 @@
# 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 = no # 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 = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port B5
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
SWAP_HANDS_ENABLE = no # Enable one-hand typing
define HELIX_CUSTOMISE_MSG
$(info Helix customize)
$(info - OLED_ENABLE=$(OLED_ENABLE))
$(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE))
$(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE))
$(info - LED_ANIMATION=$(LED_ANIMATIONS))
$(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE))
endef
# Helix keyboard customize
# you can edit follows 6 Variables
# jp: 以下の6つの変数を必要に応じて編集します。
OLED_ENABLE = no # OLED_ENABLE
LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c"
LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.)
LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.)
LED_ANIMATIONS = yes # LED animations
IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone)
Link_Time_Optimization = no # if firmware size over limit, try this option
#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE.
#### Do not enable these with audio at the same time.
### Helix keyboard 'default' keymap: convenient command line option
## make HELIX=<options> helix:defualt
## option= oled | back | under | na | ios
## ex.
## make HELIX=oled helix:defualt
## make HELIX=oled,back helix:defualt
## make HELIX=oled,under helix:defualt
## make HELIX=oled,back,na helix:defualt
## make HELIX=oled,back,ios helix:defualt
##
ifneq ($(strip $(HELIX)),)
ifeq ($(findstring oled,$(HELIX)), oled)
OLED_ENABLE = yes
endif
ifeq ($(findstring back,$(HELIX)), back)
LED_BACK_ENABLE = yes
else ifeq ($(findstring under,$(HELIX)), under)
LED_UNDERGLOW_ENABLE = yes
endif
ifeq ($(findstring na,$(HELIX)), na)
LED_ANIMATIONS = no
endif
ifeq ($(findstring ios,$(HELIX)), ios)
IOS_DEVICE_ENABLE = yes
endif
$(eval $(call HELIX_CUSTOMISE_MSG))
$(info )
endif
# Uncomment these for checking
# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。
# $(eval $(call HELIX_CUSTOMISE_MSG))
# $(info )
ifeq ($(strip $(LED_BACK_ENABLE)), yes)
RGBLIGHT_ENABLE = yes
OPT_DEFS += -DRGBLED_BACK
ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
$(eval $(call HELIX_CUSTOMISE_MSG))
$(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes')
endif
else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes)
RGBLIGHT_ENABLE = yes
else
RGBLIGHT_ENABLE = no
endif
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE
endif
ifeq ($(strip $(LED_ANIMATIONS)), yes)
OPT_DEFS += -DLED_ANIMATIONS
endif
ifeq ($(strip $(OLED_ENABLE)), yes)
OPT_DEFS += -DOLED_ENABLE
endif
ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
OPT_DEFS += -DLOCAL_GLCDFONT
endif
ifeq ($(strip $(AUDIO_ENABLE)),yes)
ifeq ($(strip $(RGBLIGHT_ENABLE)),yes)
Link_Time_Optimization = yes
endif
ifeq ($(strip $(OLED_ENABLE)),yes)
Link_Time_Optimization = yes
endif
endif
ifeq ($(strip $(Link_Time_Optimization)),yes)
EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
endif
# 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
# Uncomment these for debugging
# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE))
# $(info -- OPT_DEFS=$(OPT_DEFS))
# $(info )
+14
View File
@@ -62,4 +62,18 @@
} }
#endif #endif
#define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35 \
) \
LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
)
#endif #endif
+31 -20
View File
@@ -35,31 +35,42 @@ uint16_t leader_time = 0;
uint16_t leader_sequence[5] = {0, 0, 0, 0, 0}; uint16_t leader_sequence[5] = {0, 0, 0, 0, 0};
uint8_t leader_sequence_size = 0; uint8_t leader_sequence_size = 0;
void qk_leader_start(void) {
if (leading) { return; }
leader_start();
leading = true;
leader_time = timer_read();
leader_sequence_size = 0;
leader_sequence[0] = 0;
leader_sequence[1] = 0;
leader_sequence[2] = 0;
leader_sequence[3] = 0;
leader_sequence[4] = 0;
}
bool process_leader(uint16_t keycode, keyrecord_t *record) { bool process_leader(uint16_t keycode, keyrecord_t *record) {
// Leader key set-up // Leader key set-up
if (record->event.pressed) { if (record->event.pressed) {
if (leading) {
if (timer_elapsed(leader_time) < LEADER_TIMEOUT) {
#ifndef LEADER_KEY_STRICT_KEY_PROCESSING
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
keycode = keycode & 0xFF;
}
#endif // LEADER_KEY_STRICT_KEY_PROCESSING
leader_sequence[leader_sequence_size] = keycode;
leader_sequence_size++;
#ifdef LEADER_PER_KEY_TIMING #ifdef LEADER_PER_KEY_TIMING
leader_time = timer_read(); leader_time = timer_read();
#endif #endif
if (!leading && keycode == KC_LEAD) { return false;
leader_start(); }
leading = true; } else {
#ifndef LEADER_PER_KEY_TIMING if (keycode == KC_LEAD) {
leader_time = timer_read(); qk_leader_start();
#endif return false;
leader_time = timer_read(); }
leader_sequence_size = 0; break;
leader_sequence[0] = 0;
leader_sequence[1] = 0;
leader_sequence[2] = 0;
leader_sequence[3] = 0;
leader_sequence[4] = 0;
return false;
}
if (leading && timer_elapsed(leader_time) < LEADER_TIMEOUT) {
leader_sequence[leader_sequence_size] = keycode;
leader_sequence_size++;
return false;
} }
} }
return true; return true;
+1 -1
View File
@@ -24,7 +24,7 @@ bool process_leader(uint16_t keycode, keyrecord_t *record);
void leader_start(void); void leader_start(void);
void leader_end(void); void leader_end(void);
void qk_leader_start(void);
#define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) #define SEQ_ONE_KEY(key) if (leader_sequence[0] == (key) && leader_sequence[1] == 0 && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0)
#define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0) #define SEQ_TWO_KEYS(key1, key2) if (leader_sequence[0] == (key1) && leader_sequence[1] == (key2) && leader_sequence[2] == 0 && leader_sequence[3] == 0 && leader_sequence[4] == 0)