Merge branch 'master' of https://github.com/qmk/qmk_firmware into ps2avrgb
commit
34b0029b1e
@ -1,129 +1,198 @@
|
|||||||
# The `config.h` file
|
# Configuring QMK
|
||||||
|
|
||||||
This is a c header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere (namely keymaps). This file can exist at a couple different levels:
|
|
||||||
|
|
||||||
## Keyboard
|
|
||||||
|
|
||||||
```c
|
QMK is nearly infinitely configurable. Wherever possible we err on the side of allowing users to customize their keyboard, even at the expense of code size. That level of flexibility makes for a daunting configuration experience, however.
|
||||||
#ifndef CONFIG_H
|
|
||||||
#define CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
There are two main types of configuration files in QMK- `config.h` and `rules.mk`. These files exist at various levels in QMK and all files of the same type are combined to build the final configuration. The levels, from lowest priority to highest priority, are:
|
||||||
|
|
||||||
// config options
|
* QMK Default
|
||||||
|
* Keyboard
|
||||||
|
* Folders (Up to 5 levels deep)
|
||||||
|
* Keymap
|
||||||
|
|
||||||
#endif
|
## QMK Default
|
||||||
```
|
|
||||||
|
|
||||||
This file contains config options that should apply to the whole keyboard, and won't change in revisions, or most keymaps. The revision block here only applies to keyboards with revisions.
|
Every available setting in QMK has a default. If that setting is not set at the Keyboard, Folder, or Keymap level this is the setting that will be used.
|
||||||
|
|
||||||
## Revisions
|
## Keyboard
|
||||||
|
|
||||||
```c
|
|
||||||
#ifndef <revision>_CONFIG_H
|
|
||||||
#define <revision>_CONFIG_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
|
|
||||||
// config options
|
This level contains config options that should apply to the whole keyboard. Some settings won't change in revisions, or most keymaps. Other settings are merely defaults for this keyboard and can be overridden by folders and/or keymaps.
|
||||||
|
|
||||||
#endif
|
## Folders
|
||||||
```
|
|
||||||
|
|
||||||
For keyboards that have revisions, this file contains config options that should apply to only that revisions, and won't change in most keymaps.
|
Some keyboards have folders and sub-folders to allow for different hardware configurations. Most keyboards only go 1 folder deep, but QMK supports structures up to 5 folders deep. Each folder can have its own `config.h` and `rules.mk` files that are incorporated into the final configuration.
|
||||||
|
|
||||||
## Keymap
|
## Keymap
|
||||||
|
|
||||||
```c
|
This level contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
|
||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "config_common.h"
|
|
||||||
|
|
||||||
// config options
|
|
||||||
|
|
||||||
#endif
|
|
||||||
```
|
|
||||||
|
|
||||||
This file contains all of the options for that particular keymap. If you wish to override a previous declaration, you can use `#undef <variable>` to undefine it, where you can then redefine it without an error.
|
|
||||||
|
|
||||||
# Config Options
|
|
||||||
|
|
||||||
```c
|
|
||||||
#define VENDOR_ID 0x1234 // defines your VID, and for most DIY projects, can be whatever you want
|
|
||||||
#define PRODUCT_ID 0x5678 // defines your PID, and for most DIY projects, can be whatever you want
|
|
||||||
#define DEVICE_VER 0 // defines the device version (often used for revisions)
|
|
||||||
|
|
||||||
#define MANUFACTURER Me // generally who/whatever brand produced the board
|
|
||||||
#define PRODUCT Board // the name of the keyboard
|
|
||||||
#define DESCRIPTION a keyboard // a short description of what the keyboard is
|
|
||||||
|
|
||||||
#define MATRIX_ROWS 5 // the number of rows in your keyboard's matrix
|
|
||||||
#define MATRIX_COLS 15 // the number of columns in your keyboard's matrix
|
|
||||||
|
|
||||||
#define MATRIX_ROW_PINS { D0, D5, B5, B6 } // pins of the rows, from top to bottom
|
|
||||||
#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } // pins of the columns, from left to right
|
|
||||||
#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 } // pins unused by the keyboard for reference
|
|
||||||
#define MATRIX_HAS_GHOST // define is matrix has ghost (unlikely)
|
|
||||||
#define DIODE_DIRECTION COL2ROW // COL2ROW or ROW2COL - how your matrix is configured
|
|
||||||
// COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows
|
|
||||||
|
|
||||||
#define AUDIO_VOICES // turns on the alternate audio voices (to cycle through)
|
# The `config.h` file
|
||||||
#define C6_AUDIO // enables audio on pin C6
|
|
||||||
#define B5_AUDIO // enables audio on pin B5 (duophony is enable if both are enabled)
|
|
||||||
|
|
||||||
#define BACKLIGHT_PIN B7 // pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
|
||||||
#define BACKLIGHT_LEVELS 3 // number of levels your backlight will have (not including off)
|
|
||||||
|
|
||||||
#define DEBOUNCING_DELAY 5 // the delay when reading the value of the pin (5 is default)
|
|
||||||
|
|
||||||
#define LOCKING_SUPPORT_ENABLE // mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
|
|
||||||
#define LOCKING_RESYNC_ENABLE // tries to keep switch state consistent with keyboard LED state
|
|
||||||
|
|
||||||
#define IS_COMMAND() ( \ // key combination that allows the use of magic commands (useful for debugging)
|
|
||||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
|
||||||
)
|
|
||||||
|
|
||||||
// the following options can save on file size at the expense of that feature
|
|
||||||
#define NO_DEBUG // disable debuging (saves on file size)
|
|
||||||
#define NO_PRINT // disable printing (saves of file size)
|
|
||||||
#define NO_ACTION_LAYER // no layers
|
|
||||||
#define NO_ACTION_TAPPING // no tapping for layers/mods
|
|
||||||
#define NO_ACTION_ONESHOT // no oneshot for layers/mods
|
|
||||||
#define NO_ACTION_MACRO // no macros
|
|
||||||
#define NO_ACTION_FUNCTION // no functions
|
|
||||||
|
|
||||||
#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it to be on always
|
|
||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS // when switching layers, this will release all mods
|
|
||||||
|
|
||||||
#define TAPPING_TERM 200 // how long before a tap becomes a hold
|
|
||||||
#define TAPPING_TOGGLE 2 // how many taps before triggering the toggle
|
|
||||||
|
|
||||||
#define PERMISSIVE_HOLD // makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
|
||||||
|
|
||||||
#define LEADER_TIMEOUT 300 // how long before the leader key times out
|
|
||||||
|
|
||||||
#define ONESHOT_TIMEOUT 300 // how long before oneshot times out
|
|
||||||
#define ONESHOT_TAP_TOGGLE 2 // how many taps before oneshot toggle is triggered
|
|
||||||
|
|
||||||
#define IGNORE_MOD_TAP_INTERRUPT // makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
|
||||||
|
|
||||||
// ws2812 options
|
|
||||||
#define RGB_DI_PIN D7 // pin the DI on the ws2812 is hooked-up to
|
|
||||||
#define RGBLIGHT_ANIMATIONS // run RGB animations
|
|
||||||
#define RGBLED_NUM 15 // number of LEDs
|
|
||||||
#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
|
|
||||||
#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
|
|
||||||
#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
|
|
||||||
|
|
||||||
#define RGBW_BB_TWI // bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
|
|
||||||
|
|
||||||
// mousekey options (self-describing)
|
|
||||||
#define MOUSEKEY_INTERVAL 20
|
|
||||||
#define MOUSEKEY_DELAY 0
|
|
||||||
#define MOUSEKEY_TIME_TO_MAX 60
|
|
||||||
#define MOUSEKEY_MAX_SPEED 7
|
|
||||||
#define MOUSEKEY_WHEEL_DELAY 0
|
|
||||||
|
|
||||||
```
|
This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere.
|
||||||
|
|
||||||
|
## `config.h` Options
|
||||||
|
|
||||||
|
### Hardware Options
|
||||||
|
* `#define VENDOR_ID 0x1234`
|
||||||
|
* defines your VID, and for most DIY projects, can be whatever you want
|
||||||
|
* `#define PRODUCT_ID 0x5678`
|
||||||
|
* defines your PID, and for most DIY projects, can be whatever you want
|
||||||
|
* `#define DEVICE_VER 0`
|
||||||
|
* defines the device version (often used for revisions)
|
||||||
|
* `#define MANUFACTURER Me`
|
||||||
|
* generally who/whatever brand produced the board
|
||||||
|
* `#define PRODUCT Board`
|
||||||
|
* the name of the keyboard
|
||||||
|
* `#define DESCRIPTION a keyboard`
|
||||||
|
* a short description of what the keyboard is
|
||||||
|
* `#define MATRIX_ROWS 5`
|
||||||
|
* the number of rows in your keyboard's matrix
|
||||||
|
* `#define MATRIX_COLS 15`
|
||||||
|
* the number of columns in your keyboard's matrix
|
||||||
|
* `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }`
|
||||||
|
* pins of the rows, from top to bottom
|
||||||
|
* `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }`
|
||||||
|
* pins of the columns, from left to right
|
||||||
|
* `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }`
|
||||||
|
* pins unused by the keyboard for reference
|
||||||
|
* `#define MATRIX_HAS_GHOST`
|
||||||
|
* define is matrix has ghost (unlikely)
|
||||||
|
* `#define DIODE_DIRECTION COL2ROW`
|
||||||
|
* COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows.
|
||||||
|
* `#define AUDIO_VOICES`
|
||||||
|
* turns on the alternate audio voices (to cycle through)
|
||||||
|
* `#define C6_AUDIO`
|
||||||
|
* enables audio on pin C6
|
||||||
|
* `#define B5_AUDIO`
|
||||||
|
* enables audio on pin B5 (duophony is enable if both are enabled)
|
||||||
|
* `#define BACKLIGHT_PIN B7`
|
||||||
|
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||||
|
* `#define BACKLIGHT_LEVELS 3`
|
||||||
|
* number of levels your backlight will have (not including off)
|
||||||
|
* `#define DEBOUNCING_DELAY 5`
|
||||||
|
* the delay when reading the value of the pin (5 is default)
|
||||||
|
* `#define LOCKING_SUPPORT_ENABLE`
|
||||||
|
* mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap
|
||||||
|
* `#define LOCKING_RESYNC_ENABLE`
|
||||||
|
* tries to keep switch state consistent with keyboard LED state
|
||||||
|
* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )`
|
||||||
|
* key combination that allows the use of magic commands (useful for debugging)
|
||||||
|
|
||||||
|
### Features That Can Be Disabled
|
||||||
|
|
||||||
|
If you define these options you will disable the associated feature, which can save on code size.
|
||||||
|
|
||||||
|
* `#define NO_DEBUG`
|
||||||
|
* disable debuging
|
||||||
|
* `#define NO_PRINT`
|
||||||
|
* disable printing/debugging using hid_listen
|
||||||
|
* `#define NO_ACTION_LAYER`
|
||||||
|
* disable layers
|
||||||
|
* `#define NO_ACTION_TAPPING`
|
||||||
|
* disable tap dance and other tapping features
|
||||||
|
* `#define NO_ACTION_ONESHOT`
|
||||||
|
* disable one-shot modifiers
|
||||||
|
* `#define NO_ACTION_MACRO`
|
||||||
|
* disable all macro handling
|
||||||
|
* `#define NO_ACTION_FUNCTION`
|
||||||
|
* disable the action function (deprecated)
|
||||||
|
|
||||||
|
### Features That Can Be Enabled
|
||||||
|
|
||||||
|
If you define these options you will enable the associated feature, which may increase your code size.
|
||||||
|
|
||||||
|
* `#define FORCE_NKRO`
|
||||||
|
* NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of eeprom setting. NKRO can still be turned off but will be turned on again if the keyboard reboots.
|
||||||
|
* `#define PREVENT_STUCK_MODIFIERS`
|
||||||
|
* when switching layers, this will release all mods
|
||||||
|
|
||||||
|
### Behaviors That Can Be Configured
|
||||||
|
|
||||||
|
* `#define TAPPING_TERM 200`
|
||||||
|
* how long before a tap becomes a hold
|
||||||
|
* `#define TAPPING_TOGGLE 2`
|
||||||
|
* how many taps before triggering the toggle
|
||||||
|
* `#define PERMISSIVE_HOLD`
|
||||||
|
* makes tap and hold keys work better for fast typers who don't want tapping term set above 500
|
||||||
|
* `#define LEADER_TIMEOUT 300`
|
||||||
|
* how long before the leader key times out
|
||||||
|
* `#define ONESHOT_TIMEOUT 300`
|
||||||
|
* how long before oneshot times out
|
||||||
|
* `#define ONESHOT_TAP_TOGGLE 2`
|
||||||
|
* how many taps before oneshot toggle is triggered
|
||||||
|
* `#define IGNORE_MOD_TAP_INTERRUPT`
|
||||||
|
* makes it possible to do rolling combos (zx) with keys that convert to other keys on hold
|
||||||
|
|
||||||
|
### RGB Light Configuration
|
||||||
|
|
||||||
|
* `#define RGB_DI_PIN D7`
|
||||||
|
* pin the DI on the ws2812 is hooked-up to
|
||||||
|
* `#define RGBLIGHT_ANIMATIONS`
|
||||||
|
* run RGB animations
|
||||||
|
* `#define RGBLED_NUM 15`
|
||||||
|
* number of LEDs
|
||||||
|
* `#define RGBLIGHT_HUE_STEP 12`
|
||||||
|
* units to step when in/decreasing hue
|
||||||
|
* `#define RGBLIGHT_SAT_STEP 25`
|
||||||
|
* units to step when in/decresing saturation
|
||||||
|
* `#define RGBLIGHT_VAL_STEP 12`
|
||||||
|
* units to step when in/decreasing value (brightness)
|
||||||
|
* `#define RGBW_BB_TWI`
|
||||||
|
* bit-bangs twi to EZ RGBW LEDs (only required for Ergodox EZ)
|
||||||
|
|
||||||
|
### Mouse Key Options
|
||||||
|
|
||||||
|
* `#define MOUSEKEY_INTERVAL 20`
|
||||||
|
* `#define MOUSEKEY_DELAY 0`
|
||||||
|
* `#define MOUSEKEY_TIME_TO_MAX 60`
|
||||||
|
* `#define MOUSEKEY_MAX_SPEED 7`
|
||||||
|
* `#define MOUSEKEY_WHEEL_DELAY 0`
|
||||||
|
|
||||||
|
# The `rules.mk` File
|
||||||
|
|
||||||
|
This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features.
|
||||||
|
|
||||||
|
## `rules.mk` options
|
||||||
|
|
||||||
|
### Build Options
|
||||||
|
|
||||||
|
* `DEFAULT_FOLDER`
|
||||||
|
* Used to specify a default folder when a keyboard has more than one sub-folder.
|
||||||
|
* `SRC`
|
||||||
|
* Used to add files to the compilation/linking list.
|
||||||
|
* `LAYOUTS`
|
||||||
|
* A list of [layouts](feature_layouts.md) this keyboard supports.
|
||||||
|
|
||||||
|
### AVR MCU Options
|
||||||
|
* `MCU = atmega32u4`
|
||||||
|
* `F_CPU = 16000000`
|
||||||
|
* `ARCH = AVR8`
|
||||||
|
* `F_USB = $(F_CPU)`
|
||||||
|
* `OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT`
|
||||||
|
* `OPT_DEFS += -DBOOTLOADER_SIZE=4096`
|
||||||
|
|
||||||
|
### Feature Options
|
||||||
|
|
||||||
|
Use these to enable or disable building certain features. The more you have enabled the bigger your firmware will be, and you run the risk of building a firmware too large for your MCU.
|
||||||
|
|
||||||
|
* `BOOTMAGIC_ENABLE`
|
||||||
|
* Virtual DIP switch configuration(+1000)
|
||||||
|
* `MOUSEKEY_ENABLE`
|
||||||
|
* Mouse keys(+4700)
|
||||||
|
* `EXTRAKEY_ENABLE`
|
||||||
|
* Audio control and System control(+450)
|
||||||
|
* `CONSOLE_ENABLE`
|
||||||
|
* Console for debug(+400)
|
||||||
|
* `COMMAND_ENABLE`
|
||||||
|
* Commands for debug and configuration
|
||||||
|
* `NKRO_ENABLE`
|
||||||
|
* USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
* `AUDIO_ENABLE`
|
||||||
|
* Enable the audio subsystem.
|
||||||
|
* `RGBLIGHT_ENABLE`
|
||||||
|
* Enable keyboard underlight functionality
|
||||||
|
* `MIDI_ENABLE`
|
||||||
|
* MIDI controls
|
||||||
|
* `UNICODE_ENABLE`
|
||||||
|
* Unicode
|
||||||
|
* `BLUETOOTH_ENABLE`
|
||||||
|
* Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
# Userspace: sharing code between keymaps
|
||||||
|
|
||||||
|
If you use more than one keyboard with a similar keymap, you might see the benefit in being able to share code between them. Create your own folder in `users/` named the same as your keymap (ideally your github username, `<name>`) with the following structure:
|
||||||
|
|
||||||
|
* `/users/<name>/` (added to the path automatically)
|
||||||
|
* `readme.md`
|
||||||
|
* `rules.mk` (included automatically)
|
||||||
|
* `<name>.h` (optional)
|
||||||
|
* `<name>.c` (optional)
|
||||||
|
|
||||||
|
`<name>.c` will need to be added to the SRC in `rules.mk` like this:
|
||||||
|
|
||||||
|
SRC += <name>.c
|
||||||
|
|
||||||
|
Additional files may be added in the same way - it's recommended you have one named `<name>`.c/.h though.
|
||||||
|
|
||||||
|
All this only happens when you build a keymap named `<name>`, like this:
|
||||||
|
|
||||||
|
make planck:<name>
|
||||||
|
|
||||||
|
For example,
|
||||||
|
|
||||||
|
make planck:jack
|
||||||
|
|
||||||
|
Will include the `/users/jack/` folder in the path, along with `/users/jack/rules.mk`.
|
||||||
|
|
||||||
|
## Readme
|
||||||
|
|
||||||
|
Please include authorship (your name, github username, email), and optionally [a license that's GPL compatible](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses).
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
For a brief example, checkout `/users/_example/` until we have more reasonable and useful examples.
|
@ -1,105 +1,24 @@
|
|||||||
# QMK Features
|
# QMK Features
|
||||||
|
|
||||||
|
QMK has a staggering number of features for building your keyboard. It can take some time to understand all of them and determine which one will acheive your goal.
|
||||||
## Space Cadet Shift: The future, built in
|
|
||||||
|
|
||||||
Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. Head on over to the [Space Cadet Shift](space_cadet_shift.md) page to read about it.
|
* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters.
|
||||||
|
* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
|
||||||
## The Leader key: A new kind of modifier
|
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard
|
||||||
|
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys
|
||||||
Most modifiers have to be held or toggled. But what if you had a key that indicated the start of a sequence? You could press that key and then rapidly press 1-3 more keys to trigger a macro, or enter a special layer, or anything else you might want to do. To learn more about it check out the [Leader Key](feature_leader_key.md) page.
|
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||||
|
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||||
## Tap Dance: A single key can do 3, 5, or 100 different things
|
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||||
|
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||||
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. Read more about it on the [Tap Dance](tap_dance.md) page.
|
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key
|
||||||
|
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard
|
||||||
## Temporarily setting the default layer
|
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
||||||
|
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
|
||||||
`DF(layer)` - sets default layer to _layer_. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
|
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||||
|
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||||
## Macro shortcuts: Send a whole string when pressing just one key
|
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want
|
||||||
|
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard
|
||||||
How would you like a single keypress to send a whole word, sentence, paragraph, or even document? Head on over to the [Macros](macros.md) page to read up on all aspects of Simple and Dynamic Macros.
|
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
|
||||||
|
* [Unicode](feature_unicode.md) - Unicode input support.
|
||||||
## Additional keycode aliases for software-implemented layouts \(Colemak, Dvorak, etc\)
|
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards
|
||||||
|
|
||||||
Everything is assuming you're in Qwerty \(in software\) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap:
|
|
||||||
|
|
||||||
```
|
|
||||||
#include <keymap_colemak.h>
|
|
||||||
```
|
|
||||||
|
|
||||||
If you use Dvorak, use `keymap_dvorak.h` instead of `keymap_colemak.h` for this line. After including this line, you will get access to:
|
|
||||||
|
|
||||||
* `CM_*` for all of the Colemak-equivalent characters
|
|
||||||
* `DV_*` for all of the Dvorak-equivalent characters
|
|
||||||
|
|
||||||
These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features.
|
|
||||||
|
|
||||||
To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F`. Using `KC_F` under these same circumstances would result in `T`.
|
|
||||||
|
|
||||||
## Backlight Breathing
|
|
||||||
|
|
||||||
In order to enable backlight breathing, the following line must be added to your config.h file.
|
|
||||||
|
|
||||||
```
|
|
||||||
#define BACKLIGHT_BREATHING
|
|
||||||
```
|
|
||||||
|
|
||||||
The following function calls are used to control the breathing effect.
|
|
||||||
|
|
||||||
* `breathing_enable()` - Enable the free-running breathing effect.
|
|
||||||
* `breathing_disable()` - Disable the free-running breathing effect immediately.
|
|
||||||
* `breathing_self_disable()` - Disable the free-running breathing effect after the current effect ends.
|
|
||||||
* `breathing_toggle()` - Toggle the free-running breathing effect.
|
|
||||||
* `breathing_defaults()` - Reset the speed and brightness settings of the breathing effect.
|
|
||||||
|
|
||||||
The following function calls are used to control the maximum brightness of the breathing effect.
|
|
||||||
|
|
||||||
* `breathing_intensity_set(value)` - Set the brightness of the breathing effect when it is at its max value.
|
|
||||||
* `breathing_intensity_default()` - Reset the brightness of the breathing effect to the default value based on the current backlight intensity.
|
|
||||||
|
|
||||||
The following function calls are used to control the cycling speed of the breathing effect.
|
|
||||||
|
|
||||||
* `breathing_speed_set(value)` - Set the speed of the breathing effect - how fast it cycles.
|
|
||||||
* `breathing_speed_inc(value)` - Increase the speed of the breathing effect by a fixed value.
|
|
||||||
* `breathing_speed_dec(value)` - Decrease the speed of the breathing effect by a fixed value.
|
|
||||||
* `breathing_speed_default()` - Reset the speed of the breathing effect to the default value.
|
|
||||||
|
|
||||||
The following example shows how to enable the backlight breathing effect when the FUNCTION layer macro button is pressed:
|
|
||||||
|
|
||||||
```
|
|
||||||
case MACRO_FUNCTION:
|
|
||||||
if (record->event.pressed)
|
|
||||||
{
|
|
||||||
breathing_speed_set(3);
|
|
||||||
breathing_enable();
|
|
||||||
layer_on(LAYER_FUNCTION);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
breathing_speed_set(1);
|
|
||||||
breathing_self_disable();
|
|
||||||
layer_off(LAYER_FUNCTION);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
```
|
|
||||||
|
|
||||||
The following example shows how to pulse the backlight on-off-on when the RAISED layer macro button is pressed:
|
|
||||||
|
|
||||||
```
|
|
||||||
case MACRO_RAISED:
|
|
||||||
if (record->event.pressed)
|
|
||||||
{
|
|
||||||
layer_on(LAYER_RAISED);
|
|
||||||
breathing_speed_set(2);
|
|
||||||
breathing_pulse();
|
|
||||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
layer_off(LAYER_RAISED);
|
|
||||||
update_tri_layer(LAYER_LOWER, LAYER_RAISED, LAYER_ADJUST);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
```
|
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
# Hardware
|
||||||
|
|
||||||
|
QMK runs on a variety of hardware. If your processor can be targetted by [LUFA](http://www.fourwalledcubicle.com/LUFA.php) or [ChibiOS](http://www.chibios.com) you can probably get QMK running on it. This section explores getting QMK running on, and communicating with, hardware of all kinds.
|
||||||
|
|
||||||
|
* [Keyboard Guidelines](hardware_keyboard_guidelines.md)
|
||||||
|
* [AVR Processors](hardware_avr.md)
|
||||||
|
* ARM Processors (TBD)
|
||||||
|
* [Drivers](hardware_drivers.md)
|
@ -0,0 +1,157 @@
|
|||||||
|
# Keyboards With AVR Processors
|
||||||
|
|
||||||
|
This page describes the support for for AVR processors in QMK. AVR processors include the atmega32u4, atmega32u2, at90usb1286, and other processors from Atmel Corporation. AVR processors are 8-bit MCU's that are designed to be easy to work with. The most common AVR processors in keyboards have on-board USB and plenty of GPIO for supporting large keyboard matrices. They are the most popular MCU for use in keyboards today.
|
||||||
|
|
||||||
|
If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_guidelines.md) to get a sense of how keyboards fit into QMK.
|
||||||
|
|
||||||
|
## Adding Your AVR Keyboard to QMK
|
||||||
|
|
||||||
|
QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ util/new_project.sh my_awesome_keyboard
|
||||||
|
######################################################
|
||||||
|
# /keyboards/my_awesome_keyboard project created. To start
|
||||||
|
# working on things, cd into keyboards/my_awesome_keyboard
|
||||||
|
######################################################
|
||||||
|
```
|
||||||
|
|
||||||
|
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.
|
||||||
|
|
||||||
|
## `readme.md`
|
||||||
|
|
||||||
|
This is where you'll describe your keyboard. Please follow the [Keyboard Readme Template](documentation_templates.md#keyboard-readmemd-template) when writing your `readme.md`. You're encouraged to place an image at the top of your `readme.md`, please use an external service such as [Imgur](http://imgur.com) to host the images.
|
||||||
|
|
||||||
|
## `<keyboard>.c`
|
||||||
|
|
||||||
|
This is where all the custom logic for your keyboard goes. Many keyboards do not need to put anything at all in here. You can learn more about writing custom logic in [Custom Quantum Functions](custom_quantum_functions.md).
|
||||||
|
|
||||||
|
## `<keyboard>.h`
|
||||||
|
|
||||||
|
This is the file you define your [Layout Macro(s)](feature_layouts.md) in. At minumum you should have a `#define LAYOUT` for your keyboard that looks something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00, k01, k02, \
|
||||||
|
k10, k11 \
|
||||||
|
) { \
|
||||||
|
{ k00, k01, k02 }, \
|
||||||
|
{ k10, KC_NO, k11 }, \
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The first half of the `LAYOUT` pre-processor macro defines the physical arrangement of keys. The second half of the macro defines the matrix the switches are connected to. This allows you to have a physical arrangement of keys that differs from the wiring matrix.
|
||||||
|
|
||||||
|
Each of the `k__` variables needs to be unique, and typically they follow the format `k<row><col>`.
|
||||||
|
|
||||||
|
The physical matrix (the second half) must have a number of rows equalling `MATRIX_ROWS`, and each row must have exactly `MATRIX_COLS` elements in it. If you do not have this many physical keys you can use `KC_NO` to fill in the blank spots.
|
||||||
|
|
||||||
|
## `config.h`
|
||||||
|
|
||||||
|
The `config.h` file is where you configure the hardware and feature set for your keyboard. There are a lot of options that can be placed in that file, too many to list there. For a complete overview of available options see the [Config Options](config_options.md) page.
|
||||||
|
|
||||||
|
### Hardware Configuration
|
||||||
|
|
||||||
|
|
||||||
|
At the top of the `config.h` you'll find USB related settings. These control how your keyboard appears to the Operating System. If you don't have a good reason to change you should leave the `VENDOR_ID` as `0xFEED`. For the `PRODUCT_ID` you should pick a number that is not yet in use.
|
||||||
|
|
||||||
|
Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately reflect your keyboard.
|
||||||
|
|
||||||
|
```
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER You
|
||||||
|
#define PRODUCT my_awesome_keyboard
|
||||||
|
#define DESCRIPTION A custom keyboard
|
||||||
|
```
|
||||||
|
|
||||||
|
{% hint style='info' %}
|
||||||
|
Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF.
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
|
### Keyboard Matrix Configuration
|
||||||
|
|
||||||
|
The next section of the `config.h` file deals with your keyboard's matrix. The first thing you should set is the matrix's size. This is usually, but not always, the same number of rows and columns as the physical key arrangement.
|
||||||
|
|
||||||
|
```
|
||||||
|
#define MATRIX_ROWS 2
|
||||||
|
#define MATRIX_COLS 3
|
||||||
|
```
|
||||||
|
|
||||||
|
Once you've defined the size of your matrix you need to define which pins on your MCU are connected to rows and columns. To do so simply specify the names of those pins:
|
||||||
|
|
||||||
|
```
|
||||||
|
#define MATRIX_ROW_PINS { D0, D5 }
|
||||||
|
#define MATRIX_COL_PINS { F1, F0, B0 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
```
|
||||||
|
|
||||||
|
The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open.
|
||||||
|
|
||||||
|
Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`.
|
||||||
|
|
||||||
|
```
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
```
|
||||||
|
|
||||||
|
### Backlight Configuration
|
||||||
|
|
||||||
|
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
|
||||||
|
|
||||||
|
```
|
||||||
|
#define BACKLIGHT_PIN B7
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
```
|
||||||
|
|
||||||
|
{% hint style='info' %}
|
||||||
|
You can use backlighting on any pin you like, but you will have to do more work to support that. See the [Backlight Documentation](feature_backlight.md) for more details.
|
||||||
|
{% endhint %}
|
||||||
|
|
||||||
|
### Other Configuration Options
|
||||||
|
|
||||||
|
There are a lot of features that can be configured or tuned in `config.h`. You should see the [Config Options](config_options.md) page for more details.
|
||||||
|
|
||||||
|
## `rules.mk`
|
||||||
|
|
||||||
|
You use the `rules.mk` file to tell QMK what files to build and what features to enable. If you are building around an atmega32u4 you can largely leave these defaults alone. If you are using another MCU you may have to tweak some parameters.
|
||||||
|
|
||||||
|
### MCU Options
|
||||||
|
|
||||||
|
These options tell the build system what CPU to build for. Be very careful if you change any of these settings, you can render your keyboard inoperable.
|
||||||
|
|
||||||
|
```
|
||||||
|
MCU = atmega32u4
|
||||||
|
F_CPU = 16000000
|
||||||
|
ARCH = AVR8
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
```
|
||||||
|
|
||||||
|
### Bootloader Size
|
||||||
|
|
||||||
|
The bootloader is a special section of your MCU that allows you to upgrade the code stored on the MCU. Think of it like a Rescue Partition for your keyboard. If you are using a teensy 2.0, or a device like the Ergodox EZ that uses the teensy bootloader you should set this to `512`. Most other bootloaders should be set to `4096`, but `1024` and `2048` are other possible values you may encounter.
|
||||||
|
|
||||||
|
#### Teensy 2.0 Bootloader Example
|
||||||
|
|
||||||
|
```
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Teensy 2.0++ Bootloader Example
|
||||||
|
|
||||||
|
```
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=1024
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Atmel DFU Loader Example
|
||||||
|
|
||||||
|
```
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build Options
|
||||||
|
|
||||||
|
There are a number of features that can be turned on or off in `rules.mk`. See the [Config Options](config_options.md#feature-options) page for a detailed list and description.
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
# QMK Hardware Drivers
|
||||||
|
|
||||||
|
QMK is used on a lot of different hardware. While support for the most common MCU's and matrix configurations is built-in there are a number of drivers that can be added to a keyboard to support additional hardware. Examples include mice and other pointing devices, i/o expanders for split keyboards, bluetooth modules, and LCD, OLED, and TFT screens.
|
||||||
|
|
||||||
|
<!-- FIXME: This should talk about how drivers are integrated into QMK and how you can add your own driver.
|
||||||
|
|
||||||
|
# Driver System Overview
|
||||||
|
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Available Drivers
|
||||||
|
|
||||||
|
## ProMicro (AVR only)
|
||||||
|
|
||||||
|
Support for addressing pins on the ProMicro by their Arduino name rather than their AVR name. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||||
|
|
||||||
|
## SSD1306 (AVR only)
|
||||||
|
|
||||||
|
Support for SSD1306 based OLED displays. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||||
|
|
||||||
|
## uGFX
|
||||||
|
|
||||||
|
You can make use of uGFX within QMK to drive character and graphic LCD's, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process.
|
||||||
|
|
||||||
|
## WS2812 (AVR only)
|
||||||
|
|
||||||
|
Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page.
|
@ -1,35 +1,49 @@
|
|||||||
# Adding your keyboard to QMK
|
# QMK Keyboard Guidelines
|
||||||
|
|
||||||
We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
|
We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
|
||||||
|
|
||||||
## Naming your directory/project
|
## Naming your keyboard/project
|
||||||
|
|
||||||
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format.
|
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Your directory and your `.h` and `.c` files should have exactly the same name. All folders should follow the same format.
|
||||||
|
|
||||||
## `readme.md`
|
## `readme.md`
|
||||||
|
|
||||||
All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming).
|
All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to more information. Please follow the [published template](documentation_templates.md#keyboard-readmemd-template).
|
||||||
|
|
||||||
## Image/Hardware files
|
## Image/Hardware files
|
||||||
|
|
||||||
In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method.
|
In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the `readme.md` is the preferred method.
|
||||||
|
|
||||||
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||||
|
|
||||||
## Non-production/handwired projects
|
## Non-production/handwired projects
|
||||||
|
|
||||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||||
|
|
||||||
## Warnings as errors
|
## Warnings as errors
|
||||||
|
|
||||||
When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
|
When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
|
||||||
|
|
||||||
## Licenses
|
## Copyright Blurb
|
||||||
|
|
||||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
|
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
|
||||||
|
|
||||||
Copyright 2017 Your Name <your@email.com>
|
Copyright 2017 Your Name <your@email.com>
|
||||||
|
|
||||||
|
If you are modifying someone else's code and have made only trivial changes you should leave their name in the copyright statement. If you have done significant work on the file you should add your name to theirs, like so:
|
||||||
|
|
||||||
|
Copyright 2017 Their Name <original_author@example.com> Your Name <you@example.com>
|
||||||
|
|
||||||
|
The year should be the first year the file is created. If work was done to that file in later years you can reflect that by appending the second year to the first, like so:
|
||||||
|
|
||||||
|
Copyright 2015-2017 Your Name <you@example.com>
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
The core of QMK is licensed under the [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). If you are shipping binaries for AVR processors you may choose either [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) or [GPLv3](https://www.gnu.org/licenses/gpl.html). If you are shipping binaries for ARM processors you must choose [GPL Version 3](https://www.gnu.org/licenses/gpl.html) to comply with the [ChibiOS](http://www.chibios.org) GPLv3 license.
|
||||||
|
|
||||||
|
If your keyboard makes use of the [uGFX](https://ugfx.io) features within QMK you must comply with the [uGFX License](https://ugfx.io/license.html), which requires a separate commercial license before selling a device containing uGFX.
|
||||||
|
|
||||||
## Technical details
|
## Technical details
|
||||||
|
|
||||||
If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)!
|
If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)!
|
@ -1,63 +0,0 @@
|
|||||||
# Porting your keyboard to QMK
|
|
||||||
|
|
||||||
This page describes the technical details of porting an existing keyboard to QMK. If you're looking to add your keyboard to QMK, please [look through these guidelines](adding_a_keyboard_to_qmk.md)!
|
|
||||||
|
|
||||||
If your keyboard is running an Atmega chip (atmega32u4 and others), it's pretty easy to get things setup for compiling your own firmware to flash onto your board. There is a `/util/new_project.sh <keyboard>` script to help get you started - you can simply pass your keyboard's name into the script, and all of the necessary files will be created. The components of each are described below.
|
|
||||||
|
|
||||||
## `/keyboards/<keyboard>/config.h`
|
|
||||||
|
|
||||||
The `USB Device descriptor parameter` block contains parameters are used to uniquely identify your keyboard, but they don't really matter to the machine.
|
|
||||||
|
|
||||||
Your `MATRIX_ROWS` and `MATRIX_COLS` are the numbers of rows and cols in your keyboard matrix - this may be different than the number of actual rows and columns on your keyboard. There are some tricks you can pull to increase the number of keys in a given matrix, but most keyboards are pretty straight-forward.
|
|
||||||
|
|
||||||
The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each row/column. Your schematic (if you have one) will have this information on it, and the values will vary depending on your setup. This is one of the most important things to double-check in getting your keyboard setup correctly.
|
|
||||||
|
|
||||||
For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
|
|
||||||
|
|
||||||
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
|
|
||||||
|
|
||||||
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
|
|
||||||
|
|
||||||
`BACKLIGHT_LEVELS` is how many levels exist for your backlight - max is 15, and they are computed automatically from this number.
|
|
||||||
|
|
||||||
## `/keyboards/<keyboard>/rules.mk`
|
|
||||||
|
|
||||||
The values at the top likely won't need to be changed, since most boards use the `atmega32u4` chip. The `BOOTLOADER_SIZE` will need to be adjusted based on your MCU type. It's defaulted to the Teensy, since that's the most common controller. Below is quoted from the `Makefile`.
|
|
||||||
|
|
||||||
```
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 1024
|
|
||||||
# Atmel DFU loader 4096
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
|
||||||
```
|
|
||||||
|
|
||||||
At the bottom of the file, you'll find lots of features to turn on and off - all of these options should be set with `?=` to allow for the keymap overrides. `?=` only assigns if the variable was previously undefined. For the full documenation of these features, see the [Makefile options](getting_started_make_guide.md#makefile-options).
|
|
||||||
|
|
||||||
## `/keyboards/<keyboard>/readme.md`
|
|
||||||
|
|
||||||
This is where you'll describe your keyboard - please write as much as you can about it! Talking about default functionality/features is useful here. Feel free to link to external pages/sites if necessary. Images can be included here as well, as long as they're hosted elsewhere (imgur).
|
|
||||||
|
|
||||||
## `/keyboards/<keyboard>/<keyboard>.c`
|
|
||||||
|
|
||||||
This is where all of the custom logic for your keyboard goes - you may not need to put anything in this file, since a lot of things are configured automatically. All of the `*_kb()` functions are defined here. If you modify them, remember to keep the calls to `*_user()`, or things in the keymaps might not work. You can read more about the functions [here](custom_quantum_functions.md).
|
|
||||||
|
|
||||||
## `/keyboards/<keyboard>/<keyboard>.h`
|
|
||||||
|
|
||||||
Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accomodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
|
|
||||||
|
|
||||||
```
|
|
||||||
#define KEYMAP( \
|
|
||||||
k00, k01, k02, \
|
|
||||||
k10, k11 \
|
|
||||||
) \
|
|
||||||
{ \
|
|
||||||
{ k00, k01, k02 }, \
|
|
||||||
{ k10, KC_NO, k11 }, \
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Each of the `kxx` variables needs to be unique, and usually follows the format `k<row><col>`. You can place `KC_NO` where your dead keys are in your matrix.
|
|
||||||
|
|
@ -1,12 +1,44 @@
|
|||||||
{
|
{
|
||||||
"redirects": [
|
"redirects": [
|
||||||
|
{
|
||||||
|
"from": "adding_a_keyboard_to_qmk.html",
|
||||||
|
"to": "hardware_keyboard_guidelines.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"from": "build_environment_setup.html",
|
"from": "build_environment_setup.html",
|
||||||
"to": "getting_started_build_tools.html"
|
"to": "getting_started_build_tools.html"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"from": "dynamic_macros.html",
|
||||||
|
"to": "feature_dynamic_macros.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "feature_common_shortcuts.html",
|
||||||
|
"to": "feature_advanced_keycodes.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "key_lock.html",
|
||||||
|
"to": "feature_key_lock.html"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"from": "make_instructions.html",
|
"from": "make_instructions.html",
|
||||||
"to": "getting_started_make_guide.html"
|
"to": "getting_started_make_guide.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "porting_your_keyboard_to_qmk.html",
|
||||||
|
"to": "hardware_avr.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "space_cadet_shift.html",
|
||||||
|
"to": "feature_space_cadet.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "tap_dance.html",
|
||||||
|
"to": "feature_tap_dance.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "unicode.html",
|
||||||
|
"to": "feature_unicode.html"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "clueboard_17.h"
|
#include "17.h"
|
||||||
|
|
||||||
int pwm_level;
|
int pwm_level;
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
#include "66.h"
|
@ -1 +0,0 @@
|
|||||||
#include "clueboard_66.h"
|
|
@ -1,4 +1,4 @@
|
|||||||
#include "cluecard.h"
|
#include "card.h"
|
||||||
#define BL_RED OCR1B
|
#define BL_RED OCR1B
|
||||||
#define BL_GREEN OCR1A
|
#define BL_GREEN OCR1A
|
||||||
#define BL_BLUE OCR1C
|
#define BL_BLUE OCR1C
|
@ -0,0 +1,74 @@
|
|||||||
|
#include "dz60.h"
|
||||||
|
|
||||||
|
#define _DEFAULT 0
|
||||||
|
#define _FN 1
|
||||||
|
#define _SFX 2
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define ______ KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty gui/alt/space/alt/gui
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* |LGUI | LAlt | Space | RAlt |RGUI |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DEFAULT] = KEYMAP_TRUE_HHKB( /* Basic QWERTY */
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, ______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \
|
||||||
|
KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | SFX | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | Stop | |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FN] = KEYMAP_TRUE_HHKB( /* Layer 1 */
|
||||||
|
TG(_SFX),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
|
||||||
|
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
|
||||||
|
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \
|
||||||
|
______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN,______, ______, \
|
||||||
|
______, ______, ______, KC_MSTP, ______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* SFX Layer
|
||||||
|
* ,-----------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | BL- | BL+ | BL | | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | RGBT| RGBM| | | | | | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | |
|
||||||
|
* |-----------------------------------------------------------------------------------------+
|
||||||
|
* | | | | | |
|
||||||
|
* `-----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_SFX] = KEYMAP_HHKB(
|
||||||
|
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||||
|
______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||||
|
______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||||
|
______, ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \
|
||||||
|
______, ______, ______, ______, ______ \
|
||||||
|
)
|
||||||
|
};
|
@ -0,0 +1,21 @@
|
|||||||
|
#ifndef CONFIG_H_
|
||||||
|
#define CONFIG_H_
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 150
|
||||||
|
|
||||||
|
// Combos not working yet
|
||||||
|
// #define COMBO_TERM 20
|
||||||
|
// #define COMBO_COUNT 1
|
||||||
|
// #define COMBO_ALLOW_ACTION_KEYS
|
||||||
|
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#undef MOUSEKEY_DELAY
|
||||||
|
#define MOUSEKEY_DELAY 100
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1 @@
|
|||||||
|
https://i.imgur.com/fKX0Zbs.png
|
@ -0,0 +1 @@
|
|||||||
|
https://i.imgur.com/giAc3M9.jpg
|
@ -0,0 +1,852 @@
|
|||||||
|
#include "ergodox.h"
|
||||||
|
// #include "debug.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "eeprom.h"
|
||||||
|
#include "keymap_colemak.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
enum ergodox_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_QWOC,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_PLOVER,
|
||||||
|
// Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet)
|
||||||
|
_SUPER,
|
||||||
|
_DUPER,
|
||||||
|
_SUPERDUPER,
|
||||||
|
_MOUSE,
|
||||||
|
_ADJUST,
|
||||||
|
_MDIA,
|
||||||
|
_SYMB,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ergodox_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
QWOC,
|
||||||
|
PLOVER,
|
||||||
|
SUPER,
|
||||||
|
DUPER,
|
||||||
|
SUPERDUPER,
|
||||||
|
MOUSE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
BACKLIT,
|
||||||
|
EXT_PLV,
|
||||||
|
SDTOGG, // Toggle SuperDuper
|
||||||
|
EPRM,
|
||||||
|
VRSN,
|
||||||
|
RGB_SLD
|
||||||
|
};
|
||||||
|
|
||||||
|
enum functions {
|
||||||
|
M_GUI_UNDS, // Simulate GUI_T(KC_UNDS)
|
||||||
|
M_SFT_PO, // SFT_T(KC_LPRN)
|
||||||
|
M_SFT_PC, // SFT_T(KC_RPRN)
|
||||||
|
};
|
||||||
|
|
||||||
|
// Timer for custom mod tap
|
||||||
|
static uint16_t m_gui_unds_timer;
|
||||||
|
static uint16_t m_sft_po_timer;
|
||||||
|
static uint16_t m_sft_pc_timer;
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// Narze : Custom Macros
|
||||||
|
#define HPR_ESC ALL_T(KC_ESC)
|
||||||
|
#define SFT_ENT SFT_T(KC_ENT)
|
||||||
|
#define SFT_PO F(M_SFT_PO)
|
||||||
|
#define SFT_PC F(M_SFT_PC)
|
||||||
|
#define GUI_MINS GUI_T(KC_MINS)
|
||||||
|
#define GUI_UNDS F(M_GUI_UNDS)
|
||||||
|
|
||||||
|
// Combo : SuperDuper layer from S+D (R+S in Colemak)
|
||||||
|
// #define COMBO_COUNT 1
|
||||||
|
// #define SUPERDUPER_COMBO_COUNT 3
|
||||||
|
// #define EECONFIG_SUPERDUPER_INDEX (uint8_t *) 19
|
||||||
|
|
||||||
|
// enum process_combo_event {
|
||||||
|
// CB_SUPERDUPER,
|
||||||
|
// };
|
||||||
|
|
||||||
|
// const uint16_t PROGMEM superduper_combos[SUPERDUPER_COMBO_COUNT][3] = {
|
||||||
|
// [_QWERTY] = {KC_S, KC_D, COMBO_END},
|
||||||
|
// [_COLEMAK] = {KC_R, KC_S, COMBO_END},
|
||||||
|
// [_QWOC] = {CM_S, CM_D, COMBO_END},
|
||||||
|
// };
|
||||||
|
|
||||||
|
// combo_t PROGMEM key_combos[COMBO_COUNT] = {
|
||||||
|
// [CB_SUPERDUPER] = COMBO_ACTION(superduper_combos[_QWERTY]),
|
||||||
|
// };
|
||||||
|
|
||||||
|
// volatile bool superduper_enabled = true;
|
||||||
|
|
||||||
|
// const uint16_t empty_combo[] = {COMBO_END};
|
||||||
|
|
||||||
|
// void set_superduper_key_combos(void);
|
||||||
|
// void clear_superduper_key_combos(void);
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | Mdia | | Mdia | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | E | R | T | Symb | | Symb | Y | U | I | O | P | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Hp/Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | Sft/( | Z/Mo | X | C | V | B | | | | N | M | , | . | SD-/ | Sft/) |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse | GUI/-| Alt | Ctrl | Low/] |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Enter| LGui | | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space| Back |------| |------| Back |Enter |
|
||||||
|
* | | Space| End | | PgDn | Space | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO),
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, LT(_SYMB, KC_NO),
|
||||||
|
HPR_ESC, KC_A, LT(_SUPER, KC_S), LT(_DUPER, KC_D), KC_F, KC_G,
|
||||||
|
SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||||
|
LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER,
|
||||||
|
KC_ENT, KC_LGUI,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
LT(_SYMB, KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC,
|
||||||
|
RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC),
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_BSPC, KC_ENT
|
||||||
|
),
|
||||||
|
/* Colemak
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | Mdia | | Mdia | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | Tab | Q | W | F | P | G | Symb | | Symb | J | L | U | Y | ; | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Hp/Esc | A | R | S | T | D |------| |------| H | N | E | I | O | ' |
|
||||||
|
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||||
|
* | Sft/( | Z/Mo | X | C | V | B | | | | K | M | , | . | SD-/ | Sft/) |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse | GUI/-| Alt | Ctrl | Low/] |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Enter| LGui | | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space| Back |------| |------| Back |Enter |
|
||||||
|
* | | Space| End | | PgDn | Space | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO),
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, LT(_SYMB, KC_NO),
|
||||||
|
HPR_ESC, KC_A, LT(_SUPER,KC_R), LT(_DUPER,KC_S), KC_T, KC_D,
|
||||||
|
SFT_PO, LT(_MOUSE, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
|
||||||
|
LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER,
|
||||||
|
KC_ENT, KC_LGUI,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
LT(_SYMB, KC_NO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||||
|
KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
MEH_T(KC_NO),KC_K, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC,
|
||||||
|
RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC),
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_BSPC, KC_ENT
|
||||||
|
),
|
||||||
|
/* Qwerty on software Colemak : Useful for gaming with qwerty keymaps! */
|
||||||
|
[_QWOC] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO),
|
||||||
|
KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, LT(_SYMB, KC_NO),
|
||||||
|
HPR_ESC, CM_A, LT(_SUPER,CM_S), LT(_DUPER,CM_D), CM_F, CM_G,
|
||||||
|
SFT_PO, LT(_MOUSE, CM_Z), CM_X, CM_C, CM_V, CM_B, ALL_T(KC_NO),
|
||||||
|
LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER,
|
||||||
|
KC_ENT, KC_LGUI,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||||
|
LT(_SYMB, KC_NO), CM_Y, CM_U, CM_I, CM_O, CM_P, KC_BSLS,
|
||||||
|
CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT,
|
||||||
|
MEH_T(KC_NO),CM_N, CM_M, CM_COMM,CM_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC,
|
||||||
|
RAISE, GUI_MINS,KC_RALT,KC_RCTL, LT(_LOWER, KC_RBRC),
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_BSPC, KC_ENT
|
||||||
|
),
|
||||||
|
/* Lower
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______,
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
||||||
|
_______, _______, _______, KC_BTN1, KC_BTN2,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
_______, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
/* Raise
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, _______,
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
||||||
|
_______, _______, _______, KC_BTN1, KC_BTN2,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||||
|
KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Plover
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | # | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | # | # | # | # | # | | | | # | # | # | # | # | # |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Hp/Esc | S | T | P | H | * |------| |------| * | F | P | L | T | D |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | Sft/( | S | K | W | R | * | | | | * | R | B | G | S | Z |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | Exit | | | A | O | | E | U | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | Enter| LGui | | Alt |Ctrl/Esc|
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | Home | | PgUp | | |
|
||||||
|
* | Space| Back |------| |------| Back |Enter |
|
||||||
|
* | | Space| End | | PgDn | Space | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[_PLOVER] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX,
|
||||||
|
XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX,
|
||||||
|
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||||
|
XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX,
|
||||||
|
EXT_PLV, XXXXXXX, XXXXXXX,KC_C, KC_V,
|
||||||
|
KC_ENT, KC_LGUI,
|
||||||
|
KC_HOME,
|
||||||
|
KC_SPC,KC_BSPC,KC_END,
|
||||||
|
// right hand
|
||||||
|
XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX,
|
||||||
|
XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX,
|
||||||
|
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_N, KC_M,XXXXXXX,XXXXXXX, XXXXXXX,
|
||||||
|
KC_LALT, CTL_T(KC_ESC),
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDN,KC_BSPC, KC_ENT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* SuperDuper : https://gist.github.com/narze/861e2167784842d38771
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | T← | T→ | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | A | [SuperDuper]| Bksp | Gui |------| |------| ← | ↓ | ↑ | → | Del | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | Shift| |------| |------| |Shift |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[_SUPERDUPER] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_LALT, _______, _______, KC_BSPC, KC_LGUI,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
KC_LSFT,_______,_______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, S(LGUI(KC_LBRC)), S(LGUI(KC_RBRC)), _______, _______,
|
||||||
|
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______, KC_LSFT
|
||||||
|
),
|
||||||
|
// Intermediate keymaps for SuperDuper (Combo keys does not work on Infinity yet)
|
||||||
|
[_SUPER] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, DUPER, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______,_______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______, _______
|
||||||
|
),
|
||||||
|
[_DUPER] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, SUPER, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______,_______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Mouse
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | S↑ | M↑ | S↓ | | | | | | | S↑ | S↓ | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | M← | M↓ | M→ | |------| |------| M← | M↓ | M↑ | M→ | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | |[Mouse| | | | M3 | | | | M3 | | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | M2 | | M2 | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | Left | |------| |------| | Left |
|
||||||
|
* | Click| | | | | | Click|
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[_MOUSE] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______,
|
||||||
|
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
||||||
|
_______, _______, _______, _______, _______, KC_BTN3, _______,
|
||||||
|
_______, _______, _______, _______, KC_BTN2,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
KC_BTN1,_______,_______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_WH_U, KC_WH_D, _______, _______,
|
||||||
|
KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______,
|
||||||
|
_______, KC_BTN3, _______, _______, _______, _______, _______,
|
||||||
|
KC_BTN2, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______, KC_BTN1
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | |Reset | | | | | | | | | | | | | Del |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | |AGnorm|------| |------|AGswap|Qwerty|Colemk|QwOnCo|Plover| |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | |SDTogg| | | | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | | | | | | | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+--------+------.
|
||||||
|
* | | | | | | | |
|
||||||
|
* | | |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `----------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, RESET, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, AG_NORM,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______,_______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_DEL,
|
||||||
|
AG_SWAP, QWERTY, COLEMAK, QWOC, PLOVER, _______,
|
||||||
|
_______, SDTOGG, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______,_______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Layers below are not actively used but kept for future reference */
|
||||||
|
|
||||||
|
/* Symbol
|
||||||
|
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||||
|
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
|
||||||
|
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
|
||||||
|
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | EPRM | | | | | | | . | 0 | = | |
|
||||||
|
* `-----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* |Animat| | |Toggle|Solid |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* |Bright|Bright| | | |Hue- |Hue+ |
|
||||||
|
* |ness- |ness+ |------| |------| | |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// SYMBOLS
|
||||||
|
[_SYMB] = KEYMAP(
|
||||||
|
// left hand
|
||||||
|
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||||
|
_______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,_______,
|
||||||
|
_______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||||
|
_______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______,
|
||||||
|
EPRM,_______,_______,_______,_______,
|
||||||
|
RGB_MOD,_______,
|
||||||
|
_______,
|
||||||
|
RGB_VAD,RGB_VAI,_______,
|
||||||
|
// right hand
|
||||||
|
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
_______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
|
||||||
|
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______,
|
||||||
|
_______, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______,
|
||||||
|
_______,KC_DOT, KC_0, KC_EQL, _______,
|
||||||
|
RGB_TOG, RGB_SLD,
|
||||||
|
_______,
|
||||||
|
_______, RGB_HUD, RGB_HUI
|
||||||
|
),
|
||||||
|
/* Media and mouse keys
|
||||||
|
*
|
||||||
|
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||||
|
* | | | | MsUp | | | | | | | | | | | |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||||
|
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||||
|
* | | | | | | | | | | | | Prev | Next | | |
|
||||||
|
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||||
|
* | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | |
|
||||||
|
* `----------------------------------' `----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | | | | | |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | | | | |Brwser|
|
||||||
|
* | | |------| |------| |Back |
|
||||||
|
* | | | | | | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
// MEDIA AND MOUSE
|
||||||
|
[_MDIA] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_MS_U, _______, _______, _______,
|
||||||
|
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_BTN1, KC_BTN2,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, _______,
|
||||||
|
// right hand
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, KC_MPLY,
|
||||||
|
_______, _______, _______, KC_MPRV, KC_MNXT, _______, _______,
|
||||||
|
KC_VOLU, KC_VOLD, KC_MUTE, _______, _______,
|
||||||
|
_______, _______,
|
||||||
|
_______,
|
||||||
|
_______, _______, KC_WBAK
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_QWERTY);
|
||||||
|
|
||||||
|
// key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWERTY];
|
||||||
|
// eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||||
|
|
||||||
|
// key_combos[CB_SUPERDUPER].keys = superduper_combos[_COLEMAK];
|
||||||
|
// eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case QWOC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
persistant_default_layer_set(1UL<<_QWOC);
|
||||||
|
|
||||||
|
// key_combos[CB_SUPERDUPER].keys = superduper_combos[_QWOC];
|
||||||
|
// eeprom_update_byte(EECONFIG_SUPERDUPER_INDEX, _QWOC);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SUPER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_SUPER);
|
||||||
|
update_tri_layer(_SUPER, _DUPER, _SUPERDUPER);
|
||||||
|
} else {
|
||||||
|
layer_off(_SUPER);
|
||||||
|
update_tri_layer(_SUPER, _DUPER, _SUPERDUPER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DUPER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_DUPER);
|
||||||
|
update_tri_layer(_SUPER, _DUPER, _SUPERDUPER);
|
||||||
|
} else {
|
||||||
|
layer_off(_DUPER);
|
||||||
|
update_tri_layer(_SUPER, _DUPER, _SUPERDUPER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case PLOVER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
layer_off(_LOWER);
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
layer_on(_PLOVER);
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
keymap_config.raw = eeconfig_read_keymap();
|
||||||
|
keymap_config.nkro = 1;
|
||||||
|
eeconfig_update_keymap(keymap_config.raw);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EXT_PLV:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_off(_PLOVER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SDTOGG:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
// superduper_enabled = !superduper_enabled;
|
||||||
|
|
||||||
|
// if (superduper_enabled) {
|
||||||
|
// set_superduper_key_combos();
|
||||||
|
// } else {
|
||||||
|
// clear_superduper_key_combos();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EPRM:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case VRSN:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RGB_SLD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_mode(1);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_setup(void) {
|
||||||
|
// set_superduper_key_combos();
|
||||||
|
}
|
||||||
|
|
||||||
|
// void set_superduper_key_combos(void) {
|
||||||
|
// uint8_t layer = eeprom_read_byte(EECONFIG_SUPERDUPER_INDEX);
|
||||||
|
|
||||||
|
// switch (layer) {
|
||||||
|
// case _QWERTY:
|
||||||
|
// case _COLEMAK:
|
||||||
|
// case _QWOC:
|
||||||
|
// key_combos[CB_SUPERDUPER].keys = superduper_combos[layer];
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// void clear_superduper_key_combos(void) {
|
||||||
|
// key_combos[CB_SUPERDUPER].keys = empty_combo;
|
||||||
|
// }
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
// uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
// ergodox_board_led_off();
|
||||||
|
// ergodox_right_led_1_off();
|
||||||
|
// ergodox_right_led_2_off();
|
||||||
|
// ergodox_right_led_3_off();
|
||||||
|
// switch (layer) {
|
||||||
|
// // TODO: Make this relevant to the ErgoDox EZ.
|
||||||
|
// case 1:
|
||||||
|
// ergodox_right_led_1_on();
|
||||||
|
// break;
|
||||||
|
// case 2:
|
||||||
|
// ergodox_right_led_2_on();
|
||||||
|
// break;
|
||||||
|
// default:
|
||||||
|
// // none
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Combos
|
||||||
|
|
||||||
|
// void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||||
|
// if (pressed) {
|
||||||
|
// switch(combo_index) {
|
||||||
|
// case CB_SUPERDUPER:
|
||||||
|
// layer_on(_SUPERDUPER);
|
||||||
|
// ergodox_board_led_on();
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// layer_off(_SUPERDUPER);
|
||||||
|
// ergodox_board_led_off();
|
||||||
|
// unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Macros
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[M_GUI_UNDS] = ACTION_MACRO_TAP(M_GUI_UNDS),
|
||||||
|
[M_SFT_PO] = ACTION_MACRO_TAP(M_SFT_PO),
|
||||||
|
[M_SFT_PC] = ACTION_MACRO_TAP(M_SFT_PC),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
bool tap_not_interrupted = record->tap.count > 0 && !record->tap.interrupted;
|
||||||
|
|
||||||
|
switch(id) {
|
||||||
|
// Hold for LGUI, tap for Underscore
|
||||||
|
case M_GUI_UNDS:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
m_gui_unds_timer = timer_read();
|
||||||
|
|
||||||
|
if (!tap_not_interrupted) {
|
||||||
|
register_mods(MOD_BIT(KC_LGUI));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tap_not_interrupted && timer_elapsed(m_gui_unds_timer) < TAPPING_TERM) {
|
||||||
|
|
||||||
|
add_weak_mods(MOD_BIT(KC_LSFT));
|
||||||
|
send_keyboard_report();
|
||||||
|
register_code(KC_MINS);
|
||||||
|
unregister_code(KC_MINS);
|
||||||
|
del_weak_mods(MOD_BIT(KC_LSFT));
|
||||||
|
send_keyboard_report();
|
||||||
|
record->tap.count = 0; // ad hoc: cancel tap
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LGUI));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Hold for LSHIFT, tap for Parens open
|
||||||
|
case M_SFT_PO:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
m_sft_po_timer = timer_read();
|
||||||
|
|
||||||
|
if (!tap_not_interrupted) {
|
||||||
|
register_mods(MOD_BIT(KC_LSFT));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tap_not_interrupted && timer_elapsed(m_sft_po_timer) < TAPPING_TERM) {
|
||||||
|
record->tap.count = 0;
|
||||||
|
return MACRO(D(RSFT), T(9), U(RSFT), END);
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_LSFT));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
// Hold for RSHIFT, tap for Parens close
|
||||||
|
case M_SFT_PC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
m_sft_pc_timer = timer_read();
|
||||||
|
|
||||||
|
if (!tap_not_interrupted) {
|
||||||
|
register_mods(MOD_BIT(KC_RSFT));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tap_not_interrupted && timer_elapsed(m_sft_pc_timer) < TAPPING_TERM) {
|
||||||
|
record->tap.count = 0;
|
||||||
|
return MACRO(D(LSFT), T(0), U(LSFT), END);
|
||||||
|
} else {
|
||||||
|
unregister_mods(MOD_BIT(KC_RSFT));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
@ -0,0 +1,45 @@
|
|||||||
|
# narze's layout
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- SuperDuper mode for Ergodox is still under development, since combo keys does not work very well on Ergodox firmware.
|
||||||
|
Now it is using multiple layers as a workaround. Actual implementation using combos are on my Planck layout.
|
||||||
|
|
||||||
|
## Key features
|
||||||
|
- Qwerty + [Colemak](https://colemak.com) layouts, and you can type Qwerty on software-level Colemak as well. Very useful for gaming or when your friend wanna type something but don't use Colemak.
|
||||||
|
- [(S)uper (D)uper Mode](https://github.com/jasonrudolph/keyboard#super-duper-mode) inspired by [jasonrudolph](https://github.com/jasonrudolph), with [some extensions](https://gist.github.com/narze/861e2167784842d38771) such as backspace & forward delete.
|
||||||
|
- Mouse keys with Z
|
||||||
|
|
||||||
|
## (S)uper (D)uper Mode
|
||||||
|
Press `S+D` simultaneously and hold, then...
|
||||||
|
- `H/J/K/L` for Vim-like movement
|
||||||
|
- `I/O` to move between browser tabs (Not working on Windows yet)
|
||||||
|
- `A` for `Option (Alt)`
|
||||||
|
- `F/;` for `Backspace/Forward delete`
|
||||||
|
- `A` with `H/L` to move to previous/next word
|
||||||
|
- `A` with `G/;` to delete to previous/next word
|
||||||
|
- `G` for `Cmd` (Gui/Windows)
|
||||||
|
- Available for all layouts (but plover) using physical S & D keys position in qwerty
|
||||||
|
- `Spacebar` for `Shift` (it's easier when already holding A with your pinky)
|
||||||
|
- Disable with `Raise+Lower+M`
|
||||||
|
- You can edit or add more useful keys in SUPERDUPER layer
|
||||||
|
- It can be activated by holding `/` as well, but it's slower since `LT()` uses `TAPPING_TERM` of 200ms but `S+D` uses `COMBO_TERM` of only 20ms (Can be changed within config.h)
|
||||||
|
|
||||||
|
## Build instructions
|
||||||
|
- `cd /path/to/qmk_firmware`
|
||||||
|
|
||||||
|
#### Left side
|
||||||
|
```
|
||||||
|
docker run -e keymap=narze -e subproject=infinity -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||||
|
avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_left.bin
|
||||||
|
dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_left.bin
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Right side
|
||||||
|
```
|
||||||
|
docker run -e keymap=narze -e subproject=infinity -e keyboard=ergodox -e MASTER=right --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||||
|
avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_right.bin
|
||||||
|
dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_right.bin
|
||||||
|
```
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
- [ ] Make SuperDuper mode fully-compatible in Windows by swapping GUI with Ctrl
|
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
|
||||||
|
# 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 = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
# Combos not working yet
|
||||||
|
COMBO_ENABLE = no
|
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Fred Sundvik
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "simple_visualizer.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
// Copied from keymap.c
|
||||||
|
enum ergodox_layers {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_QWOC,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_PLOVER,
|
||||||
|
// Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet)
|
||||||
|
_SUPER,
|
||||||
|
_DUPER,
|
||||||
|
_SUPERDUPER,
|
||||||
|
_MOUSE,
|
||||||
|
_ADJUST,
|
||||||
|
_MDIA,
|
||||||
|
_SYMB,
|
||||||
|
};
|
||||||
|
|
||||||
|
// This function should be implemented by the keymap visualizer
|
||||||
|
// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing
|
||||||
|
// that the simple_visualizer assumes that you are updating
|
||||||
|
// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is
|
||||||
|
// stopped. This can be done by either double buffering it or by using constant strings
|
||||||
|
static void get_visualizer_layer_and_color(visualizer_state_t* state) {
|
||||||
|
uint8_t saturation = 255;
|
||||||
|
|
||||||
|
uint8_t layer = biton32(state->status.layer);
|
||||||
|
state->target_lcd_color = LCD_COLOR(layer << 2, saturation, 0xFF);
|
||||||
|
|
||||||
|
switch(layer) {
|
||||||
|
case _QWERTY:
|
||||||
|
state->layer_text = "QWERTY";
|
||||||
|
break;
|
||||||
|
case _COLEMAK:
|
||||||
|
state->layer_text = "COLEMAK";
|
||||||
|
break;
|
||||||
|
case _QWOC:
|
||||||
|
state->layer_text = "QWERTY on COLEMAK";
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
state->layer_text = "LOWER";
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
state->layer_text = "RAISE";
|
||||||
|
break;
|
||||||
|
case _PLOVER:
|
||||||
|
state->layer_text = "PLOVER";
|
||||||
|
break;
|
||||||
|
case _SUPERDUPER:
|
||||||
|
state->layer_text = "SUPERDUPER";
|
||||||
|
break;
|
||||||
|
case _SUPER:
|
||||||
|
state->layer_text = "SUPER";
|
||||||
|
break;
|
||||||
|
case _DUPER:
|
||||||
|
state->layer_text = "DUPER";
|
||||||
|
break;
|
||||||
|
case _MOUSE:
|
||||||
|
state->layer_text = "MOUSE";
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
state->layer_text = "ADJUST";
|
||||||
|
break;
|
||||||
|
case _MDIA:
|
||||||
|
state->layer_text = "MDIA";
|
||||||
|
break;
|
||||||
|
case _SYMB:
|
||||||
|
state->layer_text = "SYMB";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state->layer_text = "NONE";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef CONFIG_HEARTROBOTNINJA_H
|
||||||
|
#define CONFIG_HEARTROBOTNINJA_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define ONESHOT_TAP_TOGGLE 2
|
||||||
|
#define ONESHOT_TIMEOUT 1000
|
||||||
|
|
||||||
|
#undef LEADER_TIMEOUT
|
||||||
|
#define LEADER_TIMEOUT 1000
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
#undef TAPPING_TOGGLE
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,680 @@
|
|||||||
|
#include "action_layer.h"
|
||||||
|
#include "action_util.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "ergodox_ez.h"
|
||||||
|
#include "version.h"
|
||||||
|
#include "wait.h"
|
||||||
|
|
||||||
|
/* Aliases */
|
||||||
|
#define ____ KC_TRNS
|
||||||
|
|
||||||
|
/* Layers */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
COLE = 0,
|
||||||
|
LOWER, // right hand 10 key
|
||||||
|
RAISE, // Function keys
|
||||||
|
AUX, // Things like rebooting the board to be flashed. NUM + RAISE
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Macros */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
NONE = 0,
|
||||||
|
|
||||||
|
// OS Functions
|
||||||
|
F_PASTE,
|
||||||
|
|
||||||
|
// Config Macros
|
||||||
|
CF_EPRM,
|
||||||
|
CF_VERS,
|
||||||
|
|
||||||
|
// RGB Macro
|
||||||
|
RGB_ANI,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Tap Dancery */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TD_BTK,
|
||||||
|
TD_TDE,
|
||||||
|
TD_LPRN,
|
||||||
|
TD_RPRN,
|
||||||
|
TD_MIN,
|
||||||
|
TD_USC,
|
||||||
|
TD_COPY,
|
||||||
|
TD_UNDO,
|
||||||
|
TD_FIND,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* OS Identifier */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
OS_WIN = 0,
|
||||||
|
OS_OSX,
|
||||||
|
OS_LIN,
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t os_type = OS_WIN;
|
||||||
|
|
||||||
|
static uint16_t rgb_timer;
|
||||||
|
bool time_travel = false;
|
||||||
|
bool skip_leds = false;
|
||||||
|
|
||||||
|
/* Keymaps */
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Keymap 0: Colemak Layer
|
||||||
|
*
|
||||||
|
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
|
* | Find | 1 ! | 2 @ | 3 # | 4 $ | 5 % | Undo | | VOLUP| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | LOCK |
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------|
|
||||||
|
* | ' " ` | Q | W | F | P | G | CCopy| | VOLDN| J | L | U Ü | Y | = + | ~ : ; |
|
||||||
|
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||||
|
* | ( [ { | A Ä | R | S ß | T | D |------| |------| H | N | E | I | O Ö | ) ] } |
|
||||||
|
* |-----------+------+------+------+------+------| Paste| | MUTE |------+------+------+------+------+-----------|
|
||||||
|
* | - , < | Z | X | C | V | B | | | | K | M | / ? | \ | | ^ | _ . > |
|
||||||
|
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||||
|
* | AUX | RAISE | LOWER | LEAD | GUI | | ESC | RUN | < | v | > |
|
||||||
|
* `-----------------------------------' `-----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | ALT | CTRL | | HOME | END |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | Del | | PGUP | | |
|
||||||
|
* | Space|Backsp|------| |------| Enter| Shift|
|
||||||
|
* | | | Tab | | PGDN | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[COLE] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
TD(TD_FIND), KC_1, KC_2, KC_3, KC_4, KC_5, TD(TD_UNDO),
|
||||||
|
TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, TD(TD_COPY),
|
||||||
|
TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||||
|
TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, M(F_PASTE),
|
||||||
|
TT(AUX), TT(RAISE), TT(LOWER), KC_LEAD, OSM(MOD_LGUI),
|
||||||
|
OSM(MOD_LALT), OSM(MOD_LCTL),
|
||||||
|
KC_DEL,
|
||||||
|
KC_SPC, KC_BSPC, KC_TAB,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
KC_VOLU, KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_L),
|
||||||
|
KC_VOLD, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE),
|
||||||
|
KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN),
|
||||||
|
KC_MUTE, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC),
|
||||||
|
KC_ESC, LGUI(KC_R), KC_LEFT, KC_DOWN, KC_RGHT,
|
||||||
|
KC_HOME, KC_END,
|
||||||
|
KC_PGUP,
|
||||||
|
KC_PGDOWN, KC_ENT, OSM(MOD_LSFT)),
|
||||||
|
|
||||||
|
/* Keymap 2: LOWER Layer
|
||||||
|
*
|
||||||
|
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | | | | ( | ) | ^ | / | ---- | |
|
||||||
|
* | | | | | | | ---- | | ---- | | | | | | ---- |
|
||||||
|
* |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | | | | 7 | 8 | 9 | * | ---- | ---- |
|
||||||
|
* |-----------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| 4 | 5 | 6 | - | ---- | ---- |
|
||||||
|
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | ---- | 1 | 2 | 3 | + | ---- | ---- |
|
||||||
|
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | | 0 | = | ---- | ---- | ---- |
|
||||||
|
* `-----------------------------------' `-------------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | ---- | ---- | | ---- | ---- |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | ---- | | ---- | | |
|
||||||
|
* | ---- | ---- |------| |------| ---- | ---- |
|
||||||
|
* | | | ---- | | ---- | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[LOWER] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
____, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____,
|
||||||
|
____, ____,
|
||||||
|
____,
|
||||||
|
____, ____, ____,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
____, KC_LPRN, KC_RPRN, KC_CIRC, KC_PSLS, ____, ____,
|
||||||
|
____, KC_7, KC_8, KC_9, KC_PAST, ____, ____,
|
||||||
|
KC_4, KC_5, KC_6, KC_PMNS, ____, ____,
|
||||||
|
____, KC_1, KC_2, KC_3, KC_PPLS, ____, ____,
|
||||||
|
KC_0, KC_PEQL, ____, ____, ____,
|
||||||
|
____, ____,
|
||||||
|
____,
|
||||||
|
____, ____, ____),
|
||||||
|
|
||||||
|
/* Keymap 3: RAISE Layer
|
||||||
|
*
|
||||||
|
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | ---- | | ---- | ! | @ | # | $ | % | ` ~ |
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------|
|
||||||
|
* | F7 | F8 | F9 | F10 | F11 | F12 | ---- | | ---- | ^ | & | * | ( | ) | - _ |
|
||||||
|
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| [ { | } ] | \ | | ; : | ' " | = + |
|
||||||
|
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | ---- | , < | > . | / ? | ---- | ---- | ---- |
|
||||||
|
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* `-----------------------------------' `-----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | ---- | ---- | | ---- | ---- |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | ---- | | ---- | | |
|
||||||
|
* | ---- | ---- |------| |------| ---- | ---- |
|
||||||
|
* | | | ---- | | ---- | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[RAISE] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, ____,
|
||||||
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ____,
|
||||||
|
____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____,
|
||||||
|
____, ____,
|
||||||
|
____,
|
||||||
|
____, ____, ____,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
____, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV,
|
||||||
|
____, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS,
|
||||||
|
KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL,
|
||||||
|
____, KC_COMM, KC_DOT, KC_SLSH, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____,
|
||||||
|
____, ____,
|
||||||
|
____,
|
||||||
|
____, ____, ____),
|
||||||
|
|
||||||
|
/* Keymap 7: Configuration Layer
|
||||||
|
*
|
||||||
|
* ,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||||
|
* | EEPROM | ---- | ---- | ---- | ---- | ---- | ---- | | PWR | ---- | ---- | ---- | ---- | ---- | |
|
||||||
|
* | | | | | | | | | | | | | | | VERSION |
|
||||||
|
* |-----------+------+------+------+------+------+------| |------+------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |-----------+------+------+------+------+------| ---- | | SLP |------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | ---- | | WAKE | ---- | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | | ---- | ---- | ---- | ---- | ---- |
|
||||||
|
* `-----------------------------------' `-----------------------------------'
|
||||||
|
* ,-------------. ,-------------.
|
||||||
|
* | ---- | ---- | | TOG | ANI |
|
||||||
|
* ,------|------|------| |------+------+------.
|
||||||
|
* | | | ---- | | VAI | | |
|
||||||
|
* | ---- | ---- |------| |------| HUI | HUID |
|
||||||
|
* | | | ---- | | VAD | | |
|
||||||
|
* `--------------------' `--------------------'
|
||||||
|
*/
|
||||||
|
[AUX] = KEYMAP(
|
||||||
|
// Left Hand
|
||||||
|
M(CF_EPRM), ____, ____, ____, ____, ____, KC_PWR,
|
||||||
|
____, ____, ____, ____, ____, ____, KC_SLEP,
|
||||||
|
____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, KC_WAKE,
|
||||||
|
____, ____, ____, ____, ____,
|
||||||
|
____, ____,
|
||||||
|
____,
|
||||||
|
____, ____, ____,
|
||||||
|
|
||||||
|
// Right Hand
|
||||||
|
KC_PWR, ____, ____, ____, ____, ____, M(CF_VERS),
|
||||||
|
KC_SLEP, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____, ____,
|
||||||
|
KC_WAKE, ____, ____, ____, ____, ____, ____,
|
||||||
|
____, ____, ____, ____, ____,
|
||||||
|
RGB_TOG, M(RGB_ANI),
|
||||||
|
RGB_VAI,
|
||||||
|
RGB_VAD, RGB_HUI, RGB_HUD),
|
||||||
|
};
|
||||||
|
|
||||||
|
void unredo(qk_tap_dance_state_t *state, void *user_data)
|
||||||
|
{
|
||||||
|
if (state->count > 1)
|
||||||
|
{
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_Y);
|
||||||
|
unregister_code(KC_Y);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_Z);
|
||||||
|
unregister_code(KC_Z);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
reset_tap_dance(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ccopy(qk_tap_dance_state_t *state, void *user_data)
|
||||||
|
{
|
||||||
|
if (state->count > 1)
|
||||||
|
{
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_X);
|
||||||
|
unregister_code(KC_X);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_C);
|
||||||
|
unregister_code(KC_C);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
reset_tap_dance(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
void findreplace(qk_tap_dance_state_t *state, void *user_data)
|
||||||
|
{
|
||||||
|
if (state->count > 1)
|
||||||
|
{
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_H);
|
||||||
|
unregister_code(KC_H);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_F);
|
||||||
|
unregister_code(KC_F);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
reset_tap_dance(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV),
|
||||||
|
[TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD),
|
||||||
|
[TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN),
|
||||||
|
[TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN),
|
||||||
|
[TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS),
|
||||||
|
[TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS),
|
||||||
|
[TD_COPY] = ACTION_TAP_DANCE_FN(ccopy),
|
||||||
|
[TD_UNDO] = ACTION_TAP_DANCE_FN(unredo),
|
||||||
|
[TD_FIND] = ACTION_TAP_DANCE_FN(findreplace)};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
|
{
|
||||||
|
case F_PASTE:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
register_code(KC_LCTL);
|
||||||
|
register_code(KC_V);
|
||||||
|
unregister_code(KC_V);
|
||||||
|
unregister_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGB_ANI:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
rgb_timer = timer_read();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (timer_elapsed(rgb_timer) > 300)
|
||||||
|
{
|
||||||
|
rgblight_mode(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rgblight_step();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case CF_EPRM:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case CF_VERS:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{}
|
||||||
|
*/
|
||||||
|
|
||||||
|
void tap(uint16_t code)
|
||||||
|
{
|
||||||
|
register_code(code);
|
||||||
|
unregister_code(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
LEADER_EXTERNS();
|
||||||
|
void matrix_scan_user(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
|
if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
|
||||||
|
((get_oneshot_mods() & MOD_BIT(KC_LSFT)) &&
|
||||||
|
!has_oneshot_mods_timed_out()))
|
||||||
|
{
|
||||||
|
ergodox_right_led_1_set(LED_BRIGHTNESS_HI);
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
}
|
||||||
|
else if (layer == RAISE || layer == AUX)
|
||||||
|
{
|
||||||
|
ergodox_right_led_1_set(LED_BRIGHTNESS_LO);
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ergodox_right_led_1_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyboard_report->mods & MOD_BIT(KC_LCTL) ||
|
||||||
|
((get_oneshot_mods() & MOD_BIT(KC_LCTL)) &&
|
||||||
|
!has_oneshot_mods_timed_out()))
|
||||||
|
{
|
||||||
|
ergodox_right_led_2_set(LED_BRIGHTNESS_HI);
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
}
|
||||||
|
else if (layer == LOWER || layer == AUX)
|
||||||
|
{
|
||||||
|
ergodox_right_led_2_set(LED_BRIGHTNESS_LO);
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ergodox_right_led_2_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
|
||||||
|
((get_oneshot_mods() & MOD_BIT(KC_LALT)) &&
|
||||||
|
!has_oneshot_mods_timed_out()))
|
||||||
|
{
|
||||||
|
ergodox_right_led_3_set(LED_BRIGHTNESS_HI);
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
}
|
||||||
|
else if (layer == COLE || layer == AUX)
|
||||||
|
{
|
||||||
|
ergodox_right_led_3_set(LED_BRIGHTNESS_LO);
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ergodox_right_led_3_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
LEADER_DICTIONARY()
|
||||||
|
{
|
||||||
|
leading = false;
|
||||||
|
leader_end();
|
||||||
|
|
||||||
|
SEQ_THREE_KEYS(KC_W, KC_I, KC_N) { os_type = OS_WIN; };
|
||||||
|
SEQ_THREE_KEYS(KC_O, KC_S, KC_X) { os_type = OS_OSX; };
|
||||||
|
SEQ_THREE_KEYS(KC_L, KC_I, KC_N) { os_type = OS_LIN; };
|
||||||
|
|
||||||
|
SEQ_ONE_KEY(KC_A)
|
||||||
|
{
|
||||||
|
switch (os_type)
|
||||||
|
{
|
||||||
|
case OS_WIN:
|
||||||
|
tap(KC_NLCK);
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_8);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_NLCK);
|
||||||
|
break;
|
||||||
|
case OS_OSX:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
register_code(KC_SCLN);
|
||||||
|
unregister_code(KC_SCLN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_A);
|
||||||
|
break;
|
||||||
|
case OS_LIN:
|
||||||
|
tap(KC_RALT);
|
||||||
|
tap(KC_DQT);
|
||||||
|
tap(KC_A);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_A, KC_A)
|
||||||
|
{
|
||||||
|
switch (os_type)
|
||||||
|
{
|
||||||
|
case OS_WIN:
|
||||||
|
tap(KC_NLCK);
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
tap(KC_KP_1);
|
||||||
|
tap(KC_KP_9);
|
||||||
|
tap(KC_KP_6);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_NLCK);
|
||||||
|
break;
|
||||||
|
case OS_OSX:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
register_code(KC_SCLN);
|
||||||
|
unregister_code(KC_SCLN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
register_code(KC_A);
|
||||||
|
unregister_code(KC_A);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
break;
|
||||||
|
case OS_LIN:
|
||||||
|
tap(KC_RALT);
|
||||||
|
tap(KC_DQT);
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
register_code(KC_A);
|
||||||
|
unregister_code(KC_A);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SEQ_ONE_KEY(KC_O)
|
||||||
|
{
|
||||||
|
switch (os_type)
|
||||||
|
{
|
||||||
|
case OS_WIN:
|
||||||
|
tap(KC_NLCK);
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_4);
|
||||||
|
tap(KC_KP_6);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_NLCK);
|
||||||
|
break;
|
||||||
|
case OS_OSX:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
register_code(KC_SCLN);
|
||||||
|
unregister_code(KC_SCLN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_O);
|
||||||
|
break;
|
||||||
|
case OS_LIN:
|
||||||
|
tap(KC_RALT);
|
||||||
|
tap(KC_DQT);
|
||||||
|
tap(KC_O);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_O, KC_O)
|
||||||
|
{
|
||||||
|
switch (os_type)
|
||||||
|
{
|
||||||
|
case OS_WIN:
|
||||||
|
tap(KC_NLCK);
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_1);
|
||||||
|
tap(KC_KP_4);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_NLCK);
|
||||||
|
break;
|
||||||
|
case OS_OSX:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
register_code(KC_SCLN);
|
||||||
|
unregister_code(KC_SCLN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(LSFT(KC_O));
|
||||||
|
break;
|
||||||
|
case OS_LIN:
|
||||||
|
tap(KC_RALT);
|
||||||
|
tap(KC_DQT);
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
register_code(KC_O);
|
||||||
|
unregister_code(KC_O);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SEQ_ONE_KEY(KC_U)
|
||||||
|
{
|
||||||
|
switch (os_type)
|
||||||
|
{
|
||||||
|
case OS_WIN:
|
||||||
|
tap(KC_NLCK);
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_5);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_NLCK);
|
||||||
|
break;
|
||||||
|
case OS_OSX:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
register_code(KC_SCLN);
|
||||||
|
unregister_code(KC_SCLN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_U);
|
||||||
|
break;
|
||||||
|
case OS_LIN:
|
||||||
|
tap(KC_RALT);
|
||||||
|
tap(KC_DQT);
|
||||||
|
tap(KC_U);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SEQ_TWO_KEYS(KC_U, KC_U)
|
||||||
|
{
|
||||||
|
switch (os_type)
|
||||||
|
{
|
||||||
|
case OS_WIN:
|
||||||
|
tap(KC_NLCK);
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_NLCK);
|
||||||
|
break;
|
||||||
|
case OS_OSX:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
register_code(KC_SCLN);
|
||||||
|
unregister_code(KC_SCLN);
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(LSFT(KC_U));
|
||||||
|
break;
|
||||||
|
case OS_LIN:
|
||||||
|
tap(KC_RALT);
|
||||||
|
tap(KC_DQT);
|
||||||
|
register_code(KC_LSFT);
|
||||||
|
register_code(KC_U);
|
||||||
|
unregister_code(KC_U);
|
||||||
|
unregister_code(KC_LSFT);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SEQ_ONE_KEY(KC_S)
|
||||||
|
{
|
||||||
|
switch (os_type)
|
||||||
|
{
|
||||||
|
case OS_WIN:
|
||||||
|
tap(KC_NLCK);
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_KP_0);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_2);
|
||||||
|
tap(KC_KP_3);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
tap(KC_NLCK);
|
||||||
|
break;
|
||||||
|
case OS_OSX:
|
||||||
|
register_code(KC_RALT);
|
||||||
|
tap(KC_S);
|
||||||
|
unregister_code(KC_RALT);
|
||||||
|
break;
|
||||||
|
case OS_LIN:
|
||||||
|
tap(KC_RALT);
|
||||||
|
tap(KC_S);
|
||||||
|
tap(KC_S);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
ergodox_led_all_on();
|
||||||
|
rgblight_init();
|
||||||
|
rgblight_enable();
|
||||||
|
rgblight_setrgb(255, 0, 0);
|
||||||
|
for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--)
|
||||||
|
{
|
||||||
|
ergodox_led_all_set(i);
|
||||||
|
wait_ms(5);
|
||||||
|
}
|
||||||
|
rgblight_setrgb(255, 255, 0);
|
||||||
|
wait_ms(1000);
|
||||||
|
for (int i = LED_BRIGHTNESS_LO; i > 0; i--)
|
||||||
|
{
|
||||||
|
ergodox_led_all_set(i);
|
||||||
|
wait_ms(10);
|
||||||
|
}
|
||||||
|
rgblight_setrgb(0, 255, 255);
|
||||||
|
ergodox_led_all_off();
|
||||||
|
wait_ms(1000);
|
||||||
|
|
||||||
|
rgblight_effect_knight(50);
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
BOOTMAGIC_ENABLE=no
|
||||||
|
COMMAND_ENABLE=no
|
||||||
|
SLEEP_LED_ENABLE=no
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
FORCE_NKRO = no
|
||||||
|
DEBUG_ENABLE = no
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
KEYLOGGER_ENABLE = no
|
||||||
|
UCIS_ENABLE = no
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
AUTOLOG_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
RGBLIGHT_ANIMATION = yes
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
|
||||||
|
OPT_DEFS += -DUSER_PRINT
|
||||||
|
|
||||||
|
KEYMAP_VERSION = $(shell \
|
||||||
|
if [ -d "${KEYMAP_PATH}/.git" ]; then \
|
||||||
|
cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \
|
||||||
|
else echo QMK; fi)
|
||||||
|
|
||||||
|
KEYMAP_BRANCH = $(shell \
|
||||||
|
if [ -d "${KEYMAP_PATH}/.git" ]; then \
|
||||||
|
cd "${KEYMAP_PATH}"; \
|
||||||
|
fi; \
|
||||||
|
git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||||
|
|
||||||
|
OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\"
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,60 @@
|
|||||||
|
#include "frosty_flake.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#include "audio.h"
|
||||||
|
#endif
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
enum QFR_layers {
|
||||||
|
_COLEMAK,
|
||||||
|
_LOWER,
|
||||||
|
_MOUSE
|
||||||
|
};
|
||||||
|
|
||||||
|
enum QFR_keycodes {
|
||||||
|
COLEMAK = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
MOUSE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5
|
||||||
|
[0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
|
||||||
|
[1] = ACTION_LAYER_TAP_TOGGLE(_LOWER), //Hold for momentary Mouse, Tap for toggle Mouse
|
||||||
|
[2] = ACTION_LAYER_TAP_TOGGLE(_MOUSE), //Hold for momentary Lower, Tap for toggle Lower
|
||||||
|
};
|
||||||
|
#define SPC_LW FUNC(0)
|
||||||
|
#define LWR FUNC(1)
|
||||||
|
#define MSE FUNC(2)
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_COLEMAK] = KEYMAP_TKL(\
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
|
||||||
|
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT , \
|
||||||
|
KC_LSPO,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \
|
||||||
|
KC_LCTL,KC_LGUI, KC_LALT, SPC_LW, MSE, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = KEYMAP_TKL(\
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_BSPC, _______,_______,_______, \
|
||||||
|
KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, _______,_______,_______, \
|
||||||
|
KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, _______, _______, \
|
||||||
|
_______,XXXXXXX,_______,_______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, KC_RALT, _______, _______, _______, _______,_______,_______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MOUSE] = KEYMAP_TKL(\
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, _______,_______,_______, \
|
||||||
|
KC_TAB, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, _______,_______,_______, \
|
||||||
|
KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \
|
||||||
|
_______,XXXXXXX,KC_Z,KC_X, KC_C, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, KC_ACL2, MSE, _______, _______, _______, _______,_______,_______ \
|
||||||
|
)
|
||||||
|
};
|
@ -0,0 +1,73 @@
|
|||||||
|
# TKL keymap for frosty_flake
|
||||||
|
|
||||||
|
##Layers
|
||||||
|
|
||||||
|
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||||
|
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
|
||||||
|
'----' '-------------------' '-------------------' '-------------------' '--------------'
|
||||||
|
,-------------------------------------------------------------------------. ,--------------.
|
||||||
|
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bspc | | Ins|Home|PgUp|
|
||||||
|
|-------------------------------------------------------------------------| |--------------|
|
||||||
|
| Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | | Del|End |PgDn|
|
||||||
|
|-------------------------------------------------------------------------| '--------------'
|
||||||
|
| Bspc | A | R | S | T | D | H | N | E | I | O | ' | Enter |
|
||||||
|
|-------------------------------------------------------------------------| ,----.
|
||||||
|
| LSPO | Z | X | C | V | B | K | M | , | . | / | RSPC | | Up |
|
||||||
|
|-------------------------------------------------------------------------| ,--------------.
|
||||||
|
|Ctrl|LGUI|LAlt| Space/Lower |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||||
|
'-------------------------------------------------------------------------' '--------------'
|
||||||
|
|
||||||
|
### Base Layer - Colemak
|
||||||
|
* The base layout is Colemak.
|
||||||
|
* I've implemented COLEMAK = SAFE_RANGE when enumerating the custom_keycodes, but I don't actually know what this does...
|
||||||
|
|
||||||
|
* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
|
||||||
|
|
||||||
|
#### Layer Shifting
|
||||||
|
* The spacebar is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
|
||||||
|
* The Right hand ALT key is a **TAP_TOGGLE** macro for the *MOUSE* layer (RAlt is accessible through LOWER, if you want...)
|
||||||
|
|
||||||
|
### LOWER
|
||||||
|
|
||||||
|
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||||
|
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
|
||||||
|
'----' '-------------------' '-------------------' '-------------------' '--------------'
|
||||||
|
,-------------------------------------------------------------------------. ,--------------.
|
||||||
|
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | Bspc | | Ins|Home|PgUp|
|
||||||
|
|-------------------------------------------------------------------------| |--------------|
|
||||||
|
| Tab |PgUp|Home| Up | End| | | | | | | { | } | | | | Del|End |PgDn|
|
||||||
|
|-------------------------------------------------------------------------| '--------------'
|
||||||
|
| Bckspc|PgDn|Left|Down|Rght| | | | | | | ' | Enter |
|
||||||
|
|-------------------------------------------------------------------------| ,----.
|
||||||
|
| LSPO | Z | X | C | V | | | | , | . | / | RSPC | | Up |
|
||||||
|
|-------------------------------------------------------------------------| ,--------------.
|
||||||
|
|Ctrl|LGUI|LAlt| |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||||
|
'-------------------------------------------------------------------------' '--------------'
|
||||||
|
|
||||||
|
* The *LOWER* layer contains a navigation cluster on the left hand. This layer is momentary when the spacebar or LOWER (RAlt) key is held and toggled on/off when the LOWER key is tapped.
|
||||||
|
|
||||||
|
* The Navigation cluster is offset to the right compared to the traditional **WASD** nav cluster. With this implementation, you don't need to move your hand from the home position when navigating. Page Up & Down keys are found on the far left of the cluster.
|
||||||
|
|
||||||
|
* All unused (blank on the above keymap) keys are locked out using the XXXXXXX filler (KC_NO), all modifiers (edge |_| keys \[except 0, \. & Fn\] on the above keymap) and the ZXCV cluster are transparent (_______) to the Base layer.
|
||||||
|
|
||||||
|
### MOUSE
|
||||||
|
|
||||||
|
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||||
|
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |PrSc|ScLk|PsBk|
|
||||||
|
'----' '-------------------' '-------------------' '-------------------' '--------------'
|
||||||
|
,-------------------------------------------------------------------------. ,--------------.
|
||||||
|
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Del | | Ins|Home|PgUp|
|
||||||
|
|-------------------------------------------------------------------------| |--------------|
|
||||||
|
| Tab | WhU| WhL| MsU| WhR| | | M3 | M4 | M5 | | [ | ] | \ | | Del|End |PgDn|
|
||||||
|
|-------------------------------------------------------------------------| '--------------'
|
||||||
|
| BSPC | WhD| MsL| MsD| MsR| | |LClk |RClk | | | ' | Enter |
|
||||||
|
|-------------------------------------------------------------------------| ,----.
|
||||||
|
| LSPO | Z | X | C | V | | | | , | . | / | RSPC | | Up |
|
||||||
|
|-------------------------------------------------------------------------| ,--------------.
|
||||||
|
|Ctrl|LGUI|LAlt| Accel ++ |MSE |RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||||
|
'-------------------------------------------------------------------------' '--------------'
|
||||||
|
|
||||||
|
* The *MOUSE* layer contains keys replicating functions found on the mouse.
|
||||||
|
* The navigation cluster (Up, Down, Left, Right) is a replication of the Navigation cluster on the *LOWER* layer. The scroll keys are analagous to the Page Up & Down keys.
|
||||||
|
* The primary click (right & left) buttons are on the right home row (index & middle fingers)
|
||||||
|
* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
|
@ -0,0 +1,17 @@
|
|||||||
|
# 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 = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # 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 = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
@ -0,0 +1,66 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER James Taylor
|
||||||
|
#define PRODUCT Space Odyssey
|
||||||
|
#define DESCRIPTION Keyboard
|
||||||
|
|
||||||
|
#define CATERINA_BOOTLOADER
|
||||||
|
|
||||||
|
#define MOUSEKEY_INTERVAL 16
|
||||||
|
#define MOUSEKEY_DELAY 0
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
|
#define MOUSEKEY_MAX_SPEED 7
|
||||||
|
#define MOUSEKEY_WHEEL_DELAY 0
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 6
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3 }
|
||||||
|
#define MATRIX_COL_PINS { B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
#ifdef BACKLIGHT_PIN
|
||||||
|
#define BACKLIGHT_LEVELS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* prevent stuck modifiers */
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 0
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,237 @@
|
|||||||
|
/* Keymap for Space Oddity Keyboard
|
||||||
|
Copyright (C) 2017 James Taylor
|
||||||
|
|
||||||
|
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 3 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "space_oddity.h"
|
||||||
|
|
||||||
|
// Planck keycodes needed for dynamic macros.
|
||||||
|
enum planck_keycodes {
|
||||||
|
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
DYNAMIC_MACRO_RANGE,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Tap Dance initializer.
|
||||||
|
enum {
|
||||||
|
|
||||||
|
SFT_CAPS = 0,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "dynamic_macro.h"
|
||||||
|
|
||||||
|
#define MOUSE_LAYER 2
|
||||||
|
|
||||||
|
// Toggle MOUSE_LAYER. Additional layers can be added for additional layouts or other special functions.
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
|
||||||
|
[2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Tap dance actions - double tap for Caps Lock.
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
|
||||||
|
[SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6.
|
||||||
|
|
||||||
|
___________________________________________________________________________________
|
||||||
|
| | | | | | Dynamic | Dynamic |
|
||||||
|
| Macro 0 | Macro 1 | Macro 2 | Macro 3 | Macro 4 | Macro 1 | Macro 2 |
|
||||||
|
|___________|___________|___________|___________|___________|___________|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| TAB | Q | W | E | R | T | Y | U | I | O | P | - |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
|ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)|
|
||||||
|
|_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
|
||||||
|
| | | | | | | ALT | HYP | LT 1| LT 2|
|
||||||
|
| M2 | M1 | GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)|
|
||||||
|
|_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
|
||||||
|
*/
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
|
||||||
|
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT),
|
||||||
|
MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTRL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN)),
|
||||||
|
|
||||||
|
/* Function layer.
|
||||||
|
Blank keys correspond to the KC_TRNS keycode.
|
||||||
|
|
||||||
|
___________________________________________________________________________________
|
||||||
|
| | | | | | DYN REC | DYN REC |
|
||||||
|
| Macro 7 | | | | | 1 | 2 |
|
||||||
|
|___________|___________|___________|___________|___________|___________|___________|
|
||||||
|
| DYN REC | | | | | | | | | | | |
|
||||||
|
| STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | |
|
||||||
|
|_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
|
||||||
|
| | | | | | | | | | |
|
||||||
|
| | | | | | | | | | |
|
||||||
|
|_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2,
|
||||||
|
DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL,
|
||||||
|
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL,
|
||||||
|
KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE,
|
||||||
|
KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
/* Mouse layer.
|
||||||
|
|
||||||
|
___________________________________________________________________________________
|
||||||
|
| | | | | | | |
|
||||||
|
| | | | | | | |
|
||||||
|
|___________|___________|___________|___________|___________|___________|___________|
|
||||||
|
| | | | MS | | | | | | | | |
|
||||||
|
| | | | UP | | | | | | | | |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | MS | MS | MS | | | | | | | |
|
||||||
|
| | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
|
||||||
|
| | | | | | | | | | | | |
|
||||||
|
| |RESET| | | | | | | | | | |
|
||||||
|
|_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
|
||||||
|
| | | | | | | | | | |
|
||||||
|
| | | | | | | | | | F(2)|
|
||||||
|
|_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(2))
|
||||||
|
};
|
||||||
|
|
||||||
|
// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of
|
||||||
|
// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way,
|
||||||
|
// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for
|
||||||
|
// LaTeX editing.
|
||||||
|
//
|
||||||
|
// Customize to your heart's content!
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("()"SS_TAP(X_LEFT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("[]"SS_TAP(X_LEFT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("{}"SS_TAP(X_LEFT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Probably something only Lisp users will appreciate...
|
||||||
|
case 7:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return MACRO_NONE;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
if (!process_record_dynamic_macro(keycode, record)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_KANA)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
Space Oddity Keyboard
|
||||||
|
=====================
|
||||||
|
|
||||||
|
This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro.
|
||||||
|
|
||||||
|
As originally designed, the top row consists of 2u keys which are used for user-defined macros. The keys for Shift and Enter are 1.75u.
|
||||||
|
|
||||||
|
Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section.
|
||||||
|
|
||||||
|
A picture of the finished product can be found here: https://imgur.com/dE9Y4XK
|
||||||
|
|
||||||
|
## Pinout
|
||||||
|
|
||||||
|
The following pins are used:
|
||||||
|
- Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3
|
||||||
|
- Rows 1-6: F4, F5, F6, F7, B1, B3
|
||||||
|
|
||||||
|
## Compiling and loading the firmware
|
||||||
|
|
||||||
|
To build the firmware, run `make handwired/space_oddity` from the toplevel directory.
|
||||||
|
|
||||||
|
On GNU/Linux, you can flash the default layout onto the microcontroller by using `avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex`. Note that the device name under `/dev` may be different.
|
||||||
|
|
||||||
|
|
||||||
|
This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome!
|
@ -0,0 +1,57 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE ?= yes # 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
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE ?= yes # USB 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
|
||||||
|
AUDIO_ENABLE ?= no
|
||||||
|
RGBLIGHT_ENABLE ?= no
|
||||||
|
TAP_DANCE_ENABLE = yes
|
@ -0,0 +1 @@
|
|||||||
|
#include "space_oddity.h"
|
@ -0,0 +1,22 @@
|
|||||||
|
#ifndef KB_H
|
||||||
|
#define KB_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
K000, K002, K004, K006, K008, K010, K011, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
|
||||||
|
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, \
|
||||||
|
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, \
|
||||||
|
K500, K501, K502, K503, K505, K507, K508, K509, K510, K511 \
|
||||||
|
) { \
|
||||||
|
{ K000, KC_NO, K002, KC_NO, K004, KC_NO, K006, KC_NO, K008, KC_NO, K010, K011 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
|
||||||
|
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \
|
||||||
|
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \
|
||||||
|
{ K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
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
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
// #define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
#define EE_HANDS
|
||||||
|
|
||||||
|
#define ONESHOT_TAP_TOGGLE 2
|
||||||
|
#define ONESHOT_TIMEOUT 1000
|
||||||
|
|
||||||
|
#undef LEADER_TIMEOUT
|
||||||
|
#define LEADER_TIMEOUT 1000
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
#undef TAPPING_TOGGLE
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
#ifdef SUBPROJECT_rev1
|
||||||
|
#include "../../rev1/config.h"
|
||||||
|
#endif
|
||||||
|
#ifdef SUBPROJECT_rev2
|
||||||
|
#include "../../rev2/config.h"
|
||||||
|
#endif
|
||||||
|
#ifdef SUBPROJECT_rev2fliphalf
|
||||||
|
#include "../../rev2fliphalf/config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,183 @@
|
|||||||
|
#include "lets_split.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "action_util.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
#define _COLE 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _AUX 16
|
||||||
|
|
||||||
|
/* Layers */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
COLE = 0,
|
||||||
|
LOWER, // right hand 10 key.
|
||||||
|
RAISE, // left hand Fn, right hand symbols.
|
||||||
|
AUX,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Tap Dancery */
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TD_BTK,
|
||||||
|
TD_TDE,
|
||||||
|
TD_LPRN,
|
||||||
|
TD_RPRN,
|
||||||
|
TD_MIN,
|
||||||
|
TD_USC,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool time_travel = false;
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define ____ KC_TRNS
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ' " `| Q | W | F | P | G | J | L | U | Y | = + | ~ ; :|
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ( [ {| A | R | S | T | D | H | N | E | I | O | ) ] }|
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | - , <| Z | X | C | V | B | K | M | ? | | | ^ | _ . >|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |Lower |Raise | Ctrl | Alt | Bksp | Spc |Enter |LShft | ESC | < | v | > |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLE] = KEYMAP(
|
||||||
|
TD(TD_BTK), KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_EQL, TD(TD_TDE),
|
||||||
|
TD(TD_LPRN), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, TD(TD_RPRN),
|
||||||
|
TD(TD_MIN), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_SLSH, KC_BSLS, KC_UP, TD(TD_USC),
|
||||||
|
LOWER, RAISE, OSM(MOD_LCTL), OSM(MOD_LALT), KC_SPC, KC_BSPC, KC_ENT, OSM(MOD_LSFT), KC_ESC, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | 7 | 8 | 9 | * | / | ^ |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | 4 | 5 | 6 | + | - | ---- |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | 1 | 2 | 3 | = | ---- | ---- |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ---- | ---- | ---- | ---- | ---- | ---- | ---- | 0 | . | ---- | ---- | ---- |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = KEYMAP(
|
||||||
|
____, ____, ____, ____, ____, ____, KC_7, KC_8, KC_9, KC_PAST, KC_PSLS, KC_CIRC,
|
||||||
|
____, ____, ____, ____, ____, ____, KC_4, KC_5, KC_6, KC_PPLS, KC_PMNS, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, KC_1, KC_2, KC_3, KC_PEQL, ____, ____,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, KC_0, KC_MNXT, ____, ____, ____),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | F1 | F2 | F3 | F4 | F5 | F6 | ! | @ | # | $ | % | ` ~ |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | F7 | F8 | F9 | F10 | F11 | F12 | ^ | & | * | ( | ) | - _ |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | ____ | ____ | ____ | ____ | ____ | ____ | [ { | ] } | \ | | ; : | ' " | = + |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | , < | . > | / ? |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = KEYMAP(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_GRV,
|
||||||
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS,
|
||||||
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_EQL,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, KC_COMM, KC_DOT, KC_SLSH),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Reset| ____ | ____ | ____ | ____ | ____ | ____ | LOCK | ____ | ____ | ____ | VUP |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | ____ | ____ | RUN | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | VDWN |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | PGUP | MUTE |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | ____ | HOME | PGDN | END |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_AUX] = KEYMAP(
|
||||||
|
RESET, ____, ____, ____, ____, ____, ____, LGUI(KC_L), ____, ____, ____, KC_VOLU,
|
||||||
|
____, ____, LGUI(KC_R), ____, ____, ____, ____, ____, ____, ____, ____, KC_VOLD,
|
||||||
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, KC_PGUP, KC_MUTE,
|
||||||
|
____, ____, ____, ____, KC_TAB, KC_DEL, ____, ____, ____, KC_HOME, KC_PGDOWN, KC_END)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_BTK] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_GRV),
|
||||||
|
[TD_TDE] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_TILD),
|
||||||
|
[TD_LPRN] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LPRN),
|
||||||
|
[TD_RPRN] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RPRN),
|
||||||
|
[TD_MIN] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_MINS),
|
||||||
|
[TD_USC] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_UNDS)};
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer)
|
||||||
|
{
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_scan_user(void){};
|
||||||
|
|
||||||
|
void matrix_init_user(void){};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||||
|
{
|
||||||
|
switch (keycode)
|
||||||
|
{
|
||||||
|
case COLE:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
persistent_default_layer_set(1UL << _COLE);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _AUX);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _AUX);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _AUX);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _AUX);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case AUX:
|
||||||
|
if (record->event.pressed)
|
||||||
|
{
|
||||||
|
layer_on(_AUX);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
layer_off(_AUX);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
# 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
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||||
|
ONEHAND_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
@ -0,0 +1,91 @@
|
|||||||
|
# Pittyolo's Let's Split Layout
|
||||||
|
|
||||||
|
This is my Let's Split layout, modified for my ISO Hungarian taste :)
|
||||||
|
|
||||||
|
Added some layer feedback in the underglow, but it's still a WIP.
|
||||||
|
|
||||||
|
I wrote the keys that will appear when using Hungarian layout in Windows and the respective English keys in brackets.
|
||||||
|
|
||||||
|
|
||||||
|
### Qwerty
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") |
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
|Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift|
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
Tap left shift writes the missing ISO key, hold is Shift.
|
||||||
|
|
||||||
|
|
||||||
|
### Gaming mode (Toggle layer)
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| | | | | | | | | | | |Lower |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| | | | | F | | | | | | | |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| Shift| | | | | | | | | | |QWERTY|
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| | | | | | | | | Left | Down | Up | Right|
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
Disabled some of the functions in the main layer to help with better gaming experience.
|
||||||
|
|
||||||
|
|
||||||
|
### Lower (Hold down right Space)
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 |
|
||||||
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
| | | | | | | | | Ins | Home | PgUp | Shift|
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| | | | | | | | | Del | End | PgDn | AltGr|
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
Function layer with everything that is missing from the main layer.
|
||||||
|
|
||||||
|
|
||||||
|
### NAV (double tap toggles the layer, and hold for momentary switch)
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
| | | Up | | F2 | | | 7 | 8 | 9 | / | |
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| | Left | Down | Right| | | | 4 | 5 | 6 | * | |
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| Shift| | | | | | | 1 | 2 | 3 | - | |
|
||||||
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
| | | | | | | | 0 | . | = | + | |
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
Navigation layer with a numpad on the right side.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Vim Movement (Hold down F)
|
||||||
|
```
|
||||||
|
,-----------------------------------------------------------------------------------.
|
||||||
|
|RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
|DM_stp| | | LCTRL| | | Left | Down | Up | Right| | |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
|DM_REC| | | | | | | | | | | |
|
||||||
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
| | | | | LShft| | | | | | | RESET|
|
||||||
|
`-----------------------------------------------------------------------------------'
|
||||||
|
```
|
||||||
|
|
||||||
|
Turns hjkl into vim movement. I moved accented Hungarian letters here.
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
// #define USE_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define _MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 2
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,171 @@
|
|||||||
|
#include "lets_split.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
//Following line allows macro to read current RGB settings
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _GAME 1
|
||||||
|
#define _LOWER 2
|
||||||
|
#define _NAV 3
|
||||||
|
#define _VIM 4
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
GAME,
|
||||||
|
LOWER,
|
||||||
|
NAV,
|
||||||
|
VIM,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Z(Y)| U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D |LTVIMF| G | H | J | K | L | É(;)| Á(") |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* |Í/Shft| Y(Z) | X | C | V | B | N | M | , | . | -(/)| Shift|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | GUI | Alt |ADJUST| Spc | LOWER| Bksp | Ent | Alt | =(&) | GAME | Del |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = KEYMAP( \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||||
|
MT(MOD_LSFT, KC_NUBS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, TT(_NAV), KC_SPC, LT(_LOWER, KC_SPC), KC_BSPC, KC_ENT, KC_RALT, KC_AMPERSAND, TG(_GAME), KC_DEL \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Gaming mode
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | |Lower |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | F | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| | | | | | | | | | |QWERTY|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | Left | Down | Up | Right|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_GAME] = KEYMAP( \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OSL(_LOWER), \
|
||||||
|
_______, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_QWERTY), \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | 0(') | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö(0) | Ü(-) |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | F10 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F11 | F12 |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | Ins | Home | PgUp | Shift|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | Del | End | PgDn | AltGr|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = KEYMAP( \
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \
|
||||||
|
KC_F10, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F11, KC_F12, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_RSFT, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_RALT \
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
/* NAV
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | Up | | F2 | | | 7 | 8 | 9 | / | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | Left | Down | Right| | | | 4 | 5 | 6 | * | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| | | | | | | 1 | 2 | 3 | - | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | 0 | . | = | + | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NAV] = KEYMAP( \
|
||||||
|
_______, _______, KC_UP, _______, KC_F2, _______, _______, KC_7, KC_8, KC_9, KC_KP_SLASH, _______, \
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_4, KC_5, KC_6, KC_KP_ASTERISK, _______, \
|
||||||
|
KC_LSFT, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_KP_MINUS, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_KP_DOT, KC_KP_EQUAL, KC_KP_PLUS, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Vim Movement (Hold down F)
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* |RGBMOD|RGBTOG| | | | | | Ú | Í | Ó | Ő | Ű |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |DM_stp| | | LCTRL| | | Left | Down | Up | Right| | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* |DM_REC| | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | LShft| | | | | | | RESET|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_VIM] = KEYMAP( \
|
||||||
|
RGB_MOD, RGB_TOG, _______, _______, _______, _______, _______, KC_RBRC, KC_NUBS, KC_EQL , KC_LBRC, KC_NUHS, \
|
||||||
|
_______, _______, _______, KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, RESET \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// define variables for reactive RGB
|
||||||
|
bool RGB_INIT = false;
|
||||||
|
bool TOG_STATUS = false;
|
||||||
|
int RGB_current_mode;
|
||||||
|
|
||||||
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint8_t layer = biton32(layer_state);
|
||||||
|
switch (layer) {
|
||||||
|
case _NAV:
|
||||||
|
if (RGB_INIT) {} else {
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
RGB_INIT = true;
|
||||||
|
}
|
||||||
|
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||||
|
} else {
|
||||||
|
TOG_STATUS = !TOG_STATUS;
|
||||||
|
rgblight_mode(29);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
if (RGB_INIT) {} else {
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
RGB_INIT = true;
|
||||||
|
}
|
||||||
|
if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false
|
||||||
|
} else {
|
||||||
|
TOG_STATUS = !TOG_STATUS;
|
||||||
|
rgblight_mode(29);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _QWERTY:
|
||||||
|
if (RGB_INIT) {} else {
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
RGB_INIT = true;
|
||||||
|
}
|
||||||
|
rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change
|
||||||
|
TOG_STATUS = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue