Compare commits
29 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0603dcb1be | ||
|
3313473004 | ||
|
3f1d147529 | ||
|
eba4b08a4a | ||
|
7d9dc61504 | ||
|
566399794a | ||
|
2bdf1731c3 | ||
|
955b17189a | ||
|
3d7e9425c7 | ||
|
483e3cd1cb | ||
|
821b492667 | ||
|
bd1ad405bf | ||
|
03df19d3f6 | ||
|
42e85d2b92 | ||
|
d27d854913 | ||
|
bec8d58ad8 | ||
|
6c473c5f38 | ||
|
aadb386de6 | ||
|
b688c2c0b3 | ||
|
7b80aea8b2 | ||
|
586aa15cef | ||
|
48e11240a6 | ||
|
75354f12d7 | ||
|
6a4e08938e | ||
|
08e48eb6f5 | ||
|
12c8ee956d | ||
|
b36b4382d0 | ||
|
e87c39d302 | ||
|
e5c331e7be |
@@ -3,9 +3,16 @@
|
||||
* [Install Build Tools](getting_started_build_tools.md)
|
||||
* Alternative: [Vagrant Guide](getting_started_vagrant.md)
|
||||
* [Build/Compile Instructions](getting_started_make_guide.md)
|
||||
* [Flashing Instructions](flashing.md)
|
||||
* [Flashing Firmware](flashing.md)
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [How to Use Github](getting_started_github.md)
|
||||
* [Getting Help](getting_started_getting_help.md)
|
||||
|
||||
* [Complete Newbs Guide](newbs.md)
|
||||
* [Getting Started](newbs_getting_started.md)
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
|
||||
* [FAQ](faq.md)
|
||||
* [General FAQ](faq_general.md)
|
||||
@@ -25,6 +32,7 @@
|
||||
* [Auto Shift](feature_auto_shift.md)
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Command](feature_command.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
* [Grave Escape](feature_grave_esc.md)
|
||||
* [Key Lock](feature_key_lock.md)
|
||||
@@ -37,6 +45,7 @@
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Swap Hands](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
* [Terminal](feature_terminal.md)
|
||||
* [Thermal Printer](feature_thermal_printer.md)
|
||||
@@ -64,7 +73,7 @@
|
||||
* [Customizing Functionality](custom_quantum_functions.md)
|
||||
* [Documentation Best Practices](documentation_best_practices.md)
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Glossary](glossary.md)
|
||||
* [Glossary](reference_glossary.md)
|
||||
* [Keymap Overview](keymap.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
|
||||
|
@@ -98,10 +98,10 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
|
||||
* `USB_LED_COMPOSE`
|
||||
* `USB_LED_KANA`
|
||||
|
||||
### Example `led_set_kb()` Implementation
|
||||
### Example `led_set_user()` Implementation
|
||||
|
||||
```
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||
PORTB |= (1<<0);
|
||||
} else {
|
||||
@@ -139,14 +139,13 @@ void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i²c controllers you will need to set up that hardware before it can be used.
|
||||
|
||||
### Example `matrix_init_kb()` Implementation
|
||||
### Example `matrix_init_user()` Implementation
|
||||
|
||||
This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
|
||||
|
||||
```
|
||||
void matrix_init_kb(void) {
|
||||
void matrix_init_user(void) {
|
||||
// Call the keymap level matrix init.
|
||||
matrix_init_user();
|
||||
|
||||
// Set our LED pins as output
|
||||
DDRB |= (1<<1);
|
||||
@@ -176,3 +175,41 @@ This example has been deliberately omitted. You should understand enough about Q
|
||||
This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
|
||||
|
||||
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
|
||||
|
||||
|
||||
# Layer Change Code
|
||||
|
||||
Thir runs code every time that the layers get changed. This can be useful for layer indication, or custom layer handling.
|
||||
|
||||
### Example `layer_state_set_*` Implementation
|
||||
|
||||
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example
|
||||
|
||||
```
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
switch (biton32(state)) {
|
||||
case _RAISE:
|
||||
rgblight_setrgb (0x00, 0x00, 0xFF);
|
||||
break;
|
||||
case _LOWER:
|
||||
rgblight_setrgb (0xFF, 0x00, 0x00);
|
||||
break;
|
||||
case _PLOVER:
|
||||
rgblight_setrgb (0x00, 0xFF, 0x00);
|
||||
break;
|
||||
case _ADJUST:
|
||||
rgblight_setrgb (0x7A, 0x00, 0xFF);
|
||||
break;
|
||||
default: // for any other layers, or the default layer
|
||||
rgblight_setrgb (0x00, 0xFF, 0xFF);
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
```
|
||||
### `matrix_init_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)`
|
||||
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
|
||||
|
||||
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
|
||||
|
@@ -14,6 +14,15 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI
|
||||
<!-- Source for this image: http://www.keyboard-layout-editor.com/#/gists/9ce023dc6caadc0cf11c88c782350a8c -->
|
||||

|
||||
|
||||
## Some Of My Keys Are Swapped Or Not Working
|
||||
|
||||
QMK has two features, Bootmagic and Command, which allow you to change the behavior of your keyboard on the fly. This includes, but is not limited to, swapping Ctrl/Caps, disabling Gui, swapping Alt/Gui, swapping Backspace/Backslash, disabling all keys, and other behavioral modifications.
|
||||
|
||||
As a quick fix try holding down `Space`+`Backspace` while you plug in your keyboard. This will reset the stored settings on your keyboard, returning those keys to normal operation. If that doesn't work look here:
|
||||
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Command](feature_command.md)
|
||||
|
||||
## The Menu Key Isn't Working
|
||||
|
||||
The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key.
|
||||
@@ -22,13 +31,13 @@ The key found on most modern keyboards that is located between `KC_RGUI` and `KC
|
||||
Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'.
|
||||
|
||||
See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and
|
||||
- http://en.wikipedia.org/wiki/Magic_SysRq_key
|
||||
- http://en.wikipedia.org/wiki/System_request
|
||||
* http://en.wikipedia.org/wiki/Magic_SysRq_key
|
||||
* http://en.wikipedia.org/wiki/System_request
|
||||
|
||||
## Power Key Doesn't Work
|
||||
Use `KC_PWR` instead of `KC_POWER` or vice versa.
|
||||
- `KC_PWR` works with Windows and Linux, not with OSX.
|
||||
- `KC_POWER` works with OSX and Linux, not with Windows.
|
||||
* `KC_PWR` works with Windows and Linux, not with OSX.
|
||||
* `KC_POWER` works with OSX and Linux, not with Windows.
|
||||
|
||||
More info: http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
|
||||
|
||||
@@ -40,9 +49,9 @@ https://github.com/tmk/tmk_keyboard/issues/67
|
||||
Modifier keys or layers can be stuck unless layer switching is configured properly.
|
||||
For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event.
|
||||
|
||||
- https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
|
||||
- http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
|
||||
- https://github.com/tmk/tmk_keyboard/issues/248
|
||||
* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
|
||||
* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
|
||||
* https://github.com/tmk/tmk_keyboard/issues/248
|
||||
|
||||
|
||||
## Mechanical Lock Switch Support
|
||||
@@ -66,17 +75,17 @@ See this post for example **MACRO** code.
|
||||
http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
|
||||
|
||||
On **Windows** you can use `AltGr` key or **Alt code**.
|
||||
- http://en.wikipedia.org/wiki/AltGr_key
|
||||
- http://en.wikipedia.org/wiki/Alt_code
|
||||
* http://en.wikipedia.org/wiki/AltGr_key
|
||||
* http://en.wikipedia.org/wiki/Alt_code
|
||||
|
||||
On **Mac** OS defines `Option` key combinations.
|
||||
- http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
|
||||
* http://en.wikipedia.org/wiki/Option_key#Alternative_keyboard_input
|
||||
|
||||
On **Xorg** you can use `compose` key, instead.
|
||||
- http://en.wikipedia.org/wiki/Compose_key
|
||||
* http://en.wikipedia.org/wiki/Compose_key
|
||||
|
||||
And see this for **Unicode** input.
|
||||
- http://en.wikipedia.org/wiki/Unicode_input
|
||||
* http://en.wikipedia.org/wiki/Unicode_input
|
||||
|
||||
|
||||
## Apple/Mac Keyboard `Fn`
|
||||
|
@@ -1,64 +1,89 @@
|
||||
# Bootmagic
|
||||
# Bootmagic and Magic Keycodes
|
||||
|
||||
<!-- FIXME: Describe the bootmagic feature here. -->
|
||||
There are 3 separate but related features that allow you to change the behavior of your keyboard without reflashing. While each of them have similar functionality you access that functionality in different ways depending on how your keyboard is configured.
|
||||
|
||||
## Bootmagic Keycodes
|
||||
Bootmagic is a system for configuring your keyboard while it initializes. To trigger a Bootmagic command you hold down the bootmagic key (`KC_SPACE` on most keyboards) and one or more command keys.
|
||||
|
||||
Shortcuts for bootmagic options. You can use these even when bootmagic is off.
|
||||
Bootmagic Keycodes allow you to access the Bootmagic functionality after your keyboard has initialized. To use Bootmagic Keycodes you assign keycodes starting with `MAGIC_`, much in the same way you define any other key.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------------------------|---------|------------------------------------|
|
||||
|`MAGIC_SWAP_CONTROL_CAPSLOCK` | |Swap Left Control and Caps Lock |
|
||||
|`MAGIC_CAPSLOCK_TO_CONTROL` | |Treat Caps Lock as Control |
|
||||
|`MAGIC_SWAP_LALT_LGUI` | |Swap Left Alt and GUI |
|
||||
|`MAGIC_SWAP_RALT_RGUI` | |Swap Right Alt and GUI |
|
||||
|`MAGIC_NO_GUI` | |Disable the GUI key |
|
||||
|`MAGIC_SWAP_GRAVE_ESC` | |Swap <code>`</code> and Escape |
|
||||
|`MAGIC_SWAP_BACKSLASH_BACKSPACE` | |Swap Backslash and Backspace |
|
||||
|`MAGIC_HOST_NKRO` | |Force NKRO on |
|
||||
|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides |
|
||||
|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` | |Unswap Left Control and Caps Lock |
|
||||
|`MAGIC_UNCAPSLOCK_TO_CONTROL` | |Stop treating CapsLock as Control |
|
||||
|`MAGIC_UNSWAP_LALT_LGUI` | |Unswap Left Alt and GUI |
|
||||
|`MAGIC_UNSWAP_RALT_RGUI` | |Unswap Right Alt and GUI |
|
||||
|`MAGIC_UNNO_GUI` | |Enable the GUI key |
|
||||
|`MAGIC_UNSWAP_GRAVE_ESC` | |Unswap <code>`</code> and Escape|
|
||||
|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`| |Unswap Backslash and Backspace |
|
||||
|`MAGIC_UNHOST_NKRO` | |Force NKRO off |
|
||||
|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Left Alt and GUI |
|
||||
|`MAGIC_TOGGLE_NKRO` | |Turn NKRO on or off |
|
||||
Command is a feature that allows you to control different aspects of your keyboard. Command used to be called Magic. Command is typically accessed by holding Left and Right Shift at the same time, although that can be customized. While it shares some functionality with Bootmagic it also allows you to access functionality that Bootmagic does not. For more information see the (Command)[feature_command.md) documentation page.
|
||||
|
||||
## Enabling Bootmagic
|
||||
|
||||
## Bootmagc Hotkeys
|
||||
Bootmagic is disabled by default. To use Bootmagic you need to enable it in your `rules.mk` file:
|
||||
|
||||
Use this by holding the SPACEBAR and the documented key while
|
||||
plugging in the USB connection. e.g. to get into bootloader mode
|
||||
hold `SPACE` and `B` while plugging in USB.
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
|
||||
## Bootmagic Hotkeys and Keycodes
|
||||
|
||||
|Key |Description |
|
||||
|-----------|------------------------------------------------------------------------|
|
||||
|`ESC` | Skip bootmagic and saved eeprom configuration |
|
||||
|`B` | Enter bootloader instead of firmware |
|
||||
|`BACKSPACE`| Clear the saved settings from flash |
|
||||
|`LCTRL` | Swap `Control` and `Capslock` and save into flash |
|
||||
|`CAPSLOCK` | Swap `Capslock` and `Control` and save into flash |
|
||||
|`LALT` | Swap Left `Alt` and `GUI` and save into flash, e.g. for OSX Opt and Cmd|
|
||||
|`RALT` | Swap Right `Alt` and `GUI` and save into flash |
|
||||
|`LGUI` | Disable GUI key - e.g. disable Windows key during gaming |
|
||||
|`GRAVE` | Swap ' and `ESC` and save into flash |
|
||||
|`BACKSLASH`| Swap Blackslash and Backspace and save into flash |
|
||||
|`N` | Enable NKRO (N Key Roll Over) |
|
||||
|`0` | Make Layer 0 the default layer at bootup, e.g. switch to dvorak |
|
||||
|`1` | Make Layer 1 the default layer at bootup |
|
||||
|`2` | Make Layer 2 the default layer at bootup |
|
||||
|`3` | Make Layer 3 the default layer at bootup |
|
||||
|`4` | Make Layer 4 the default layer at bootup |
|
||||
|`5` | Make Layer 5 the default layer at bootup |
|
||||
|`6` | Make Layer 6 the default layer at bootup |
|
||||
|`7` | Make Layer 7 the default layer at bootup |
|
||||
This table describes the default Hotkeys for Bootmagic and the Keycodes for Magic. These may be overriden at the Keyboard or Keymap level. Some functionality is not available in both methods.
|
||||
|
||||
To use the Hotkey hold down `BOOTMAGIC_KEY_SALT` (`KC_SPACE` by default) and the Hotkey while plugging in your keyboard. To use the Keycode assign that keycode to a layer. For example, if you hold down Space+B while plugging in most keyboards, you will enter bootloader mode.
|
||||
|
||||
|Hotkey |Keycode |Description |
|
||||
|-----------|----------------------------------|--------------------------------------------------------|
|
||||
|`ESC` | |Skip bootmagic and saved eeprom configuration |
|
||||
|`B` |`RESET` |Enter bootloader instead of firmware |
|
||||
|`D` |`DEBUG` |Enable debugging (writes messages to serial) |
|
||||
|`X` | |Enable matrix debugging |
|
||||
|`K` | |Enable keyboard debugging |
|
||||
|`M` | |Enable mouse debugging |
|
||||
|`BACKSPACE`| |Clear the saved settings from flash |
|
||||
|`CAPSLOCK` |`MAGIC_CAPSLOCK_TO_CONTROL` |Treat `Capslock` as `Control` |
|
||||
| |`MAGIC_UNCAPSLOCK_TO_CONTROL` |Stop treating CapsLock as Control |
|
||||
|`LCTRL` |`MAGIC_SWAP_CONTROL_CAPSLOCK` |Swap `Control` and `Capslock` |
|
||||
| |`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |Unswap Left Control and Caps Lock |
|
||||
| |`MAGIC_SWAP_ALT_GUI` |Swap Alt and GUI on both sides |
|
||||
| |`MAGIC_UNSWAP_ALT_GUI` |Unswap Left Alt and GUI |
|
||||
|`LALT` |`MAGIC_SWAP_LALT_LGUI` |Swap Left `Alt` and `GUI`, e.g. for OSX Opt and Cmd |
|
||||
| |`MAGIC_UNSWAP_LALT_LGUI` |Unswap Left Alt and GUI |
|
||||
|`RALT` |`MAGIC_SWAP_RALT_RGUI` |Swap Right `Alt` and `GUI` |
|
||||
| |`MAGIC_UNSWAP_RALT_RGUI` |Unswap Right Alt and GUI |
|
||||
|`LGUI` |`MAGIC_NO_GUI` |Disable GUI key - e.g. disable Windows key during gaming|
|
||||
| |`MAGIC_UNNO_GUI` |Enable the GUI key |
|
||||
|`GRAVE` |`MAGIC_SWAP_GRAVE_ESC` |Swap `\`~` and `ESC` |
|
||||
| |`MAGIC_UNSWAP_GRAVE_ESC` |Unswap `\`~` and Escape |
|
||||
|`BACKSLASH`|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |Swap Blackslash and Backspace |
|
||||
| |`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|Unswap Backslash and Backspace |
|
||||
|`N` |`MAGIC_HOST_NKRO` |Force N-Key Rollover (NKRO) on |
|
||||
| |`MAGIC_UNHOST_NKRO` |Force NKRO off |
|
||||
| |`MAGIC_TOGGLE_NKRO` |Toggle NKRO on or off |
|
||||
|`0` |`DF(0)` |Make Layer 0 the default layer at bootup |
|
||||
|`1` |`DF(1)` |Make Layer 1 the default layer at bootup |
|
||||
|`2` |`DF(2)` |Make Layer 2 the default layer at bootup |
|
||||
|`3` |`DF(3)` |Make Layer 3 the default layer at bootup |
|
||||
|`4` |`DF(4)` |Make Layer 4 the default layer at bootup |
|
||||
|`5` |`DF(5)` |Make Layer 5 the default layer at bootup |
|
||||
|`6` |`DF(6)` |Make Layer 6 the default layer at bootup |
|
||||
|`7` |`DF(7)` |Make Layer 7 the default layer at bootup |
|
||||
|
||||
## Bootmagic Configuration
|
||||
|
||||
When setting up your keyboard and/or keymap there are a number of `#define`s that control the behavior of Bootmagic. To use these put them in your `config.h`, either at the keyboard or keymap level.
|
||||
|
||||
|Define |Default|Description |
|
||||
|-------|-------|------------|
|
||||
|`BOOTMAGIC_KEY_SALT`|`KC_SPACE`|The key to hold down to trigger Bootmagic during initialization.|
|
||||
|`BOOTMAGIC_KEY_SKIP`|`KC_ESC`|The Hotkey to ignore saved eeprom configuration.|
|
||||
|`BOOTMAGIC_KEY_EEPROM_CLEAR`|`KC_BSPACE`|The hotkey to clear the saved eeprom configuration.|
|
||||
|`BOOTMAGIC_KEY_BOOTLOADER`|`KC_B`|The hotkey to enter the bootloader.|
|
||||
|`BOOTMAGIC_KEY_DEBUG_ENABLE`|`KC_D`|The hotkey to enable debug mode.|
|
||||
|`BOOTMAGIC_KEY_DEBUG_MATRIX`|`KC_X`|The hotkey to enable matrix debugging mode.|
|
||||
|`BOOTMAGIC_KEY_DEBUG_KEYBOARD`|`KC_K`|The hotkey to enable keyboard debugging mode.|
|
||||
|`BOOTMAGIC_KEY_DEBUG_MOUSE`|`KC_M`|The hotkey to enable mouse debugging mode.|
|
||||
|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK`|`KC_LCTRL`||
|
||||
|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL`|`KC_CAPSLOCK`||
|
||||
|`BOOTMAGIC_KEY_SWAP_LALT_LGUI`|`KC_LALT`||
|
||||
|`BOOTMAGIC_KEY_SWAP_RALT_RGUI`|`KC_RALT`||
|
||||
|`BOOTMAGIC_KEY_NO_GUI`|`KC_LGUI`||
|
||||
|`BOOTMAGIC_KEY_SWAP_GRAVE_ESC`|`KC_GRAVE`||
|
||||
|`BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE`|`KC_BSLASH`||
|
||||
|`BOOTMAGIC_HOST_NKRO`|`KC_N`||
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_0`|`KC_0`|Hotkey to set Layer 0 as the default layer|
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_1`|`KC_1`|Hotkey to set Layer 1 as the default layer|
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_2`|`KC_2`|Hotkey to set Layer 2 as the default layer|
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_3`|`KC_3`|Hotkey to set Layer 3 as the default layer|
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_4`|`KC_4`|Hotkey to set Layer 4 as the default layer|
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_5`|`KC_5`|Hotkey to set Layer 5 as the default layer|
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_6`|`KC_6`|Hotkey to set Layer 6 as the default layer|
|
||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_7`|`KC_7`|Hotkey to set Layer 7 as the default layer|
|
||||
|
52
docs/feature_command.md
Normal file
52
docs/feature_command.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# Command (Formerly known as Magic)
|
||||
|
||||
Command is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Bootmagic Keycodes](feature_bootmagic.md). Whenever possible we encourage you to use that functionality instead of Command.
|
||||
|
||||
## Enabling Command
|
||||
|
||||
By default Command is disabled. You can enable it in your `rules.mk` file:
|
||||
|
||||
COMMAND_ENABLE = yes
|
||||
|
||||
## Usage
|
||||
|
||||
To use Command you hold down the key combination defined by `IS_COMMAND`. By default that combination is both shift keys. While holding the key combination press the key corresponding to the command you want.
|
||||
|
||||
For example, to write the current QMK version to the QMK Toolbox console, you can press `Left Shift`+`Right Shift`+`V`.
|
||||
|
||||
## Configuration
|
||||
|
||||
The following values can be defined in `config.h` to control the behavior of Command.
|
||||
|
||||
|Define |Default | Description |
|
||||
|-------|--------|-------------|
|
||||
|`IS_COMMAND()` |`(keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))`|Key combination to activate Command|
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Do layer switching with Function row|
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Do layer switching with number keys.|
|
||||
|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Do layer switching with custom keys (`MAGIC_KEY_LAYER0..9` below.)|
|
||||
|`MAGIC_KEY_HELP1` |`H` |Show help.|
|
||||
|`MAGIC_KEY_HELP2` |`SLASH` |Show help.|
|
||||
|`MAGIC_KEY_DEBUG` |`D` |Turn on debug mode.|
|
||||
|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Turn on matrix debugging.|
|
||||
|`MAGIC_KEY_DEBUG_KBD` |`K` |Turn on keyboard debugging.|
|
||||
|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Turn on mouse debugging.|
|
||||
|`MAGIC_KEY_VERSION` |`V` |Write the QMK version to the console|
|
||||
|`MAGIC_KEY_STATUS` |`S` |Show the current keyboard status|
|
||||
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command Console|
|
||||
|`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Alternate access to layer 0|
|
||||
|`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Alternate access to layer 0|
|
||||
|`MAGIC_KEY_LAYER0` |`0` |Change default layer to 0|
|
||||
|`MAGIC_KEY_LAYER1` |`1` |Change default layer to 1|
|
||||
|`MAGIC_KEY_LAYER2` |`2` |Change default layer to 2|
|
||||
|`MAGIC_KEY_LAYER3` |`3` |Change default layer to 3|
|
||||
|`MAGIC_KEY_LAYER4` |`4` |Change default layer to 4|
|
||||
|`MAGIC_KEY_LAYER5` |`5` |Change default layer to 5|
|
||||
|`MAGIC_KEY_LAYER6` |`6` |Change default layer to 6|
|
||||
|`MAGIC_KEY_LAYER7` |`7` |Change default layer to 7|
|
||||
|`MAGIC_KEY_LAYER8` |`8` |Change default layer to 8|
|
||||
|`MAGIC_KEY_LAYER9` |`9` |Change default layer to 9|
|
||||
|`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Exit keyboard and enter bootloader|
|
||||
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed|
|
||||
|`MAGIC_KEY_EEPROM` |`E` |Erase EEPROM settings|
|
||||
|`MAGIC_KEY_NKRO` |`N` |Toggle NKRO on/off|
|
||||
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping on/off|
|
@@ -97,6 +97,7 @@ There's also a couple of mod shortcuts you can use:
|
||||
* `SS_LGUI(string)`
|
||||
* `SS_LALT(string)`
|
||||
* `SS_LSFT(string)`
|
||||
* `SS_RALT(string)`
|
||||
|
||||
These press the respective modifier, send the supplied string and then release the modifier.
|
||||
They can be used like this:
|
||||
|
31
docs/feature_swap_hands.md
Normal file
31
docs/feature_swap_hands.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Swap-Hands Action
|
||||
|
||||
The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `ONEHAND_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
|
||||
|
||||
## Configuration
|
||||
|
||||
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
|
||||
|
||||
```C
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||
{{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||
};
|
||||
```
|
||||
|
||||
Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return `{7, 2}` (third row, eighth column). Yes, this is confusing.
|
||||
|
||||
## Advanced Swap Commands
|
||||
|
||||
|Macro | Description |
|
||||
|------|-------------|
|
||||
| `ACTION_SWAP_HANDS()` | Swaps hands when pressed, returns to normal when released (momentary). |
|
||||
| `ACTION_SWAP_HANDS_TOGGLE()` | Toggles swap on and off with every key press. |
|
||||
| `ACTION_SWAP_HANDS_TAP_TOGGLE()` | Toggles with a tap; momentary when held. |
|
||||
| `ACTION_SWAP_HANDS_TAP_KEY(key)`| Sends `key` with a tap; momentary swap when held. |
|
||||
| `ACTION_SWAP_HANDS_ON_OFF()` | Alias for `ACTION_SWAP_HANDS()` |
|
||||
| `ACTION_SWAP_HANDS_OFF_ON()` | Momentarily turns off swap. |
|
||||
| `ACTION_SWAP_HANDS_ON()` | Turns on swapping and leaves it on. |
|
||||
| `ACTION_SWAP_HANDS_OFF()` | Turn off swapping and leaves it off. Good for returning to a known state. |
|
21
docs/getting_started_getting_help.md
Normal file
21
docs/getting_started_getting_help.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Getting Help
|
||||
|
||||
There are a lot of resources for getting help with QMK.
|
||||
|
||||
## Realtime Chat
|
||||
|
||||
You can find QMK developers and users on our main [gitter chat room](https://gitter.im/qmk/qmk_firmware). We also have other rooms for more specific discussion:
|
||||
|
||||
* [Main Firmware Chat](https://gitter.im/qmk/qmk_firmware)
|
||||
* [QMK Toolbox](https://gitter.im/qmk/qmk_toolbox)
|
||||
* [Hardware Design Discussion](https://gitter.im/qmk/qmk_hardware)
|
||||
* [Web Configurator](https://gitter.im/qmk/qmk_configurator)
|
||||
* [Compiler API](https://gitter.im/qmk/qmk_compiler_api)
|
||||
|
||||
## OLKB Subreddit
|
||||
|
||||
The official QMK forum is [/r/olkb](https://reddit.com/r/olkb) on [reddit.com](https://reddit.com).
|
||||
|
||||
## Github Issues
|
||||
|
||||
You can open an [issue on GitHub](https://github.com/qmk/qmk_firmware/issues). This is especially handy when your issue will require long-term discussion or debugging.
|
@@ -4,7 +4,7 @@ We welcome all keyboard projects into QMK, but ask that you try to stick to a co
|
||||
|
||||
## 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. `test`, `keyboard`, and `all` are reserved by make and are not a valid name for a keyboard.
|
||||
|
||||
## `readme.md`
|
||||
|
||||
@@ -16,6 +16,22 @@ In an effort to keep the repo size down, we're no longer accepting images of any
|
||||
|
||||
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.
|
||||
|
||||
## Keyboard Defaults
|
||||
|
||||
Given the amount of functionality that QMK exposes it's very easy to confuse new users. When putting together the default firmware for your keyboard we recommend limiting your enabled features and options to the minimal set needed to support your hardware. Recommendations for specific features follow.
|
||||
|
||||
### Bootmagic and Command
|
||||
|
||||
(Bootmagic)[feature_bootmagic.md) and (Command)[feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board.
|
||||
|
||||
By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in.
|
||||
|
||||
If your keyboard does not have 2 shift keys you should provide a working default for `IS_COMMAND`, even when you have set `COMMAND_ENABLE = no`. This will give your users a default to conform to if they do enable Command.
|
||||
|
||||
## Custom Keyboard Programming
|
||||
|
||||
As documented on (Customizing Functionality)[custom_quantum_functions.md] you can define custom functions for your keyboard. Please keep in mind that your users may want to customize that behavior as well, and make it possible for them to do that. If you are providing a custom function, for example `process_record_kb()`, make sure that your function calls the `_user()` version of the call too. You should also take into account the return value of the `_user()` version, and only run your custom code if the user returns `true`.
|
||||
|
||||
## Keyboard Metadata
|
||||
|
||||
As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK.
|
||||
|
16
docs/newbs.md
Normal file
16
docs/newbs.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# The Compelete Newbs Guide To QMK
|
||||
|
||||
QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level.
|
||||
|
||||
Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs.
|
||||
|
||||
## Overview
|
||||
|
||||
There are 4 main sections to this guide:
|
||||
|
||||
* [Getting Started](newbs_getting_started.md)
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
|
||||
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
73
docs/newbs_building_firmware.md
Normal file
73
docs/newbs_building_firmware.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Building Your First Firmware
|
||||
|
||||
Now that you have setup your build environment you are ready to start building custom firmware. For this section of the guide we will bounce between 3 programs- your file manager, your text editor, and your terminal window. Keep all 3 open until you are done and happy with your keyboard firmware.
|
||||
|
||||
If you have closed and reopened your terminal window since following the first part of the guide, don't forget to `cd qmk_firmware` so that your terminal is in the correct directory.
|
||||
|
||||
## Navigate To Your Keymaps Folder
|
||||
|
||||
Start by navigating to the `keymaps` folder for your keyboard.
|
||||
|
||||
{% hint style='info' %}
|
||||
If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
|
||||
|
||||
macOS:
|
||||
|
||||
open keyboards/<keyboard_folder>/keymaps
|
||||
|
||||
Windows:
|
||||
|
||||
start keyboards/<keyboard_folder>/keymaps
|
||||
{% endhint %}
|
||||
|
||||
## Create a Copy Of The `default` Keymap
|
||||
|
||||
Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.
|
||||
|
||||
## Open `keymap.c` In Your Favorite Text Editor
|
||||
|
||||
Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer.
|
||||
|
||||
{% hint style='danger' %}
|
||||
When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is.
|
||||
{% endhint %}
|
||||
|
||||
## Customize The Layout To Your Liking
|
||||
|
||||
How to complete this step is entirely up to you. Make the one change that's been bugging you, or completely rework everything. You can remove layers if you don't need all of them, or add layers up to a total of 32. Check the following documentation to find out what you can define here:
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Features](features.md)
|
||||
* [FAQ](faq.md)
|
||||
|
||||
{% hint style='info' %}
|
||||
While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise.
|
||||
{% endhint %}
|
||||
|
||||
## Build Your Firmware
|
||||
|
||||
When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command:
|
||||
|
||||
make <my_keyboard>:<my_keymap>
|
||||
|
||||
For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
|
||||
|
||||
make planck/rev5:xyverz
|
||||
|
||||
While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this:
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||
Checking file size of planck_rev5_xyverz.hex [OK]
|
||||
* File size is fine - 18392/28672
|
||||
```
|
||||
|
||||
## Flash Your Firmware
|
||||
|
||||
Move on to [Flashing Firmware](newbs_flashing.md) to learn how to write your new firmware to your keyboard.
|
79
docs/newbs_flashing.md
Normal file
79
docs/newbs_flashing.md
Normal file
@@ -0,0 +1,79 @@
|
||||
# Flashing Your Keyboard With QMK Toolbox
|
||||
|
||||
Now that you've built a custom firmware file you'll want to flash your keyboard.
|
||||
|
||||
## Load The File Into QMK Toolbox
|
||||
|
||||
Begin by opening the QMK Toolbox application. You'll want to locate the firmware file in Finder or Explorer. Your keyboard firmware may be in one of two formats- `.hex` or `.bin`. QMK tries to copy the appropriate one for your keyboard into the root `qmk_firmware` directory.
|
||||
|
||||
{% hint style='info' %}
|
||||
If you are on Windows or macOS there are commands you can use to easily open the current firmware folder in Explorer or Finder.
|
||||
|
||||
Windows:
|
||||
|
||||
start .
|
||||
|
||||
macOS:
|
||||
|
||||
open .
|
||||
{% endhint %}
|
||||
|
||||
The firmware file always follows this naming format:
|
||||
|
||||
<keyboard_name>_<keymap_name>.{bin,hex}
|
||||
|
||||
For example, the `plank/rev5` with a `default` keymap will have this filename:
|
||||
|
||||
planck_rev5_default.hex
|
||||
|
||||
Once you have located your firmware file drag it into the "Local file" box in QMK Toolbox, or click "Open" and navigate to where your firmware file is stored.
|
||||
|
||||
## Put Your Keyboard Into DFU (Bootloader) Mode
|
||||
|
||||
In order to flash your custom firmware you have to put your keyboard into a special flashing mode. While it is in this mode you will not be able to type or otherwise use your keyboard. It is very important that you do not unplug your keyboard or otherwise interrupt the flashing process while the firmware is being written.
|
||||
|
||||
Different keyboards have different ways to enter this special mode. If your PCB currently runs QMK or TMK and you have not been given specific instructions try the following, in order:
|
||||
|
||||
* Hold down both shift keys and press `Pause`
|
||||
* Hold down both shift keys and press `B`
|
||||
* Unplug your keyboard, hold down the Spacebar and `B` at the same time, plug in your keyboard and wait a second before releasing the keys
|
||||
* Press the physical `RESET` button on the bottom of the PCB
|
||||
* Locate header pins on the PCB labeled `BOOT0` or `RESET`, short those together while plugging your PCB in
|
||||
|
||||
When you are successful you will see a message similar to this in QMK Toolbox:
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
```
|
||||
|
||||
## Flash Your Keyboard
|
||||
|
||||
Click the `Flash` button in QMK Toolbox. You will see output similar to the following:
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
*** Attempting to flash, please don't remove device
|
||||
>>> dfu-programmer atmega32u4 erase --force
|
||||
Erasing flash... Success
|
||||
Checking memory from 0x0 to 0x6FFF... Empty.
|
||||
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
|
||||
Checking memory from 0x0 to 0x55FF... Empty.
|
||||
0% 100% Programming 0x5600 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
0% 100% Reading 0x7000 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
Validating... Success
|
||||
0x5600 bytes written into 0x7000 bytes memory (76.79%).
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
|
||||
*** DFU device disconnected
|
||||
*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
|
||||
```
|
||||
|
||||
## Test It Out!
|
||||
|
||||
Congrats! Your custom firmware has been programmed to your keyboard!
|
||||
|
||||
Give it a try and make sure everything works the way you want it to. We've written [Testing and Debugging](newbs_testing_debugging.md) to round out this Newbie Guide, so head over there to learn about how to troubleshoot your custom functionality.
|
98
docs/newbs_getting_started.md
Normal file
98
docs/newbs_getting_started.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# Introduction
|
||||
|
||||
Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when they are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom layout you are creating the equivalent of an .exe for your keyboard.
|
||||
|
||||
QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful layouts, you only have to follow a few simple syntax rules.
|
||||
|
||||
# Getting Started
|
||||
|
||||
Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for.
|
||||
|
||||
## Download Software
|
||||
|
||||
### Text Editor
|
||||
|
||||
You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS you can not use TextEdit.app, it will not save plain text files. You will need to install another program such as Sublime Text.
|
||||
|
||||
{% hint style='info' %}
|
||||
Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject.
|
||||
{% endhint %}
|
||||
|
||||
### QMK Toolbox
|
||||
|
||||
QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print.
|
||||
|
||||
* [Newest Release](https://github.com/qmk/qmk_toolbox/releases/latest)
|
||||
* [Source Code](https://github.com/qmk/qmk_toolbox/)
|
||||
|
||||
## Environment Setup
|
||||
|
||||
We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest.
|
||||
|
||||
{% hint style="info" %}
|
||||
If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK:
|
||||
|
||||
* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
|
||||
* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
||||
{% endhint %}
|
||||
|
||||
### Windows
|
||||
|
||||
You will need to install msys2 and git.
|
||||
|
||||
* Follow the installation instructions on the msys2 homepage: http://www.msys2.org
|
||||
* Close any open msys2 terminals, and open a new terminal
|
||||
* Install git by running this command: `pacman -S git`
|
||||
|
||||
### macOS
|
||||
|
||||
You will need to install homebrew. Follow the instructions on the homebrew homepage: https://brew.sh
|
||||
|
||||
### Linux
|
||||
|
||||
You will need to install git. It's extremely likely you already have it, but if not one of the following commands should install it:
|
||||
|
||||
* Debian/Ubuntu/Devuan: `apt-get install git`
|
||||
* Fedora/Redhat/Centos: `yum install git`
|
||||
* Arch: `pacman -S git`
|
||||
|
||||
## Download QMK
|
||||
|
||||
Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands:
|
||||
|
||||
git clone https://github.com/qmk/qmk_firmware.git
|
||||
cd qmk_firmware
|
||||
|
||||
{% hint style='info' %}
|
||||
If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message.
|
||||
{% endhint %}
|
||||
|
||||
## Setup QMK
|
||||
|
||||
QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command:
|
||||
|
||||
./util/qmk_install.sh
|
||||
|
||||
## Test Your Build Environment
|
||||
|
||||
Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format:
|
||||
|
||||
make <keyboard>:default
|
||||
|
||||
For example, to build a firmware for a Clueboard 66% use:
|
||||
|
||||
make clueboard/66/rev3:default
|
||||
|
||||
When it is done you should have a lot of output that ends similar to this:
|
||||
|
||||
```
|
||||
Linking: .build/clueboard_66_rev2_default.elf [OK]
|
||||
Creating load file for flashing: .build/clueboard_66_rev2_default.hex [OK]
|
||||
Copying clueboard_66_rev2_default.hex to qmk_firmware folder [OK]
|
||||
Checking file size of clueboard_66_rev2_default.hex [OK]
|
||||
* File size is fine - 25174/28672
|
||||
```
|
||||
|
||||
## Creating Your Layout
|
||||
|
||||
Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that.
|
33
docs/newbs_testing_debugging.md
Normal file
33
docs/newbs_testing_debugging.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Testing and Debugging
|
||||
|
||||
Once you've flashed your keyboard with a custom firmware you're ready to test it out. With a little bit of luck everything will work perfectly, but if not this document will help you figure out what's wrong.
|
||||
|
||||
## Testing
|
||||
|
||||
Testing your keyboard is usually pretty straightforward. Press every single key and make sure it sends the keys you expect. There are even programs that will help you make sure that no key is missed.
|
||||
|
||||
Note: These programs are not provided by or endorsed by QMK.
|
||||
|
||||
* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (Windows Only)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (Mac Only)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (Web Based)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (Web Based)
|
||||
|
||||
## Debugging With QMK Toolbox
|
||||
|
||||
[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode.
|
||||
|
||||
<!-- FIXME: Describe the debugging messages here. -->
|
||||
|
||||
## Sending Your Own Debug Messages
|
||||
|
||||
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
|
||||
|
||||
#include <print.h>
|
||||
|
||||
After that you can use a few different print functions:
|
||||
|
||||
* `print("string")`: Print a simple string.
|
||||
* `sprintf("%s string", var)`: Print a formatted string
|
||||
* `dprint("string")` Print a simple string, but only when debug mode is enabled
|
||||
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
|
@@ -16,6 +16,10 @@
|
||||
"from": "feature_common_shortcuts.html",
|
||||
"to": "feature_advanced_keycodes.html"
|
||||
},
|
||||
{
|
||||
"from": "glossary.html",
|
||||
"to": "reference_glossary.html"
|
||||
},
|
||||
{
|
||||
"from": "key_lock.html",
|
||||
"to": "feature_key_lock.html"
|
||||
|
@@ -29,21 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define PRODUCT Helix Beta
|
||||
#define DESCRIPTION A split keyboard for the cheap makers
|
||||
|
||||
#define HELIX_ROWS 5
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#if HELIX_ROWS == 4
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||
#elif HELIX_ROWS == 5
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||
#else
|
||||
#error "expected HELIX_ROWS 4 or 5"
|
||||
#endif
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
|
@@ -35,8 +35,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
// Helix keyboard OLED support
|
||||
//#define SSD1306OLED
|
||||
|
||||
/* Select rows configuration */
|
||||
// Rows are 4 or 5
|
||||
#define HELIX_ROWS 5
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#if HELIX_ROWS == 4
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
|
||||
#elif HELIX_ROWS == 5
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
|
||||
#else
|
||||
#error "expected HELIX_ROWS 4 or 5"
|
||||
#endif
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
@@ -46,9 +65,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
// Helix keyboard : see ./rules.mk: RGBLIGHT_ENABLE = yes or no
|
||||
// Helix keyboard : RGBLED_NUM 6 or 32
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#if RGBLED_NUM <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#if HELIX_ROWS == 5
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#endif
|
||||
#endif
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
|
||||
// 120 RGBoff, OLEDoff
|
||||
// 120 OLED
|
||||
// 330 RGB 6
|
||||
// 300 RGB 32
|
||||
// 310 OLED & RGB 32
|
||||
#define USB_MAX_POWER_CONSUMPTION 330
|
||||
#else
|
||||
// fix iPhone and iPad power adapter issue
|
||||
// iOS device need lessthan 100
|
||||
#define USB_MAX_POWER_CONSUMPTION 100
|
||||
#endif
|
||||
|
@@ -14,6 +14,8 @@ 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
|
||||
# Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32
|
||||
# Helix keyboard : RGBLIGHT_ENABLE = no or yes
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
ONEHAND_ENABLE = no # Enable one-hand typing
|
||||
|
||||
|
41
keyboards/iris/keymaps/swedish/config.h
Normal file
41
keyboards/iris/keymaps/swedish/config.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2017 Danny Nguyen <danny@keeb.io>
|
||||
|
||||
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_common.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
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
110
keyboards/iris/keymaps/swedish/keymap.c
Normal file
110
keyboards/iris/keymaps/swedish/keymap.c
Normal file
@@ -0,0 +1,110 @@
|
||||
#include "iris.h"
|
||||
#include "keymap_swedish.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _EMPTY 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE
|
||||
};
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#define KC_LOWR LOWER
|
||||
#define KC_RASE RAISE
|
||||
#define KC_RST RESET
|
||||
|
||||
#define KC_AA NO_AA
|
||||
#define KC_AE NO_AE
|
||||
#define KC_OE NO_OSLH
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P , AA ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LSFT, A , S , D , F , G , H , J , K , L , OE , AE ,
|
||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||
LCTL, Z , X , C , V , B ,DEL , BSPC, N , M ,COMM,DOT ,SLSH,MINS,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LGUI,LOWR,SPC , ENT ,RASE,LALT
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
|
||||
[_LOWER] = KEYMAP(
|
||||
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
|
||||
NO_TILD,KC_EXLM,NO_AT ,KC_HASH,NO_DLR ,KC_PERC, NO_CIRC,NO_AMPR,NO_ASTR,NO_SLSH,NO_LPRN,NO_RPRN,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
NO_ACUT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE,NO_LCBR,NO_RCBR,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_BSLS, KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,NO_LBRC,NO_RBRC,
|
||||
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_LESS,NO_GRTR,
|
||||
//`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------'
|
||||
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS
|
||||
// `-------+-------+-------' `-------+-------+-------'
|
||||
),
|
||||
|
||||
[_RAISE] = KEYMAP(
|
||||
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
|
||||
KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
NO_GRV ,KC_7 ,KC_8 ,KC_9 ,NO_MINS,NO_ASTR, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE,
|
||||
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_4 ,KC_5 ,KC_6 ,NO_PLUS,NO_SLSH, KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_TRNS,NO_BSLS,
|
||||
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
|
||||
KC_TRNS,KC_1 ,KC_2 ,KC_3 ,KC_0 ,NO_EQL ,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
|
||||
// `-------+-------+-------' `-------+-------+-------'
|
||||
)
|
||||
};
|
||||
|
||||
void persistent_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) {
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _EMPTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
6
keyboards/iris/keymaps/swedish/rules.mk
Normal file
6
keyboards/iris/keymaps/swedish/rules.mk
Normal file
@@ -0,0 +1,6 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "backlight.h"
|
||||
#include "backlight_custom.h"
|
||||
|
||||
extern rgblight_config_t rgblight_config;
|
||||
|
||||
// for keyboard subdirectory level init functions
|
||||
// @Override
|
||||
void matrix_init_kb(void) {
|
||||
@@ -52,6 +50,9 @@ void backlight_set(uint8_t level) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
extern rgblight_config_t rgblight_config;
|
||||
|
||||
// custom RGB driver
|
||||
void rgblight_set(void) {
|
||||
if (!rgblight_config.enable) {
|
||||
@@ -77,7 +78,9 @@ void matrix_scan_kb(void) {
|
||||
}
|
||||
|
||||
rgblight_task();
|
||||
|
||||
#else
|
||||
void matrix_scan_kb(void) {
|
||||
#endif
|
||||
matrix_scan_user();
|
||||
/* Nothing else for now. */
|
||||
}
|
||||
|
9
keyboards/jj40/keymaps/oscillope/config.h
Normal file
9
keyboards/jj40/keymaps/oscillope/config.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
#define TAPPING_TERM 300
|
||||
|
||||
#endif
|
@@ -18,9 +18,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "jj40.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#ifdef KEYMAP
|
||||
#undef KEYMAP
|
||||
#endif
|
||||
#define KEYMAP KEYMAP_OFFSET
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _NAV 3
|
||||
|
||||
#define NAV_TAP LT(_NAV, KC_SPC)
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
@@ -48,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
|
||||
KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_LSFT, TT(_RAISE), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_LSFT, TT(_RAISE), NAV_TAP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
@@ -66,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
KC_PSCR, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
|
||||
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
@@ -84,7 +92,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \
|
||||
KC_TAB, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \
|
||||
CC_ARRW, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, KC_PIPE, \
|
||||
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||
),
|
||||
|
||||
[_NAV] = KEYMAP( \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
};
|
||||
|
||||
|
14
keyboards/jj40/keymaps/oscillope/rules.mk
Normal file
14
keyboards/jj40/keymaps/oscillope/rules.mk
Normal file
@@ -0,0 +1,14 @@
|
||||
# build options
|
||||
BOOTMAGIC_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
|
||||
BACKLIGHT_ENABLE = no
|
||||
BACKLIGHT_CUSTOM_DRIVER = no
|
||||
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGBLIGHT_CUSTOM_DRIVER = no
|
||||
|
||||
KEY_LOCK_ENABLE = yes
|
@@ -4,9 +4,6 @@
|
||||
#define _GA 1
|
||||
#define _FL 2
|
||||
#define _AR 3
|
||||
#define _LE 4
|
||||
#define _LO 5
|
||||
#define _UL 6
|
||||
|
||||
#define TRNS KC_TRNS
|
||||
#define ______ KC_NO
|
||||
@@ -14,56 +11,52 @@
|
||||
|
||||
#define LSHIFT OSM(MOD_LSFT)
|
||||
#define SPACE LT(_AR, KC_SPC)
|
||||
#define CAPS LT(_LE, KC_CAPS)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Main Layer
|
||||
[_MA] = KEYMAP_ANSI(
|
||||
KC_GESC, 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_MPLY, KC_BSPC, KC_PSCR,
|
||||
[_MA] = KEYMAP(
|
||||
KC_GESC, 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_MPLY,
|
||||
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_BSLS, KC_DEL,
|
||||
CAPS, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
LSHIFT, TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, SPACE, SPACE, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
//Function Layer
|
||||
[_FL] = KEYMAP_ANSI(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, RESET, KC_PGUP,
|
||||
TRNS, KC_BTN1, KC_MS_U, KC_BTN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_PGDN,
|
||||
TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, TRNS, KC_WH_U,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_WH_L, KC_WH_D, KC_WH_R),
|
||||
[_FL] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, RESET, KC_PSCR,
|
||||
TRNS, ______, ______, ______, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______,
|
||||
TRNS, ______, ______, ______, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, TRNS, KC_PGUP,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______, KC_PGDN, ______),
|
||||
|
||||
//Arrow keys layer (space bar)
|
||||
[_AR] = KEYMAP_ANSI(
|
||||
[_AR] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, M(0), TRNS, TRNS, TRNS),
|
||||
//LED control layer (caps)
|
||||
[_LE] = KEYMAP_ANSI(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, BL_TOGG, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, BL_INC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, BL_DEC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
|
||||
|
||||
//Game layer (fn + g)
|
||||
[_GA] = KEYMAP_ANSI(
|
||||
[_GA] = KEYMAP(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
KC_CAPS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
KC_LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, KC_SPC, KC_SPC, TRNS, TRNS, MO(_FL), TRNS, TRNS, TRNS),
|
||||
};
|
||||
|
||||
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("AdminF123!");
|
||||
}
|
||||
break;
|
||||
void matrix_init_user() {
|
||||
//Set led port to output
|
||||
DDRB |= (1<<2);
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// Turn capslock on
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Turn capslock off
|
||||
PORTB |= (1<<2);
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
}
|
||||
|
@@ -107,7 +107,11 @@ void set_switch_led(int ledId, bool state) {
|
||||
PORTD |= (1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC |= (1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC |= (1<<6);
|
||||
} else {
|
||||
PORTC |= (1<<7);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
PORTD |= (1<<4);
|
||||
@@ -128,7 +132,11 @@ void set_switch_led(int ledId, bool state) {
|
||||
PORTD &= ~(1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC &= ~(1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC &= ~(1<<6);
|
||||
} else {
|
||||
PORTC &= ~(1<<7);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
PORTD &= ~(1<<4);
|
||||
@@ -167,9 +175,12 @@ void set_layer_led(int layerId) {
|
||||
void matrix_init_user(void) {
|
||||
led_init_ports();
|
||||
|
||||
PORTB |= (1 << 7);
|
||||
DDRB &= ~(1<<7);
|
||||
|
||||
PORTD |= (1<<7);
|
||||
PORTC |= (1<<6);
|
||||
PORTC |= (1<<7);
|
||||
PORTD |= (1<<4);
|
||||
PORTE |= (1<<6);
|
||||
PORTB |= (1<<4);
|
||||
@@ -188,7 +199,9 @@ void led_init_ports() {
|
||||
|
||||
// led voor switch #2
|
||||
DDRC |= (1<<6);
|
||||
DDRC |= (1<<7);
|
||||
PORTC &= ~(1<<6);
|
||||
PORTC &= ~(1<<7);
|
||||
|
||||
// led voor switch #3
|
||||
DDRD |= (1<<4);
|
||||
|
@@ -16,7 +16,11 @@ void set_led_state(int ledId, bool state) {
|
||||
PORTD |= (1<<7);
|
||||
break;
|
||||
case 1:
|
||||
PORTC |= (1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC |= (1<<6);
|
||||
} else {
|
||||
PORTC |= (1<<7);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
PORTD |= (1<<4);
|
||||
@@ -47,7 +51,11 @@ void set_led_state(int ledId, bool state) {
|
||||
PORTD &= ~(1<<7);
|
||||
break;
|
||||
case 1:
|
||||
PORTC &= ~(1<<6);
|
||||
if((PINB & (1 << 7)) != 0) {
|
||||
PORTC &= ~(1<<6);
|
||||
} else {
|
||||
PORTC &= ~(1<<7);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
PORTD &= ~(1<<4);
|
||||
@@ -75,8 +83,12 @@ void set_led_state(int ledId, bool state) {
|
||||
}
|
||||
|
||||
void led_init_ports() {
|
||||
PORTB |= (1 << 7);
|
||||
DDRB &= ~(1<<7);
|
||||
|
||||
DDRD |= (1<<7);
|
||||
DDRC |= (1<<6);
|
||||
DDRC |= (1<<7);
|
||||
DDRD |= (1<<4);
|
||||
DDRE |= (1<<6);
|
||||
DDRB |= (1<<4);
|
||||
@@ -87,10 +99,16 @@ void led_init_ports() {
|
||||
DDRB |= (1<<0);
|
||||
}
|
||||
|
||||
void led_set_layer(int layer) {
|
||||
|
||||
/*KNOPS_SIMPLELED_STATES*/
|
||||
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
led_init_ports();
|
||||
|
||||
led_set_layer(0);
|
||||
led_set_layer(1);
|
||||
|
||||
/*KNOPS_INIT*/
|
||||
}
|
||||
@@ -112,12 +130,6 @@ void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
|
||||
void led_set_layer(int layer) {
|
||||
|
||||
/*KNOPS_SIMPLELED_STATES*/
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
/*KNOPS_PROCESS_STATE*/
|
||||
|
@@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define BACKLIGHT_LEVELS 10
|
||||
#define BACKLIGHT_PWM_MAP {2, 4, 8, 16, 40, 55, 70, 128, 200, 255}
|
||||
#define BACKLIGHT_BREATHING
|
||||
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_TIMER
|
||||
|
@@ -1,4 +1,3 @@
|
||||
BLUETOOTH_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
F_CPU = 8000000
|
||||
|
||||
|
@@ -14,7 +14,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "meira.h"
|
||||
#include "issi.h"
|
||||
#include "lighting.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
@@ -277,10 +276,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return false;
|
||||
break;
|
||||
case BL_TOGG:
|
||||
#ifdef ISSI_ENABLE
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
if (record->event.pressed) {
|
||||
print("Enabling backlight\n");
|
||||
issi_init();
|
||||
backlight_init_ports();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
EXTRAFLAGS+=-flto # -4-7k
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(-47kb)
|
||||
ISSI_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
@@ -49,6 +49,8 @@ void backlight_set(uint8_t level){
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_backlight_by_keymap(uint8_t col, uint8_t row){
|
||||
// dprintf("LED: %02X, %d %d %d\n", lookup_value, matrix, led_col, led_row);
|
||||
// activateLED(matrix, led_col, led_row, 255);
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#define MEIRA_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "issi.h"
|
||||
|
||||
void reset_keyboard_kb(void);
|
||||
|
||||
@@ -37,6 +38,22 @@ void reset_keyboard_kb(void);
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
|
||||
}
|
||||
|
||||
#endif
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#define KC_KEYMAP( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||
) \
|
||||
KEYMAP( \
|
||||
KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
|
||||
KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
|
||||
KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
|
||||
KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -1,2 +1 @@
|
||||
BLUETOOTH_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
|
@@ -62,16 +62,15 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
|
||||
ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
|
||||
#WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
||||
BACKLIGHT_CUSTOM_DRIVER = yes
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera
|
||||
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
|
84
keyboards/ok60/config.h
Normal file
84
keyboards/ok60/config.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
Copyright 2018 Edward Browncross
|
||||
|
||||
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_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 OK60
|
||||
#define PRODUCT OK60
|
||||
#define DESCRIPTION qmk keyboard firmware for OK60
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 }
|
||||
#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, B6, C6, C7, F1, F0, E6, B3, B2, B1, B0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 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
|
||||
|
||||
#define RGB_DI_PIN F6
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 10
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
18
keyboards/ok60/keymaps/default/keymap.c
Normal file
18
keyboards/ok60/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "ok60.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
KEYMAP_ANSI(
|
||||
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_BSPC,
|
||||
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_BSLS,
|
||||
KC_CAPS, 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_LSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL),
|
||||
|
||||
KEYMAP_ANSI(
|
||||
RESET, 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_DEL,
|
||||
KC_TRNS, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, 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),
|
||||
};
|
29
keyboards/ok60/keymaps/ebrowncross/keymap.c
Normal file
29
keyboards/ok60/keymaps/ebrowncross/keymap.c
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "ok60.h"
|
||||
|
||||
// An ISO UK keymap
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
KEYMAP_ISO(
|
||||
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_BSPC,
|
||||
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||
KC_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, KC_SPC, MO(1), KC_LGUI, KC_MENU, KC_LCTL),
|
||||
|
||||
KEYMAP_ISO(
|
||||
KC_GRAVE, 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_DEL,
|
||||
_______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_PSCR,
|
||||
_______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||
_______, _______, _______, _______, _______, MO(2), _______, _______),
|
||||
|
||||
KEYMAP_ISO(
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
};
|
1
keyboards/ok60/ok60.c
Normal file
1
keyboards/ok60/ok60.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "ok60.h"
|
37
keyboards/ok60/ok60.h
Normal file
37
keyboards/ok60/ok60.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef OK60_H
|
||||
#define OK60_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP_ANSI( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \
|
||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
|
||||
K400, K401, K402, K406, K410, K411, K412, K413 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \
|
||||
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \
|
||||
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \
|
||||
}
|
||||
|
||||
#define KEYMAP_ISO( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
|
||||
K400, K401, K402, K406, K410, K411, K412, K413 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \
|
||||
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \
|
||||
}
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
#define LAYOUT_60_iso KEYMAP_ISO
|
||||
|
||||
#endif
|
12
keyboards/ok60/pinout.txt
Normal file
12
keyboards/ok60/pinout.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
/* Column pin configuration
|
||||
* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
||||
* pin: D0 D1 D2 D3 D5 B6 C6 C7 F1 F0 E6 B3 B2 B1 B0
|
||||
*/
|
||||
|
||||
/* Row pin configuration
|
||||
* row: 0 1 2 3 4
|
||||
* pin: B5 B4 D7 D6 D4
|
||||
*/
|
||||
|
||||
B7 LED backlight
|
||||
F6 WS2812 Strip
|
16
keyboards/ok60/readme.md
Normal file
16
keyboards/ok60/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# OK60
|
||||
|
||||

|
||||
|
||||
A 60% keyboard PCB sold on AliExpress by Shenzhen YMD Tech Co.,Ltd.
|
||||
It supports the same layouts and cases as the GH60 but comes with WS2812 RGB underglow.
|
||||
|
||||
Keyboard Maintainer: [Edward Browncross](https://github.com/edwardbrowncross)
|
||||
Hardware Supported: OK60 PCB, OK60XRGB, Diamond 60 Keyboard
|
||||
Hardware Availability: [AliExpress](https://www.aliexpress.com/store/product/Free-shipping-Pre-soldered-Diode-Resistance-Satan-GH60-PCB-Board-Programmable-DIY-Mechanical-Keyboard-Poker-2/429151_32809893696.html)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ok60:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
66
keyboards/ok60/rules.mk
Normal file
66
keyboards/ok60/rules.mk
Normal file
@@ -0,0 +1,66 @@
|
||||
# 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*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
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 = yes # Console for debug(+400)
|
||||
# COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
|
||||
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 = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable the RGB backlight
|
||||
# MIDI_ENABLE = YES # MIDI controls
|
||||
# UNICODE_ENABLE = YES # Unicode
|
||||
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
LAYOUTS = 60_ansi 60_iso
|
53
keyboards/planck/keymaps/corvec/config.h
Normal file
53
keyboards/planck/keymaps/corvec/config.h
Normal file
@@ -0,0 +1,53 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
// AutoShift config
|
||||
#define AUTO_SHIFT_TIMEOUT 135
|
||||
#define NO_AUTO_SHIFT_SPECIAL
|
||||
// #define NO_AUTO_SHIFT_NUMERIC
|
||||
// #define NO_AUTO_SHIFT_ALPHA
|
||||
|
||||
// TapDance config
|
||||
#define TAPPING_TERM 150
|
||||
|
||||
#endif
|
207
keyboards/planck/keymaps/corvec/keymap.c
Normal file
207
keyboards/planck/keymaps/corvec/keymap.c
Normal file
@@ -0,0 +1,207 @@
|
||||
/* Copyright 2015-2018 Jack Humbert, Corey Kump
|
||||
*
|
||||
* 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 "planck.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_COLEMAK,
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_LEANDOWN,
|
||||
_RAISE,
|
||||
_WOBBLE,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
/* This include relies on the layer constants above and so must be declared after them */
|
||||
#include "tapdance.c"
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
#define KC_____ KC_TRNS
|
||||
#define KC_XXXX KC_NO
|
||||
#define KC_LOWR LOWER
|
||||
#define KC_RASE RAISE
|
||||
|
||||
/**
|
||||
* Custom Corvec Bindings
|
||||
*
|
||||
* Previously used but currently unused bindings are commented out.
|
||||
**/
|
||||
|
||||
// Activate the Wobble layer
|
||||
#define KC_WOBL MO(_WOBBLE)
|
||||
// Dual function with Raise
|
||||
#define KC_RESC LT(_RAISE, KC_ESC)
|
||||
// Dual functions with Lower
|
||||
#define KC_LENT LT(_LOWER, KC_ENT)
|
||||
#define KC_LQUT LT(_LEANDOWN, KC_QUOT)
|
||||
// Dual functions with Shift
|
||||
#define KC_SDEL MT(MOD_LSFT, KC_DEL)
|
||||
#define KC_SAPP MT(MOD_LSFT, KC_APP)
|
||||
|
||||
/**
|
||||
* Functions taking advantage of tap dance:
|
||||
**/
|
||||
// Tap once: quote. Hold: LEANDOWN layer. Tap twice: minus.
|
||||
#define KC_TQTD TD(TD_QUOT_LEAN_MINS)
|
||||
// Tap once: [. Hold: RALT. Tap twice: {
|
||||
#define KC_TALT TD(TD_LBRC_RALT_LCBR)
|
||||
// Tap once: ]. Hold: RGUI. Tap twice: }
|
||||
#define KC_TGUI TD(TD_RBRC_RGUI_RCBR)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_COLEMAK] = KC_KEYMAP(
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
RESC, A , R , S , T , D , H , N , E , I , O ,TQTD,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,RSFT,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,SDEL,TALT,TGUI,RCTL
|
||||
),
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
RESC, A , S , D , F , G , H , J , K , L ,SCLN,TQTD,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,
|
||||
//-----+----+----+----+----+----+----+----+----+----+----+----
|
||||
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,RALT,SAPP,RGUI,RCTL
|
||||
),
|
||||
|
||||
[_LOWER] = KC_KEYMAP(
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
|
||||
____,LPRN,RPRN,LBRC,RBRC,XXXX,LEFT,DOWN, UP ,RGHT,XXXX,MINS,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,PGDN,PGUP,END ,BSLS,____,
|
||||
____,____,____,____,____,____,____,____,____,____,____,____
|
||||
),
|
||||
|
||||
[_LEANDOWN] = KC_KEYMAP(
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
|
||||
____,LPRN,RPRN,LBRC,RBRC,LCBR,LCBR,DLR ,PERC,CIRC,____,____,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,EXLM, AT ,HASH,BSLS,____,
|
||||
____,____,____,____,____,____,____,____,LEFT,DOWN, UP ,RGHT
|
||||
),
|
||||
|
||||
[_RAISE] = KC_KEYMAP(
|
||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,____,
|
||||
____,LPRN,RPRN,LCBR,RCBR,XXXX,XXXX, 4 , 5 , 6 ,PPLS,MINS,
|
||||
____,BSLS,TILD,PIPE,EQL ,UNDS,XXXX, 1 , 2 , 3 ,PAST,____,
|
||||
____,____,____,____,____,____,____,____,____,____,____,____
|
||||
),
|
||||
|
||||
[_WOBBLE] = KC_KEYMAP(
|
||||
GRV , F1 , F2 , F3 , F4 , NO ,MUTE,VOLD,VOLU, NO , NO , DEL,
|
||||
, F5 , F6 , F7 , F8 , NO ,MPRV,MPLY,MSTP,MNXT, NO ,BSLS,
|
||||
, F9 , F10, F11, F12, NO , NO , NO , NO , INS,PSCR, ,
|
||||
, , , , , , , , , , ,
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Colemk| | Debug|RGB Tg|RGB Md|RGB H+|RGB H-|RGB S+|RGB S-|RGB V+|RGB V-|Qwerty|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk| |AS On | AS + |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf|AS Rep|AS Off| AS - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | Reset|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_ADJUST] = {
|
||||
{COLEMAK, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, QWERTY },
|
||||
{_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, KC_ASON, KC_ASUP},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,KC_ASRP, KC_ASOFF,KC_ASDN},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
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 BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
28
keyboards/planck/keymaps/corvec/readme.md
Normal file
28
keyboards/planck/keymaps/corvec/readme.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Corvec's Planck Layout
|
||||
|
||||
This layout is a development-focused layout with an emphasis on ergonomics. It is intended to be used in Colemak mode,
|
||||
but has a full-QWERTY mode for gaming compatibility.
|
||||
|
||||
It utilizes redundancy for common keys so that they are more easily accessible in every task. For example, the common
|
||||
layers, Raise and Lower, both can be activated with two different keys, each pressed with either hand. Certain symbols
|
||||
( \~|+_ ) are on both layers, since the keys they take up are a bit out of the way. The minus symbol is available on the
|
||||
quote key in a variety of ways - both layers, as well as via tap dance.
|
||||
|
||||
The right-hand Lower activation key activates a slightly different layer. The keys accessed by the opposite hand are the
|
||||
same as the Lower layer, but the keys on the right hand differ. For this reason, we refer to this instead as the
|
||||
Leandown layer.
|
||||
|
||||
Auto-shift is enabled, but there are also three shift keys, since typing with auto-shift is by necessity slow.
|
||||
|
||||
Movement is done Vim-style, on the hjkl / hnei keys, on the Lower layer so that it is easiest to activate it.
|
||||
The arrow keys are mimicked by Home/PgDn/PgUp/End on the next row.
|
||||
|
||||
The arrow keys and broad navigation keys are replaced by a symbol-pad on the Leandown layer. However, in order to allow
|
||||
single-hand navigation, the bottom right corner cluster becomes arrow keys.
|
||||
|
||||
Media keys are in the same location as the arrow keys, but are on the Wobble layer instead.
|
||||
|
||||
Toggle layers are minimized so that the state of the keyboard is more predictable. Shift Toggle is in the works, but
|
||||
will not be included until it can be set to deactivate automatically.
|
||||
|
||||
Delete is accessible from the third Shift key.
|
5
keyboards/planck/keymaps/corvec/rules.mk
Normal file
5
keyboards/planck/keymaps/corvec/rules.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
API_SYSEX_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
156
keyboards/planck/keymaps/corvec/tapdance.c
Normal file
156
keyboards/planck/keymaps/corvec/tapdance.c
Normal file
@@ -0,0 +1,156 @@
|
||||
/**
|
||||
* Tap Dance config and functions
|
||||
**/
|
||||
/* Copyright 2018 Corey Kump
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3,
|
||||
DOUBLE_SINGLE_TAP = 4,
|
||||
UNKNOWN_TAPS = 5
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tap;
|
||||
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
if (state->interrupted || !state->pressed) {
|
||||
return SINGLE_TAP;
|
||||
} else {
|
||||
return SINGLE_HOLD;
|
||||
}
|
||||
}
|
||||
if (state->count == 2) {
|
||||
if (state->interrupted) {
|
||||
return DOUBLE_SINGLE_TAP;
|
||||
} else if (!state->pressed) {
|
||||
return DOUBLE_TAP;
|
||||
}
|
||||
}
|
||||
return UNKNOWN_TAPS;
|
||||
}
|
||||
|
||||
/**
|
||||
* quote
|
||||
**/
|
||||
|
||||
static tap quote_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void quote_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
quote_state.state = cur_dance(state);
|
||||
switch(quote_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_QUOT); break;
|
||||
case SINGLE_HOLD: layer_on(_LEANDOWN); break;
|
||||
case DOUBLE_TAP: register_code(KC_MINS); break;
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_QUOT); unregister_code(KC_QUOT); register_code(KC_QUOT); break;
|
||||
}
|
||||
}
|
||||
void quote_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch(quote_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_QUOT); break;
|
||||
case SINGLE_HOLD: layer_off(_LEANDOWN); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_MINS); break;
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_QUOT); break;
|
||||
}
|
||||
quote_state.state = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* ralt / left bracket / left curly brace
|
||||
**/
|
||||
|
||||
static tap ralt_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void ralt_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
ralt_state.state = cur_dance(state);
|
||||
switch(ralt_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_LBRC); break;
|
||||
case SINGLE_HOLD: register_code(KC_RALT); break;
|
||||
case DOUBLE_TAP: register_code(KC_LSFT); register_code(KC_LBRC); break;
|
||||
// fallback to alt because it's the primary purpose of this key
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_RALT); break;
|
||||
}
|
||||
}
|
||||
void ralt_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch(ralt_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_LBRC); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_RALT); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_LBRC); unregister_code(KC_LSFT); break;
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_RALT); break;
|
||||
}
|
||||
ralt_state.state = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* rgui / right bracket / right curly brace
|
||||
**/
|
||||
|
||||
static tap rgui_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void rgui_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
rgui_state.state = cur_dance(state);
|
||||
switch(rgui_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_RBRC); break;
|
||||
case SINGLE_HOLD: register_code(KC_RGUI); break;
|
||||
case DOUBLE_TAP: register_code(KC_LSFT); register_code(KC_RBRC); break;
|
||||
// fallback to alt because it's the primary purpose of this key
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_RGUI); break;
|
||||
}
|
||||
}
|
||||
void rgui_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch(rgui_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_RBRC); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_RGUI); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_RBRC); unregister_code(KC_LSFT); break;
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_RGUI); break;
|
||||
}
|
||||
rgui_state.state = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the available tap dance keys
|
||||
**/
|
||||
|
||||
enum {
|
||||
TD_ALT_SHIFT = 0,
|
||||
TD_LQUT_MINS,
|
||||
TD_QUOT_LEAN_MINS,
|
||||
TD_LBRC_RALT_LCBR,
|
||||
TD_RBRC_RGUI_RCBR
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// Tap once for Alt, twice for Shift
|
||||
[TD_ALT_SHIFT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_RSFT),
|
||||
[TD_QUOT_LEAN_MINS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, quote_finished, quote_reset),
|
||||
[TD_LBRC_RALT_LCBR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ralt_finished, ralt_reset),
|
||||
[TD_RBRC_RGUI_RCBR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rgui_finished, rgui_reset)
|
||||
};
|
||||
|
217
keyboards/planck/keymaps/that_canadian/keymap.c
Normal file
217
keyboards/planck/keymaps/that_canadian/keymap.c
Normal file
@@ -0,0 +1,217 @@
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
// this is the style you want to emulate.
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#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 _QWERTY 0
|
||||
|
||||
#define _LOWER 2
|
||||
#define _RAISE 3
|
||||
|
||||
#define _FUNCTION 15
|
||||
#define _ADJUST 16
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Defines for task manager and such
|
||||
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Func | A | S | D | F | G | H | J | K | L | ; | Enter|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | ' |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
|
||||
{OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT},
|
||||
{KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL},
|
||||
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE},
|
||||
{_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
|
||||
{_______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
|
||||
{KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS},
|
||||
{_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Taskmg| | | | | | | | | | |caltde|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | RESET|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL},
|
||||
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}
|
||||
},
|
||||
|
||||
/* Function
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | Up | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | Left | Down |Right | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Caps | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNCTION] = {
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______},
|
||||
{KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
|
||||
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) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
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;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_NOTE_ARRAY(music_scale, false, 0);
|
||||
}
|
||||
|
||||
#endif
|
2
keyboards/planck/keymaps/that_canadian/readme.md
Normal file
2
keyboards/planck/keymaps/that_canadian/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# That-Canadian personal planck layout
|
||||
|
42
keyboards/preonic/keymaps/blake-newman/config.h
Normal file
42
keyboards/preonic/keymaps/blake-newman/config.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PREONIC_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
#endif
|
253
keyboards/preonic/keymaps/blake-newman/keymap.c
Normal file
253
keyboards/preonic/keymaps/blake-newman/keymap.c
Normal file
@@ -0,0 +1,253 @@
|
||||
/* Copyright 2015-2017 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/>.
|
||||
*/
|
||||
|
||||
#include "preonic.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
enum preonic_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_NUMPAD,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
NUMPAD,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_5, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
|
||||
{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_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
|
||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
|
||||
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||
{KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Numpad
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | | | | | , | 1 | 2 | 3 | | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUMPAD] = {
|
||||
{KC_ESC, _______, _______, KC_PGDN, KC_PGUP, KC_END, KC_HOME, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL},
|
||||
{KC_TAB, _______, KC_UP, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC},
|
||||
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_QUOT},
|
||||
{KC_LSFT, _______, _______, _______, _______, _______, KC_COMM, KC_P1, KC_P2, KC_P3, _______, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_P0, KC_PDOT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | | Up | | | | | -_ | - | + | = | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| | | | | | | | | | ¢ | € | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_BSPC},
|
||||
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{KC_LSFT, KC_PIPE, _______, _______, _______, _______, _______, _______, ALGR_T(KC_4), ALGR_T(KC_5), _______, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | | Up | | | | | - | _ | = | + | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| \ | | | | | | | | £ | $ | Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, KC_BSPC},
|
||||
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{KC_LSFT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, ALGR_T(KC_DLR), KC_DLR, KC_RSFT},
|
||||
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,LALT(KC_PSCR), LCTL(KC_PSCR), KC_PSCR},
|
||||
{KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, NUMPAD, KC_INS},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NUMPAD:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_NUMPAD);
|
||||
}
|
||||
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 BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
108
keyboards/preonic/keymaps/blake-newman/readme.md
Normal file
108
keyboards/preonic/keymaps/blake-newman/readme.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# Preonic layout by [Blake Newman](https://github.com/blake-newman)
|
||||
|
||||
## Layouts
|
||||
|
||||
### Qwerty
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Colemak
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | R | S | T | D | H | N | E | I | O | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Dvorak
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | A | O | E | U | I | D | H | T | N | S | / |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Numpad
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| | | | | | , | 1 | 2 | 3 | | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Lower
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | | Up | | | | | -_ | - | + | = | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| | | | | | | | | | ¢ | € | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Raise
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | | Up | | | | | - | _ | = | + | Bksp |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| \ | | | | | | | | £ | $ | Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### Adjust (Lower + Raise)
|
||||
```
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
0
keyboards/preonic/keymaps/blake-newman/rules.mk
Normal file
0
keyboards/preonic/keymaps/blake-newman/rules.mk
Normal file
@@ -10,11 +10,14 @@ Note that this is a complete replacement for the firmware, so you won't be
|
||||
using Bootmapper Client to change any keyboard settings, since not all the
|
||||
USB report options are supported.
|
||||
|
||||
This is an example based on the b.mini keyboard for making other keyboards
|
||||
compatible with QMK; fully supported boards have their own directory.
|
||||
|
||||
## Supported Boards
|
||||
|
||||
Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been
|
||||
tested so far (since it's the only one I own). But other boards that use
|
||||
the ps2avrGB firmware should work as well.
|
||||
- [b.fake](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bfake)
|
||||
- [b.mini](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bmini)
|
||||
- [pearl](https://github.com/qmk/qmk_firmware/tree/master/keyboards/pearl)
|
||||
|
||||
## Installing
|
||||
|
||||
|
60
keyboards/ps2avrGB/bmini.h
Normal file
60
keyboards/ps2avrGB/bmini.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
|
||||
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 BMINI_H
|
||||
#define BMINI_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
|
||||
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
|
||||
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
|
||||
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
|
||||
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
|
||||
K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
|
||||
){ \
|
||||
{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KE0 }, \
|
||||
{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \
|
||||
{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \
|
||||
{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \
|
||||
{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \
|
||||
{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \
|
||||
{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \
|
||||
{ K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \
|
||||
}
|
||||
|
||||
#define KC_KEYMAP( \
|
||||
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
|
||||
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
|
||||
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
|
||||
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
|
||||
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
|
||||
K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \
|
||||
{ KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \
|
||||
{ KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \
|
||||
{ KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \
|
||||
{ KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \
|
||||
{ KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \
|
||||
{ KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \
|
||||
{ KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \
|
||||
}
|
||||
|
||||
#endif
|
@@ -18,15 +18,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define VENDOR_ID 0x20A0
|
||||
#define PRODUCT_ID 0x422D
|
||||
// TODO: share these strings with usbconfig.h
|
||||
// Edit usbconfig.h to change these.
|
||||
#define MANUFACTURER winkeyless.kr
|
||||
#define PRODUCT ps2avrGB
|
||||
|
||||
/* matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#define NO_UART 1
|
||||
#define BOOTLOADHID_BOOTLOADER 1
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||
|
37
keyboards/ps2avrGB/keymaps/default/keymap.c
Normal file
37
keyboards/ps2avrGB/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
|
||||
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 "bmini.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
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_HOME,KC_END,
|
||||
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_DEL,
|
||||
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_BSLS, KC_INS,
|
||||
MO(0), 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_PGUP,
|
||||
KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,
|
||||
KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT
|
||||
),
|
||||
[1] = KEYMAP(
|
||||
KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,
|
||||
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_DEL,
|
||||
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_INS,
|
||||
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,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_RGHT
|
||||
),
|
||||
};
|
@@ -22,13 +22,11 @@
|
||||
|
||||
// Layer shorthand
|
||||
#define _CM 0 // Colemak
|
||||
#define _QW 1 // Qwerty
|
||||
#define _DV 2 // Dvorak
|
||||
#define _NB 3 // Numbers
|
||||
#define _FN 4 // Function
|
||||
#define _SYL 5 // Symbols left
|
||||
#define _SYR 6 // Symbols right
|
||||
#define _NAV 7 // Navigation
|
||||
#define _NB 1 // Numbers
|
||||
#define _FN 2 // Function
|
||||
#define _SYL 3 // Symbols left
|
||||
#define _SYR 4 // Symbols right
|
||||
#define _NAV 5 // Navigation
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
@@ -42,15 +40,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------|
|
||||
* | | sft or Z | nb or X | sym or C | V | nav or B | | | | nav or K | M | sym or , | nb or . | sft or / | |
|
||||
* |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------|
|
||||
* | LSHIFT | LCTRL | LALT | LGUI | | SPACE | LCTRL | DEL | LALT | BACKSP | | RGUI | RALT | RCTRL | RSHIFT |
|
||||
* | LSHIFT | LCTRL | LALT | LGUI | CTRL ' | SPACE | LCTRL | DEL | LALT | BACKSP | RGUI | RGUI | RALT | RCTRL | RSHIFT |
|
||||
* '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
*/
|
||||
[_CM] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______ },
|
||||
{ _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT },
|
||||
{ _______, SFT_T(KC_Z), LT(_NB, KC_X), LT(_SYL, KC_C), KC_V, LT(_NAV, KC_B), _______, _______, _______, LT(_NAV, KC_K), KC_M, LT(_SYR, KC_COMM), LT(_FN, KC_DOT), SFT_T(KC_SLSH), _______ },
|
||||
{ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_QUOT), KC_SPC, KC_LCTL, KC_DEL , KC_LALT, KC_BSPC, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT },
|
||||
{ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_QUOT), KC_SPC, KC_LCTL, KC_DEL , KC_LALT, KC_BSPC, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT },
|
||||
},
|
||||
|
||||
/* Numbers _NB / Functions _FN
|
||||
@@ -93,14 +91,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+--------+--------+---------------+--------+--------+--------+--------+--------+--------+--------+------------------+--------+--------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* '-------------------------------------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
*/
|
||||
[_SYL] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, UK_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ },
|
||||
{ _______, KC_DLR, KC_PERC, KC_PLUS, KC_EQL, _______, _______, _______, _______, UK_QUOT, KC_LPRN, KC_RPRN, KC_QUOT, UK_AT, _______ },
|
||||
{ _______, KC_CIRC, KC_AMPR, LT(_SYL, KC_C), UK_PIPE, _______, _______, _______, _______, KC_LABK, KC_LBRC, KC_RBRC, KC_RABK, KC_GRV, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
},
|
||||
},
|
||||
[_SYR] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, KC_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ },
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- Mode:C; c-basic-offset:2; tab-width:2; indent-tabs-mode:nil; evil-indent-convert-tabs:t; -*- */
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
@@ -7,13 +9,17 @@
|
||||
* See `readme.md` for notes on each define.
|
||||
*/
|
||||
|
||||
// Personal preference (enable by passing EXTRAFLAGS=... to make).
|
||||
// #define CFQ_USE_MOMENTARY_LAYER_KEYS
|
||||
// #define CFQ_USE_EXPEREMENTAL_LAYER
|
||||
/* Personal preference (enable by passing EXTRAFLAGS=... to make). */
|
||||
/* #define CFQ_USE_MOMENTARY_LAYER_KEYS */
|
||||
|
||||
/* Holding right/left or left/right shift for single or double quote pair */
|
||||
/* #define CFQ_USE_SHIFT_QUOTES */
|
||||
|
||||
// keep enabled for now
|
||||
#define CFQ_USE_DYNAMIC_MACRO
|
||||
|
||||
#if !defined(CFQ_USER_KEY0)
|
||||
# define CFQ_USER_KEY0 KC_BSPC
|
||||
#endif
|
||||
#if !defined(CFQ_USER_KEY1)
|
||||
# define CFQ_USER_KEY1 CFQ_KC_FN1
|
||||
#endif
|
||||
@@ -21,37 +27,156 @@
|
||||
# define CFQ_USER_KEY2 KC_INS
|
||||
#endif
|
||||
#if !defined(CFQ_USER_KEY3)
|
||||
# ifdef CFQ_USE_EXPEREMENTAL_LAYER
|
||||
# define CFQ_USER_KEY3 CFQ_KC_FN3
|
||||
# else
|
||||
# define CFQ_USER_KEY3 KC_CAPS
|
||||
# endif
|
||||
# define CFQ_USER_KEY3 KC_NLCK
|
||||
#endif
|
||||
#if !defined(CFQ_USER_KEY4)
|
||||
# define CFQ_USER_KEY4 KC_SPC
|
||||
# define CFQ_USER_KEY4 KC_BSPC
|
||||
#endif
|
||||
#if !defined(CFQ_USER_KEY5)
|
||||
# define CFQ_USER_KEY5 KC_ENT
|
||||
# define CFQ_USER_KEY5 KC_DELT
|
||||
#endif
|
||||
#if !defined(CFQ_USER_KEY6)
|
||||
# define CFQ_USER_KEY6 CFQ_KC_FN2
|
||||
# define CFQ_USER_KEY6 KC_CAPS
|
||||
#endif
|
||||
#if !defined(CFQ_USER_KEY7)
|
||||
# define CFQ_USER_KEY7 CFQ_KC_FN1
|
||||
# define CFQ_USER_KEY7 CFQ_KC_FN3
|
||||
#endif
|
||||
#if !defined(CFQ_USER_KEY8)
|
||||
# define CFQ_USER_KEY8 KC_DEL
|
||||
#endif
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define SYMB 1 // symbols
|
||||
#define MDIA 2 // media keys
|
||||
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
|
||||
# define EXPR 3 // experimental keys
|
||||
#ifndef CFQ_WORD_A
|
||||
#define CFQ_WORD_A ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_B
|
||||
#define CFQ_WORD_B ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_C
|
||||
#define CFQ_WORD_C ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_D
|
||||
#define CFQ_WORD_D ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_E
|
||||
#define CFQ_WORD_E ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_F
|
||||
#define CFQ_WORD_F ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_G
|
||||
#define CFQ_WORD_G ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_H
|
||||
#define CFQ_WORD_H ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_I
|
||||
#define CFQ_WORD_I ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_J
|
||||
#define CFQ_WORD_J ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_K
|
||||
#define CFQ_WORD_K ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_L
|
||||
#define CFQ_WORD_L ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_M
|
||||
#define CFQ_WORD_M ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_N
|
||||
#define CFQ_WORD_N ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_O
|
||||
#define CFQ_WORD_O ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_P
|
||||
#define CFQ_WORD_P ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_Q
|
||||
#define CFQ_WORD_Q ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_R
|
||||
#define CFQ_WORD_R ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_S
|
||||
#define CFQ_WORD_S ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_T
|
||||
#define CFQ_WORD_T ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_U
|
||||
#define CFQ_WORD_U ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_V
|
||||
#define CFQ_WORD_V ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_W
|
||||
#define CFQ_WORD_W ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_X
|
||||
#define CFQ_WORD_X ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_Y
|
||||
#define CFQ_WORD_Y ""
|
||||
#endif
|
||||
#ifndef CFQ_WORD_Z
|
||||
#define CFQ_WORD_Z ""
|
||||
#endif
|
||||
|
||||
/* lower and title capitals versions (setup at start). */
|
||||
static char *cfq_word_lut[2][26] = {
|
||||
{
|
||||
CFQ_WORD_A, CFQ_WORD_B, CFQ_WORD_C, CFQ_WORD_D, CFQ_WORD_E, CFQ_WORD_F,
|
||||
CFQ_WORD_G, CFQ_WORD_H, CFQ_WORD_I, CFQ_WORD_J, CFQ_WORD_K, CFQ_WORD_L,
|
||||
CFQ_WORD_M, CFQ_WORD_N, CFQ_WORD_O, CFQ_WORD_P, CFQ_WORD_Q, CFQ_WORD_R,
|
||||
CFQ_WORD_S, CFQ_WORD_T, CFQ_WORD_U, CFQ_WORD_V, CFQ_WORD_W, CFQ_WORD_X,
|
||||
CFQ_WORD_Y, CFQ_WORD_Z,
|
||||
},
|
||||
{NULL}
|
||||
};
|
||||
|
||||
/* Storage for title-caps strings. */
|
||||
static char cfq_word_lut_title_caps[
|
||||
sizeof(CFQ_WORD_A) + sizeof(CFQ_WORD_B) + sizeof(CFQ_WORD_C) + sizeof(CFQ_WORD_D) +
|
||||
sizeof(CFQ_WORD_E) + sizeof(CFQ_WORD_F) + sizeof(CFQ_WORD_G) + sizeof(CFQ_WORD_H) +
|
||||
sizeof(CFQ_WORD_I) + sizeof(CFQ_WORD_J) + sizeof(CFQ_WORD_K) + sizeof(CFQ_WORD_L) +
|
||||
sizeof(CFQ_WORD_M) + sizeof(CFQ_WORD_N) + sizeof(CFQ_WORD_O) + sizeof(CFQ_WORD_P) +
|
||||
sizeof(CFQ_WORD_Q) + sizeof(CFQ_WORD_R) + sizeof(CFQ_WORD_S) + sizeof(CFQ_WORD_T) +
|
||||
sizeof(CFQ_WORD_U) + sizeof(CFQ_WORD_V) + sizeof(CFQ_WORD_W) + sizeof(CFQ_WORD_X) +
|
||||
sizeof(CFQ_WORD_Y) + sizeof(CFQ_WORD_Z)
|
||||
];
|
||||
|
||||
#define BASE 0 /* default layer */
|
||||
#define SYMB 1 /* symbols */
|
||||
#define MDIA 2 /* media keys */
|
||||
#define WORD 3 /* experimental keys */
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
PLACEHOLDER = SAFE_RANGE, /* can always be here */
|
||||
RGB_SLD,
|
||||
|
||||
M_BRACKET_IN_CBR,
|
||||
M_BRACKET_IN_PRN,
|
||||
M_BRACKET_IN_BRC,
|
||||
M_BRACKET_IN_ANG,
|
||||
M_BRACKET_OUT_CBR,
|
||||
M_BRACKET_OUT_PRN,
|
||||
M_BRACKET_OUT_BRC,
|
||||
M_BRACKET_OUT_ANG,
|
||||
M_ARROW_RMINUS,
|
||||
M_ARROW_LMINUS,
|
||||
M_ARROW_REQL,
|
||||
M_ARROW_LEQL,
|
||||
|
||||
/* allow user defined words for each character:
|
||||
* use CFQ_WORD_[A-Z] defines. */
|
||||
M_WORD_A, M_WORD_B, M_WORD_C, M_WORD_D, M_WORD_E, M_WORD_F,
|
||||
M_WORD_G, M_WORD_H, M_WORD_I, M_WORD_J, M_WORD_K, M_WORD_L,
|
||||
M_WORD_M, M_WORD_N, M_WORD_O, M_WORD_P, M_WORD_Q, M_WORD_R,
|
||||
M_WORD_S, M_WORD_T, M_WORD_U, M_WORD_V, M_WORD_W, M_WORD_X,
|
||||
M_WORD_Y, M_WORD_Z,
|
||||
|
||||
#ifdef CFQ_USE_DYNAMIC_MACRO
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
#endif
|
||||
@@ -61,30 +186,6 @@ enum custom_keycodes {
|
||||
#include "dynamic_macro.h"
|
||||
#endif
|
||||
|
||||
// macros
|
||||
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
|
||||
#define M_SPACES_1 2
|
||||
#define M_SPACES_2 3
|
||||
#define M_SPACES_3 4
|
||||
#define M_SPACES_4 5
|
||||
#define M_SPACES_5 6
|
||||
#define M_SPACES_6 7
|
||||
#define M_SPACES_7 8
|
||||
#define M_SPACES_8 9
|
||||
#endif
|
||||
#define M_BRACKET_IN_CBR 10
|
||||
#define M_BRACKET_IN_PRN 11
|
||||
#define M_BRACKET_IN_BRC 12
|
||||
#define M_BRACKET_IN_ANG 13
|
||||
#define M_BRACKET_OUT_CBR 14
|
||||
#define M_BRACKET_OUT_PRN 15
|
||||
#define M_BRACKET_OUT_BRC 16
|
||||
#define M_BRACKET_OUT_ANG 17
|
||||
#define M_ARROW_RMINUS 18
|
||||
#define M_ARROW_LMINUS 19
|
||||
#define M_ARROW_REQL 20
|
||||
#define M_ARROW_LEQL 21
|
||||
|
||||
#ifdef CFQ_USE_MOMENTARY_LAYER_KEYS
|
||||
#define CFQ_KC_FN1 MO(1)
|
||||
#define CFQ_KC_FN2 MO(2)
|
||||
@@ -99,7 +200,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Grave | ! | @ | # | $ | % | { | | } | ^ | & | * | - | = | BSpace |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | W | E | R | T | ( | | ) | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||
@@ -109,32 +210,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Ins |CapsLk| | Home | End |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | ~L2 | | PgUp | | |
|
||||
* |Space |Enter |------| |------|Enter |Space |
|
||||
* | | | ~L1 | | PgDn | | |
|
||||
* | Ins |NumClk| | Home | End |
|
||||
* ,------+------+------| |------+------+------.
|
||||
* | | |CapsLk| | PgUp | | |
|
||||
* |BSpace| Del |------| |------| ~L2 |Enter |
|
||||
* | | | ~L3 | | PgDn | | |
|
||||
* `--------------------' `--------------------'
|
||||
*
|
||||
* Optional overrides: see CFQ_USER_KEY# defines.
|
||||
*
|
||||
* -------+------+------+------+------+
|
||||
* | | | | USR1 | |
|
||||
* `----------------------------------'
|
||||
*
|
||||
* ,-------------.
|
||||
* | USR2 | USR3 |
|
||||
* ,------|------|------|
|
||||
* | | | USR6 |
|
||||
* | USR4 | USR5 |------|
|
||||
* | | | USR7 |
|
||||
* `--------------------'
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | USR0 |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | USR1 | | | | | | | USR8 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | USR2 | USR3 | | | |
|
||||
* ,------+------+------| |------+------+------.
|
||||
* | | | USR6 | | | | |
|
||||
* | USR4 | USR5 |------| |------| | |
|
||||
* | | | USR7 | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[BASE] = LAYOUT_ergodox( // layer 0 : default
|
||||
// left hand
|
||||
/* If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
* Otherwise, it needs KC_* */
|
||||
[BASE] = LAYOUT_ergodox( /* layer 0 : default */
|
||||
/* left hand */
|
||||
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LCBR,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
@@ -143,48 +251,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
CFQ_USER_KEY2, CFQ_USER_KEY3,
|
||||
CFQ_USER_KEY6,
|
||||
CFQ_USER_KEY4, CFQ_USER_KEY5, CFQ_USER_KEY7,
|
||||
// right hand
|
||||
KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, KC_BSPC,
|
||||
/* right hand */
|
||||
KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, CFQ_USER_KEY0,
|
||||
KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_LEFT, KC_DOWN,KC_UP, KC_RGHT, KC_DELT,
|
||||
KC_LEFT, KC_DOWN,KC_UP, KC_RGHT, CFQ_USER_KEY8,
|
||||
KC_HOME, KC_END,
|
||||
KC_PGUP,
|
||||
#ifdef CFQ_USE_SWAP_RIGHT_SPACE_ENTER
|
||||
KC_PGDN, KC_SPC, KC_ENT
|
||||
#else
|
||||
KC_PGDN, KC_ENT, KC_SPC
|
||||
#endif
|
||||
),
|
||||
/* Keymap 1: Symbol layer
|
||||
KC_PGDN, CFQ_KC_FN2, KC_ENT
|
||||
),/* Keymap 1: KeyPad, Macro Record
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | {} | | }{ | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | => | () | | )( | <= | 7 | 8 | 9 | \ | F11 |
|
||||
* | | | | | | | {} | | }{ | |NumLck| / | * | - | |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | => | () | | )( | <= | 7 | 8 | 9 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | -> |------| |------| <- | 4 | 5 | 6 | * | F12 |
|
||||
* | | | | | | -> |------| |------| <- | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| [] | | ][ |------+------+------+------+------+--------|
|
||||
* | | | | | | <> | | | | >< | 1 | 2 | 3 | - | |
|
||||
* | | | | | | <> | | | | >< | 1 | 2 | 3 | Enter| |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | 0 | | . | + | |
|
||||
* | | | | | | | 0 | | . | Enter| |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,---------------.
|
||||
* |Start1|Start2| | | |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Stop | | | | |
|
||||
* |Play1 |Play2 |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
* ,-------------. ,--------------.
|
||||
* |Start1|Start2| | | |
|
||||
* ,------+------+------| |------+-------+------.
|
||||
* | | | Stop | | | | |
|
||||
* |Play1 |Play2 |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `---------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
/* SYMBOLS */
|
||||
[SYMB] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, M(M_BRACKET_IN_CBR),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_ARROW_REQL), M(M_BRACKET_IN_PRN),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_ARROW_RMINUS),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_BRACKET_IN_ANG), M(M_BRACKET_IN_BRC),
|
||||
/* left hand */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_CBR,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_ARROW_REQL, M_BRACKET_IN_PRN,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_ARROW_RMINUS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_ANG, M_BRACKET_IN_BRC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
#ifdef CFQ_USE_DYNAMIC_MACRO
|
||||
DYN_REC_START1, DYN_REC_START2,
|
||||
@@ -195,21 +298,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
#endif
|
||||
// right hand
|
||||
M(M_BRACKET_OUT_CBR), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||
M(M_BRACKET_OUT_PRN), M(M_ARROW_LEQL), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, KC_F11,
|
||||
M(M_ARROW_LMINUS), KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, KC_F12,
|
||||
M(M_BRACKET_OUT_BRC), M(M_BRACKET_OUT_ANG), KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS, KC_TRNS,
|
||||
KC_KP_0, KC_TRNS, KC_KP_DOT, KC_KP_PLUS, KC_TRNS,
|
||||
/* right hand */
|
||||
M_BRACKET_OUT_CBR, KC_TRNS, KC_NLCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS,
|
||||
M_BRACKET_OUT_PRN, M_ARROW_LEQL, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS,
|
||||
M_ARROW_LMINUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS,
|
||||
M_BRACKET_OUT_BRC, M_BRACKET_OUT_ANG, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_TRNS,
|
||||
KC_KP_0, KC_TRNS, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
/* Keymap 2: F-Keys, media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | | | MsUp | | |MWhlUp| | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| Left | Down | Up |Right | | |
|
||||
@@ -220,15 +323,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | MRwd | MFwd | | MPrv | MNxt |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* ,------+------+------| |------+------+------.
|
||||
* | | | | |VolUp | | |
|
||||
* | | |------| |------| Mute | Play |
|
||||
* | Mute | |------| |------| | Play |
|
||||
* | | | | |VolDn | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
/* MEDIA AND MOUSE */
|
||||
[MDIA] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
/* left hand */
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_WH_U,
|
||||
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
|
||||
@@ -236,132 +339,76 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MRWD, KC_MFFD,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
/* right hand */
|
||||
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_LEFT, KC_DOWN, KC_UP, KC_RGHT, 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_MPRV, KC_MNXT,
|
||||
KC_VOLU,
|
||||
KC_VOLD, KC_MUTE, KC_MPLY
|
||||
KC_VOLD, KC_TRNS, KC_MPLY
|
||||
),
|
||||
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
|
||||
/* Keymap 3: My own testing keys!
|
||||
/* Keymap 3: Entire Words (one for each key)
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | { | } | | } | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | ( | ) | | ) | | | Spc7 | Spc8 | | | | |
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | Q | W | E | R | T | | | | Y | U | I | O | P | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | [ | ] | |------| |------| Spc4 | Spc5 | Spc6 | | | |
|
||||
* |--------+------+------+------+------+------| ] | | |------+------+------+------+------+--------|
|
||||
* | | | | < | > | | | | | Spc1 | Spc2 | Spc3 | | | |
|
||||
* | | A | S | D | F | G |------| |------| H | J | K | L | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Z | X | C | V | B | | | | N | M | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* ,------+------+------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
|
||||
// EXPERIMENT
|
||||
[EXPR] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS, KC_RCBR,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_RPRN,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT), KC_TRNS, KC_RBRC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(M_SPACES_7), M(M_SPACES_8), KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, M(M_SPACES_4), M(M_SPACES_5), M(M_SPACES_6), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(M_SPACES_1), M(M_SPACES_2), M(M_SPACES_3), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/* WORDS */
|
||||
[WORD] = LAYOUT_ergodox(
|
||||
/* left hand */
|
||||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
KC_TRNS, M_WORD_Q, M_WORD_W, M_WORD_E, M_WORD_R, M_WORD_T, KC_TRNS,
|
||||
KC_TRNS, M_WORD_A, M_WORD_S, M_WORD_D, M_WORD_F, M_WORD_G,
|
||||
KC_TRNS, M_WORD_Z, M_WORD_X, M_WORD_C, M_WORD_V, M_WORD_B, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
/* right hand */
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
|
||||
KC_TRNS, M_WORD_Y, M_WORD_U, M_WORD_I, M_WORD_O, M_WORD_P, KC_TRNS,
|
||||
M_WORD_H, M_WORD_J, M_WORD_K, M_WORD_L, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, M_WORD_N, M_WORD_M, 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
|
||||
),
|
||||
#endif // CFQ_USE_EXPEREMENTAL_LAYER
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols)
|
||||
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA), // FN2 - Momentary Layer 2 (Media)
|
||||
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
|
||||
[3] = ACTION_LAYER_TAP_TOGGLE(EXPR), // FN3 - Momentary Layer 3 (Expremental)
|
||||
#endif
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), /* FN1 - Momentary Layer 1 (Symbols) */
|
||||
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA), /* FN2 - Momentary Layer 2 (Media) */
|
||||
[3] = ACTION_LAYER_TAP_TOGGLE(WORD), /* FN3 - Momentary Layer 3 (Words) */
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
|
||||
case M_SPACES_1:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), END); }
|
||||
case M_SPACES_2:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), END); }
|
||||
case M_SPACES_3:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), END); }
|
||||
case M_SPACES_4:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), END); }
|
||||
case M_SPACES_5:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
|
||||
case M_SPACES_6:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
|
||||
case M_SPACES_7:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
|
||||
case M_SPACES_8:
|
||||
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
|
||||
#endif // CFQ_USE_EXPEREMENTAL_LAYER
|
||||
case M_BRACKET_IN_CBR: // {}
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(LBRC), T(RBRC), U(LSFT), T(LEFT), END); }
|
||||
case M_BRACKET_IN_PRN: // ()
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(9), T(0), U(LSFT), T(LEFT), END); }
|
||||
case M_BRACKET_IN_BRC: // []
|
||||
if (record->event.pressed) { return MACRO(T(LBRC), T(RBRC), T(LEFT), END); }
|
||||
case M_BRACKET_IN_ANG: // <>
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(COMM), T(DOT), U(LSFT), T(LEFT), END); }
|
||||
case M_BRACKET_OUT_CBR: // }{
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(RBRC), T(LBRC), U(LSFT), T(LEFT), END); }
|
||||
case M_BRACKET_OUT_PRN: // )(
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(0), T(9), U(LSFT), T(LEFT), END); }
|
||||
case M_BRACKET_OUT_BRC: // ][
|
||||
if (record->event.pressed) { return MACRO(T(RBRC), T(LBRC), T(LEFT), END); }
|
||||
case M_BRACKET_OUT_ANG: // ><
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(DOT), T(COMM), U(LSFT), T(LEFT), END); }
|
||||
|
||||
case M_ARROW_RMINUS:
|
||||
if (record->event.pressed) { return MACRO(T(MINUS), D(LSFT), T(DOT), U(LSFT), END); }
|
||||
case M_ARROW_LMINUS:
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(COMM), U(LSFT), T(MINUS), END); }
|
||||
case M_ARROW_REQL:
|
||||
if (record->event.pressed) { return MACRO(T(EQL), D(LSFT), T(DOT), U(LSFT), END); }
|
||||
case M_ARROW_LEQL:
|
||||
if (record->event.pressed) { return MACRO(D(LSFT), T(COMM), U(LSFT), T(EQL), END); }
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
#define WITHOUT_MODS(...) \
|
||||
do { \
|
||||
uint8_t _real_mods = get_mods(); \
|
||||
clear_mods(); \
|
||||
{ __VA_ARGS__ } \
|
||||
set_mods(_real_mods); \
|
||||
} while (0)
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef CFQ_USE_DYNAMIC_MACRO
|
||||
@@ -370,19 +417,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
#endif
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
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;
|
||||
/* dynamically generate these. */
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
@@ -391,16 +426,146 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case M_BRACKET_IN_CBR: /* {} */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("{}" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_BRACKET_IN_PRN: /* () */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("()" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_BRACKET_IN_BRC: /* [] */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("[]" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_BRACKET_IN_ANG: /* <> */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("<>" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_BRACKET_OUT_CBR: /* }{ */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("}{" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_BRACKET_OUT_PRN: /* )( */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(")(" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_BRACKET_OUT_BRC: /* ][ */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("][" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_BRACKET_OUT_ANG: /* >< */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("><" SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_ARROW_LMINUS: /* <- */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("<-");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_ARROW_RMINUS: /* -> */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("->");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_ARROW_LEQL: /* <= */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("<=");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case M_ARROW_REQL: /* => */
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("=>");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
#ifdef CFQ_USE_SHIFT_QUOTES
|
||||
case KC_LSHIFT: /* '' */
|
||||
if (record->event.pressed && (keyboard_report->mods & (MOD_BIT(KC_RSFT)))) {
|
||||
WITHOUT_MODS({
|
||||
SEND_STRING("''" SS_TAP(X_LEFT) SS_DOWN(X_RSHIFT) SS_DOWN(X_LSHIFT));
|
||||
});
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case KC_RSHIFT: /* "" */
|
||||
if (record->event.pressed && (keyboard_report->mods & (MOD_BIT(KC_LSFT)))) {
|
||||
WITHOUT_MODS({
|
||||
SEND_STRING("\x22\x22" SS_TAP(X_LEFT) SS_DOWN(X_LSHIFT) SS_DOWN(X_RSHIFT));
|
||||
});
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
#endif /* CFQ_USE_SHIFT_QUOTES */
|
||||
case M_WORD_A...M_WORD_Z:
|
||||
{
|
||||
uint8_t shift_index = (keyboard_report->mods & (MOD_BIT(KC_RSFT) | MOD_BIT(KC_LSFT))) ? 1 : 0;
|
||||
const char *word = cfq_word_lut[shift_index][keycode - M_WORD_A];
|
||||
if (record->event.pressed) {
|
||||
if (*word) {
|
||||
WITHOUT_MODS({
|
||||
send_string(word);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
/* Runs just one time when the keyboard initializes. */
|
||||
void matrix_init_user(void) {
|
||||
|
||||
/* Duplicate 'cfq_word_lut[0][...]' into 'cfq_word_lut[1][...]' */
|
||||
{
|
||||
char *d = cfq_word_lut_title_caps;
|
||||
for (uint16_t i = 0; i < 26; i++) {
|
||||
char *s = cfq_word_lut[0][i];
|
||||
cfq_word_lut[1][i] = d;
|
||||
while ((*d++ = *s++)) {}
|
||||
}
|
||||
}
|
||||
/* Title caps. */
|
||||
for (uint16_t i = 0; i < 26; i++) {
|
||||
char *w = cfq_word_lut[1][i];
|
||||
bool prev_is_alpha = false;
|
||||
if (*w) {
|
||||
while (*w) {
|
||||
bool is_lower = (*w >= 'a' && *w <= 'z');
|
||||
bool is_upper = (*w >= 'A' && *w <= 'Z');
|
||||
if (prev_is_alpha == false && is_lower) {
|
||||
*w -= ('a' - 'A');
|
||||
}
|
||||
prev_is_alpha = is_lower || is_upper;
|
||||
w++;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
/* Runs constantly in the background, in a loop. */
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
@@ -416,13 +581,11 @@ void matrix_scan_user(void) {
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
// none
|
||||
/* none */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,11 @@
|
||||
- This layout aims to balance muscle memory from a typical QWERTY layout
|
||||
with having keys used for software development easily accessible.
|
||||
|
||||
- Arrow keys follow VIM convention (the media layer even uses arrow keys for HJKL).
|
||||
The this layout is a normalized qwerty,
|
||||
with some configurable keys left thumb cluster so you can use it more as needed.
|
||||
|
||||
- Arrow keys follow VIM convention
|
||||
(the media layer even uses arrow keys for HJKL).
|
||||
|
||||
- On the top row only symbols are used (not numbers),
|
||||
it's expected the symbol layer's number-pad layout will be used for numbers.
|
||||
@@ -17,33 +21,37 @@
|
||||
at the same key locations to type matching pairs.
|
||||
|
||||
- The extra space-bar on the lower-left looks like it's in an obscure location,
|
||||
however using the larger thumb cluster ended up being more of a reach while typing.
|
||||
|
||||
- L3 is currently only used if `CFQ_USE_EXPEREMENTAL_LAYER` is defined,
|
||||
this is a layer to place extra functionality and test new keys.
|
||||
however using the larger thumb cluster
|
||||
ended up being more of a reach while typing.
|
||||
|
||||
## Configuration
|
||||
|
||||
Some optional behavior is configurable without editing the code
|
||||
using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make.
|
||||
|
||||
- `CFQ_USER_KEY1` (1..7) are used for custom-keys
|
||||
- `CFQ_USE_MOMENTARY_LAYER_KEYS` is used to prevent layer keys from toggling when tapped.
|
||||
- `CFQ_USE_SWAP_RIGHT_SPACE_ENTER` swap Enter and Space on the right hand thumb cluster.
|
||||
While asymmetric, it makes Enter more easily accessible.
|
||||
- `CFQ_USE_EXPEREMENTAL_LAYER` defines an extra layer for misc extra keys/macros.
|
||||
When set, Caps-Lock is replace by Layer3.
|
||||
Currently it's mostly empty.
|
||||
- `CFQ_USER_KEY0`
|
||||
(0..7) are used for custom-keys
|
||||
- `CFQ_USE_MOMENTARY_LAYER_KEYS`
|
||||
is used to prevent layer keys from toggling when tapped.
|
||||
- `CFQ_USE_SHIFT_QUOTES`
|
||||
an optional handy shortcut for writing quotes that inserts the
|
||||
cursor between the quotation marks.
|
||||
|
||||
Holding LShift, then RShift types: "" (then presses left).
|
||||
|
||||
Holding RShift, then LShift types: '' (then presses left).
|
||||
|
||||
- `CFQ_WORD_[A-Z]`
|
||||
defines can bind a key to an entire user defined word.
|
||||
|
||||
|
||||
|
||||
## Keymap 0: Basic layer
|
||||
|
||||
```
|
||||
Keymap 0: Basic layer
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| Grave | ! | @ | # | $ | % | { | | } | ^ | & | * | - | = | BSpace |
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
| Tab | Q | W | E | R | T | ( | | ) | Y | U | I | O | P | \ |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||
@@ -53,29 +61,36 @@ Keymap 0: Basic layer
|
||||
| LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| Ins |CapsLk| | Home | End |
|
||||
,------|------|------| |------+------+------.
|
||||
| | | ~L2 | | PgUp | | |
|
||||
|Space |Enter |------| |------|Enter |Space |
|
||||
| | | ~L1 | | PgDn | | |
|
||||
| Ins |NumClk| | Home | End |
|
||||
,------+------+------| |------+------+------.
|
||||
| | |CapsLk| | PgUp | | |
|
||||
|BSpace| Del |------| |------| ~L2 |Enter |
|
||||
| | | ~L3 | | PgDn | | |
|
||||
`--------------------' `--------------------'
|
||||
|
||||
Optional overrides: see CFQ_USER_KEY# defines
|
||||
Optional overrides: see CFQ_USER_KEY# defines.
|
||||
|
||||
-------+------+------+------+------+
|
||||
| | | | USR1 | |
|
||||
`----------------------------------'
|
||||
|
||||
,-------------.
|
||||
| USR2 | USR3 |
|
||||
,------|------|------|
|
||||
| | | USR6 |
|
||||
| USR4 | USR5 |------|
|
||||
| | | USR7 |
|
||||
`--------------------'
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| | | | | | | | | | | | | | | USR0 |
|
||||
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
| | | | | | | | | | | | | | | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | | | | | |------| |------| | | | | | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | | | | | | | | | | | | | | |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
| | | | USR1 | | | | | | | USR8 |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| USR2 | USR3 | | | |
|
||||
,------+------+------| |------+------+------.
|
||||
| | | USR6 | | | | |
|
||||
| USR4 | USR5 |------| |------| | |
|
||||
| | | USR7 | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
## Keymap 1: Symbol layer
|
||||
## Keymap 1: KeyPad, Macro Record
|
||||
|
||||
Notes:
|
||||
|
||||
@@ -84,31 +99,31 @@ Notes:
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 | F5 | {} | | }{ | F6 | F7 | F8 | F9 | F10 | |
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
| | | | | | => | () | | )( | <= | 7 | 8 | 9 | \ | F11 |
|
||||
| | | | | | | {} | | }{ | |NumLck| / | * | - | |
|
||||
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
| | | | | | => | () | | )( | <= | 7 | 8 | 9 | + | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | | | | | -> |------| |------| <- | 4 | 5 | 6 | * | F12 |
|
||||
| | | | | | -> |------| |------| <- | 4 | 5 | 6 | + | |
|
||||
|--------+------+------+------+------+------| [] | | ][ |------+------+------+------+------+--------|
|
||||
| | | | | | <> | | | | >< | 1 | 2 | 3 | - | |
|
||||
| | | | | | <> | | | | >< | 1 | 2 | 3 | Enter| |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
| | | | | | | 0 | | . | + | |
|
||||
| | | | | | | 0 | | . | Enter| |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,---------------.
|
||||
|Start1|Start2| | | |
|
||||
,------|------|------| |------+--------+------.
|
||||
| | | Stop | | | | |
|
||||
|Play1 |Play2 |------| |------| | |
|
||||
| | | | | | | |
|
||||
`--------------------' `----------------------'
|
||||
,-------------. ,--------------.
|
||||
|Start1|Start2| | | |
|
||||
,------+------+------| |------+-------+------.
|
||||
| | | Stop | | | | |
|
||||
|Play1 |Play2 |------| |------| | |
|
||||
| | | | | | | |
|
||||
`--------------------' `---------------------'
|
||||
```
|
||||
|
||||
## Keymap 2: Media and mouse keys
|
||||
## Keymap 2: Keymap 2: Media and mouse keys
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| | | | | | | | | | | | | | | |
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
| | | | MsUp | | |MWhlUp| | | | | | | | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | |MsLeft|MsDown|MsRght| |------| |------| Left | Down | Up |Right | | |
|
||||
@@ -119,15 +134,59 @@ Notes:
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| MRwd | MFwd | | MPrv | MNxt |
|
||||
,------|------|------| |------+------+------.
|
||||
,------+------+------| |------+------+------.
|
||||
| | | | |VolUp | | |
|
||||
| | |------| |------| Mute | Play |
|
||||
| Mute | |------| |------| | Play |
|
||||
| | | | |VolDn | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
## Keymap 3: K-Keys & User defined words
|
||||
|
||||
This is for assigning whole words to single keys.
|
||||
You can define the arguments (which must be quoted) using: `CFQ_WORD_[A-Z]`
|
||||
eg: `-DCFQ_WORD_E=\"my@email.com\"`
|
||||
|
||||
```
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
| | Q | W | E | R | T | | | | Y | U | I | O | P | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | A | S | D | F | G |------| |------| H | J | K | L | | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| | Z | X | C | V | B | | | | N | M | | | | |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
| | | | | | | | | | | |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| | | | | |
|
||||
,------+------+------| |------+------+------.
|
||||
| | | | | | | |
|
||||
| | |------| |------| | |
|
||||
| | | | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
- 2018/03/08
|
||||
Add `CFQ_USE_SHIFT_QUOTES` option.
|
||||
Add `CFQ_USER_KEY8` key.
|
||||
|
||||
When holding shift `CFQ_WORD_[A-Z]` use title caps.
|
||||
|
||||
- 2018/03/06
|
||||
Add layer for user defined words (replaces `CFQ_USE_EXPEREMENTAL_LAYER`).
|
||||
|
||||
Minor changes to thumb cluster.
|
||||
|
||||
Move backspace to left thumb, optionally remap the top right backspace.
|
||||
|
||||
Make keypad layout match a typical numpad.
|
||||
|
||||
Move F-Keys to layer 3.
|
||||
|
||||
- 2017/11/09
|
||||
Use Caps-Lock when `CFQ_USE_EXPEREMENTAL_LAYER` isn't defined.
|
||||
|
||||
|
@@ -203,7 +203,7 @@
|
||||
#define BP_DEAD_TREMA ALTGR(BP_I) // dead ¨ (trema/umlaut/diaresis)
|
||||
#define BP_DTRM BP_DEAD_TREMA
|
||||
#define BP_EURO ALTGR(BP_E) // €
|
||||
#define BP_TYPOGRAPHICAL_APOSTROPHE ALTGR(BP_COMMMA) // ’
|
||||
#define BP_TYPOGRAPHICAL_APOSTROPHE ALTGR(BP_COMMA) // ’
|
||||
#define BP_TAPO BP_TYPOGRAPHICAL_APOSTROPHE
|
||||
#define BP_COPYRIGHT ALTGR(BP_C) // ©
|
||||
#define BP_CPRT BP_COPYRIGHT
|
||||
|
41
quantum/keymap_extras/sendstring_bepo.h
Normal file
41
quantum/keymap_extras/sendstring_bepo.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2018 Jonathan Nifenecker
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
/* Sendstring definitions for the bépo layout */
|
||||
#ifndef SENDSTRING_BEPO
|
||||
#define SENDSTRING_BEPO
|
||||
|
||||
#include "keymap_bepo.h"
|
||||
|
||||
const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, KC_ESC, 0, 0, 0, 0,
|
||||
KC_SPC, BP_DCRC, BP_DQOT, BP_DOLLAR, BP_DOLLAR, BP_PERCENT, BP_P, BP_APOS,
|
||||
BP_LPRN, BP_RPRN, BP_ASTR, BP_PLUS, BP_COMM, BP_MINUS, BP_DOT, BP_SLSH,
|
||||
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
|
||||
KC_8, KC_9, BP_DOT, BP_DOT, KC_2, BP_EQUAL, KC_2, BP_APOS,
|
||||
BP_AT, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G,
|
||||
BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O,
|
||||
BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W,
|
||||
BP_X, BP_Y, BP_Z, KC_4, BP_AGRV, KC_5, KC_5, KC_MINS,
|
||||
KC_2, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G,
|
||||
BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O,
|
||||
BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W,
|
||||
BP_X, BP_Y, BP_Z, BP_Y, BP_B, BP_X, BP_K, KC_DEL,
|
||||
};
|
||||
|
||||
#endif
|
@@ -124,6 +124,7 @@ extern uint32_t default_layer_state;
|
||||
#define SS_LGUI(string) SS_DOWN(X_LGUI) string SS_UP(X_LGUI)
|
||||
#define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT)
|
||||
#define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT)
|
||||
#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT)
|
||||
|
||||
#define SEND_STRING(str) send_string_P(PSTR(str))
|
||||
extern const bool ascii_to_shift_lut[0x80];
|
||||
|
@@ -455,8 +455,8 @@ enum quantum_keycodes {
|
||||
#define LCAG(kc) (kc | QK_LCTL | QK_LALT | QK_LGUI)
|
||||
#define ALTG(kc) (kc | QK_RCTL | QK_RALT)
|
||||
#define SGUI(kc) (kc | QK_LGUI | QK_LSFT)
|
||||
#define SCMD(kc) SCMD(kc)
|
||||
#define SWIN(kc) SCMD(kc)
|
||||
#define SCMD(kc) SGUI(kc)
|
||||
#define SWIN(kc) SGUI(kc)
|
||||
#define LCA(kc) (kc | QK_LCTL | QK_LALT)
|
||||
|
||||
#define MOD_HYPR 0xf
|
||||
@@ -621,8 +621,8 @@ enum quantum_keycodes {
|
||||
#define RCAG_T(kc) MT((MOD_RCTL | MOD_RALT | MOD_RGUI), kc) // Right control alt and gui
|
||||
#define ALL_T(kc) MT((MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI), kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/
|
||||
#define SGUI_T(kc) MT((MOD_LGUI | MOD_LSFT), kc)
|
||||
#define SCMD_T(kc) SCMD_T(kc)
|
||||
#define SWIN_T(kc) SCMD_T(kc)
|
||||
#define SCMD_T(kc) SGUI_T(kc)
|
||||
#define SWIN_T(kc) SGUI_T(kc)
|
||||
#define LCA_T(kc) MT((MOD_LCTL | MOD_LALT), kc) // Left control and left alt
|
||||
|
||||
// Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap
|
||||
|
17
util/linux_install.sh
Normal file
17
util/linux_install.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
if grep ID /etc/os-release | grep -q rhel; then
|
||||
# RPM based OS
|
||||
sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc \
|
||||
avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs \
|
||||
arm-none-eabi-binutils-cs arm-none-eabi-newlib
|
||||
elif grep ID /etc/os-release | grep -q debian; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc \
|
||||
dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi \
|
||||
libnewlib-arm-none-eabi
|
||||
else
|
||||
echo "Sorry, we don't recognize your OS. Help us by contributing support!"
|
||||
echo
|
||||
echo " https://docs.qmk.fm/contributing.html"
|
||||
fi
|
25
util/macos_install.sh
Executable file
25
util/macos_install.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
if brew --version 2>&1 > /dev/null; then
|
||||
echo "Error! Homebrew not installed or broken!"
|
||||
echo -n "Would you like to install homebrew now? [y/n] "
|
||||
while read ANSWER; do
|
||||
case $ANSWER in
|
||||
y|Y)
|
||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||
break
|
||||
;;
|
||||
n|N)
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo -n "Would you like to install homebrew now? [y/n] "
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
brew tap osx-cross/avr
|
||||
brew tap PX4/homebrew-px4
|
||||
brew update
|
||||
brew install avr-gcc gcc-arm-none-eabi dfu-programmer avrdude
|
16
util/qmk_install.sh
Executable file
16
util/qmk_install.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# Pick the correct install script based on the current OS
|
||||
|
||||
util_dir=$(dirname "$0")
|
||||
|
||||
case $(uname) in
|
||||
Darwin)
|
||||
exec "${util_dir}/macos_install.sh"
|
||||
;;
|
||||
Linux)
|
||||
exec "${util_dir}/linux_install.sh"
|
||||
;;
|
||||
MSYS_NT*)
|
||||
exec "${util_dir}/msys2_install.sh"
|
||||
;;
|
||||
esac
|
Reference in New Issue
Block a user