mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-03 12:22:07 +00:00
Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f113f1927f | ||
![]() |
27ee425892 | ||
![]() |
89357b96d4 | ||
![]() |
16843bc8c9 | ||
![]() |
7854746704 | ||
![]() |
245b3376d6 | ||
![]() |
2c703b1528 | ||
![]() |
90a6fea4e8 | ||
![]() |
e45290a62e | ||
![]() |
1d3a19757c | ||
![]() |
cf9f6bbd91 | ||
![]() |
41df0dc9a7 | ||
![]() |
30dc34d529 | ||
![]() |
e899cb8940 | ||
![]() |
80e489e122 | ||
![]() |
29d1abff07 | ||
![]() |
b546da0a19 | ||
![]() |
f357bd0ccc | ||
![]() |
685d4c2f97 | ||
![]() |
535c2f60a9 | ||
![]() |
65eaab8a1a | ||
![]() |
18f3cd1123 | ||
![]() |
e45ce2dcb3 | ||
![]() |
137456e5b1 | ||
![]() |
ec59147507 | ||
![]() |
074b78700a | ||
![]() |
432674781a | ||
![]() |
4e41beeaa6 | ||
![]() |
00733f4b87 | ||
![]() |
19753788c1 | ||
![]() |
54a8abd785 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -46,6 +46,7 @@ cmake-build-debug
|
||||
*.stackdump
|
||||
util/Win_Check_Output.txt
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/tasks.json
|
||||
.vscode/last.sql
|
||||
|
@@ -104,6 +104,8 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
|
||||
* Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
|
||||
* Do not include `Makefile`s in your keymap folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Keyboards
|
||||
|
||||
@@ -114,6 +116,9 @@ We also ask that you follow these guidelines:
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
* Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
|
||||
* Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards/<kb1>/<kb2>/<kb2>.[ch]`
|
||||
* Do not include `Makefile`s in your keyboard folder (they're no longer used)
|
||||
* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
|
||||
|
||||
## Quantum/TMK Core
|
||||
|
||||
|
@@ -49,6 +49,8 @@ Once you have a good feel for how layers work and what you can do, you can get m
|
||||
|
||||
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
|
||||
|
||||
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
|
||||
|
||||
# Modifier keys
|
||||
|
||||
These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
|
||||
@@ -145,6 +147,8 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||
* `OSL(layer)` - momentary switch to *layer*.
|
||||
|
||||
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
|
||||
|
||||
## Permissive Hold
|
||||
|
||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||
|
@@ -42,7 +42,7 @@ Yes, unfortunately.
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = YES
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
|
@@ -16,6 +16,94 @@ 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 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.
|
||||
|
||||
You can create `info.json` files at every level under `qmk_firmware/keyboards/<name>` to specify this metadata. These files are combined, with more specific files overriding keys in less specific files. This means you do not need to duplicate your metadata information. For example, `qmk_firmware/keyboards/clueboard/info.json` specifies `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` specifies more specific information about Clueboard 66%.
|
||||
|
||||
### `info.json` Format
|
||||
|
||||
The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard.
|
||||
|
||||
* `keyboard_name`
|
||||
* A free-form text string describing the keyboard.
|
||||
* Example: `Clueboard 66%`
|
||||
* `manufacturer`
|
||||
* A free-form text string naming the manufacturer.
|
||||
* Example: `Clueboard`
|
||||
* `identifier`
|
||||
* The Vendor, Product, and Revision ID's joined by a :
|
||||
* Example: `c1ed:2370:0001`
|
||||
* `url`
|
||||
* A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
|
||||
* `processor`
|
||||
* The MCU or CPU this keyboard uses.
|
||||
* Example: `atmega32u4` or `stm32f303`
|
||||
* `bootloader`
|
||||
* What bootloader this keyboard uses. Available options:
|
||||
* `atmel-dfu`
|
||||
* `kiibohd-dfu-util`
|
||||
* `lufa-dfu`
|
||||
* `qmk-dfu`
|
||||
* `stm32-dfu-util`
|
||||
* (FIXME: This list is incomplete.)
|
||||
* `maintainer`
|
||||
* GitHub username of the maintainer, or `qmk` for community maintained boards
|
||||
* `width`
|
||||
* Width of the board in Key Units
|
||||
* `height`
|
||||
* Height of the board in Key Units
|
||||
* `layouts`
|
||||
* Physical Layout representations. See the next section for more detail.
|
||||
|
||||
#### Layout Format
|
||||
|
||||
Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`. Within each layout macro are keys for `width`, `height`, and `key_count`, each of which should be self-explanatory.
|
||||
|
||||
* `width`
|
||||
* Optional: The width of the layout in Key Units
|
||||
* `height`
|
||||
* Optional: The height of the layout in Key Units
|
||||
* `key_count`
|
||||
* **Required**: The number of keys in this layout
|
||||
* `layout`
|
||||
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
||||
|
||||
#### Key Dictionary Format
|
||||
|
||||
Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for <http://keyboard-layout-editor.com> you will find many of the concepts the same. We re-use the same key names and layout choices wherever possible, but unlike keyboard-layout-editor each key is stateless, inheriting no properties from the keys that came before it.
|
||||
|
||||
All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key.
|
||||
|
||||
* `X`
|
||||
* **Required**: The absolute position of the key in the horizontal axis, in Key Units.
|
||||
* `Y`
|
||||
* **Required**: The absolute position of the key in the vertical axis, in Key Units.
|
||||
* `W`
|
||||
* The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `H`
|
||||
* The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `R`
|
||||
* How many degrees clockwise to rotate the key.
|
||||
* `RX`
|
||||
* The absolute position of the point to rotate the key around in the horizontal axis. Default: `x`
|
||||
* `RY`
|
||||
* The absolute position of the point to rotate the key around in the vertical axis. Default: `y`
|
||||
* `KS`
|
||||
* Key Shape: define a polygon by providing a list of points, in Key Units.
|
||||
* **Important**: These are relative to the top-left of the key, not absolute.
|
||||
* Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]`
|
||||
|
||||
### How Is The Metadata Exposed?
|
||||
|
||||
This metadata is primarily used in two ways:
|
||||
|
||||
* To allow web-based configurators to dynamically generate UI
|
||||
* To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter.
|
||||
|
||||
Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API.
|
||||
|
||||
## Non-production/handwired projects
|
||||
|
||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||
|
@@ -35,7 +35,7 @@ Keymap layer has its state in two 32 bit parameters:
|
||||
|
||||
Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
|
||||
Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
|
||||
To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
|
||||
To change `default_layer` will be useful when you switch key layout completely, say you want Colemak instead of Qwerty.
|
||||
|
||||
Initial state of Keymap Change base layout
|
||||
----------------------- ------------------
|
||||
|
@@ -30,24 +30,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
},
|
||||
|
||||
[KEYNAV] = {
|
||||
{KC_ESC, MEH(KC_A), RCTL(KC_Z), RCTL(KC_S), MEH(KC_B), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, },
|
||||
{MEH(KC_C), MEH(KC_D), RSFT(KC_TAB), KC_TAB, MEH(KC_E), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), },
|
||||
{MEH(KC_F), MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
{KC_ESC, MEH(KC_F9), RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, },
|
||||
{MEH(KC_F11), MEH(KC_F12), RSFT(KC_TAB), KC_TAB, MEH(KC_A), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), },
|
||||
{MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
},
|
||||
|
||||
[KEYSEL] = {
|
||||
{KC_TRNS, KC_TRNS, RCTL(KC_Z), RCTL(KC_S), KC_TRNS, KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), },
|
||||
{KC_TRNS, KC_TRNS, RSFT(KC_TAB), KC_TAB, KC_TRNS, KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), },
|
||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
{MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), },
|
||||
{MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), },
|
||||
{MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), },
|
||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
},
|
||||
|
||||
[COMBINED] = {
|
||||
{KC_ESC, KC_LABK, KC_RABK, KC_DQUO, KC_GRAVE, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, },
|
||||
{KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, },
|
||||
{KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_TILD, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS, KC_TRNS, }
|
||||
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, },
|
||||
{KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, },
|
||||
{KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, },
|
||||
{KC_PIPE, KC_BSLS, KC_CIRC, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TILD, KC_GRAVE, }
|
||||
},
|
||||
|
||||
[MOUSE] = {
|
||||
|
@@ -4,5 +4,9 @@
|
||||
"bootloader": "atmel-dfu",
|
||||
"width": 16.5,
|
||||
"height": 5,
|
||||
"layouts": {"KEYMAP": [{"x": 0, "y": 0, "w": 1}, {"x": 1, "y": 0, "w": 1}, {"x": 2, "y": 0, "w": 1}, {"x": 3, "y": 0, "w": 1}, {"x": 4, "y": 0, "w": 1}, {"x": 5, "y": 0, "w": 1}, {"x": 6, "y": 0, "w": 1}, {"x": 7, "y": 0, "w": 1}, {"x": 8, "y": 0, "w": 1}, {"x": 9, "y": 0, "w": 1}, {"x": 10, "y": 0, "w": 1}, {"x": 11, "y": 0, "w": 1}, {"x": 12, "y": 0, "w": 1}, {"x": 13, "y": 0, "w": 1}, {"x": 14, "y": 0, "w": 1}, {"x": 15.5, "y": 0, "w": 1}, {"x": 0, "y": 1, "w": 1.5}, {"x": 1.5, "y": 1, "w": 1}, {"x": 2.5, "y": 1, "w": 1}, {"x": 3.5, "y": 1, "w": 1}, {"x": 4.5, "y": 1, "w": 1}, {"x": 5.5, "y": 1, "w": 1}, {"x": 6.5, "y": 1, "w": 1}, {"x": 7.5, "y": 1, "w": 1}, {"x": 8.5, "y": 1, "w": 1}, {"x": 9.5, "y": 1, "w": 1}, {"x": 10.5, "y": 1, "w": 1}, {"x": 11.5, "y": 1, "w": 1}, {"x": 12.5, "y": 1, "w": 1}, {"x": 13.5, "y": 1, "w": 1.5}, {"x": 15.5, "y": 1, "w": 1}, {"x": 0, "y": 2, "w": 1.75}, {"x": 1.75, "y": 2, "w": 1}, {"x": 2.75, "y": 2, "w": 1}, {"x": 3.75, "y": 2, "w": 1}, {"x": 4.75, "y": 2, "w": 1}, {"x": 5.75, "y": 2, "w": 1}, {"x": 6.75, "y": 2, "w": 1}, {"x": 7.75, "y": 2, "w": 1}, {"x": 8.75, "y": 2, "w": 1}, {"x": 9.75, "y": 2, "w": 1}, {"x": 10.75, "y": 2, "w": 1}, {"x": 11.75, "y": 2, "w": 1}, {"x": 12.75, "y": 2, "w": 1}, {"x": 13.75, "y": 2, "w": 1.25}, {"x": 0, "y": 3, "w": 1.25}, {"x": 1.25, "y": 3, "w": 1}, {"x": 2.25, "y": 3, "w": 1}, {"x": 3.25, "y": 3, "w": 1}, {"x": 4.25, "y": 3, "w": 1}, {"x": 5.25, "y": 3, "w": 1}, {"x": 6.25, "y": 3, "w": 1}, {"x": 7.25, "y": 3, "w": 1}, {"x": 8.25, "y": 3, "w": 1}, {"x": 9.25, "y": 3, "w": 1}, {"x": 10.25, "y": 3, "w": 1}, {"x": 11.25, "y": 3, "w": 1}, {"x": 12.25, "y": 3, "w": 1}, {"x": 13.25, "y": 3, "w": 1.25}, {"x": 14.5, "y": 3, "w": 1}, {"x": 0, "y": 4, "w": 1.25}, {"x": 1.25, "y": 4, "w": 1}, {"x": 2.25, "y": 4, "w": 1.25}, {"x": 3.5, "y": 4, "w": 1.25}, {"x": 4.75, "y": 4, "w": 2}, {"x": 6.75, "y": 4, "w": 2}, {"x": 8.75, "y": 4, "w": 1.25}, {"x": 10, "y": 4, "w": 1.25}, {"x": 11.25, "y": 4, "w": 1}, {"x": 12.25, "y": 4, "w": 1.25}, {"x": 13.5, "y": 4, "w": 1}, {"x": 14.5, "y": 4, "w": 1}, {"x": 15.5, "y": 4, "w": 1}]}
|
||||
"layouts": {
|
||||
"KEYMAP": {
|
||||
"layout": [{"x": 0, "y": 0, "w": 1, "label": "GRAVE"}, {"x": 1, "y": 0, "w": 1, "label": "1"}, {"x": 2, "y": 0, "w": 1, "label": "2"}, {"x": 3, "y": 0, "w": 1, "label": "3"}, {"x": 4, "y": 0, "w": 1, "label": "4"}, {"x": 5, "y": 0, "w": 1, "label": "5"}, {"x": 6, "y": 0, "w": 1, "label": "6"}, {"x": 7, "y": 0, "w": 1, "label": "7"}, {"x": 8, "y": 0, "w": 1, "label": "8"}, {"x": 9, "y": 0, "w": 1, "label": "9"}, {"x": 10, "y": 0, "w": 1, "label": "0"}, {"x": 11, "y": 0, "w": 1, "label": "DASH"}, {"x": 12, "y": 0, "w": 1, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 1, "label": "YEN"}, {"x": 14, "y": 0, "w": 1, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "w": 1, "label": "PAGEUP"}, {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "w": 1, "label": "Q"}, {"x": 2.5, "y": 1, "w": 1, "label": "W"}, {"x": 3.5, "y": 1, "w": 1, "label": "E"}, {"x": 4.5, "y": 1, "w": 1, "label": "R"}, {"x": 5.5, "y": 1, "w": 1, "label": "T"}, {"x": 6.5, "y": 1, "w": 1, "label": "Y"}, {"x": 7.5, "y": 1, "w": 1, "label": "U"}, {"x": 8.5, "y": 1, "w": 1, "label": "I"}, {"x": 9.5, "y": 1, "w": 1, "label": "O"}, {"x": 10.5, "y": 1, "w": 1, "label": "P"}, {"x": 11.5, "y": 1, "w": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "w": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "w": 1, "label": "PAGEDOWN"}, {"x": 0, "y": 2, "w": 1.75, "label": "CAPSLOCK"}, {"x": 1.75, "y": 2, "w": 1, "label": "A"}, {"x": 2.75, "y": 2, "w": 1, "label": "S"}, {"x": 3.75, "y": 2, "w": 1, "label": "D"}, {"x": 4.75, "y": 2, "w": 1, "label": "F"}, {"x": 5.75, "y": 2, "w": 1, "label": "G"}, {"x": 6.75, "y": 2, "w": 1, "label": "H"}, {"x": 7.75, "y": 2, "w": 1, "label": "J"}, {"x": 8.75, "y": 2, "w": 1, "label": "K"}, {"x": 9.75, "y": 2, "w": 1, "label": "L"}, {"x": 10.75, "y": 2, "w": 1, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "w": 1, "label": "QUOTE"}, {"x": 12.75, "y": 2, "w": 1, "label": "ISOHASH"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH"}, {"x": 2.25, "y": 3, "w": 1, "label": "Z"}, {"x": 3.25, "y": 3, "w": 1, "label": "X"}, {"x": 4.25, "y": 3, "w": 1, "label": "C"}, {"x": 5.25, "y": 3, "w": 1, "label": "V"}, {"x": 6.25, "y": 3, "w": 1, "label": "B"}, {"x": 7.25, "y": 3, "w": 1, "label": "N"}, {"x": 8.25, "y": 3, "w": 1, "label": "M"}, {"x": 9.25, "y": 3, "w": 1, "label": "COMMA"}, {"x": 10.25, "y": 3, "w": 1, "label": "PERIOD"}, {"x": 11.25, "y": 3, "w": 1, "label": "SLASH"}, {"x": 12.25, "y": 3, "w": 1, "label": "JPBACKSLASH"}, {"x": 13.25, "y": 3, "w": 1.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "w": 1, "label": "UP"}, {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1, "label": "LALT"}, {"x": 2.25, "y": 4, "w": 1.25, "label": "LCMD"}, {"x": 3.5, "y": 4, "w": 1.25, "label": "MUHENKAN"}, {"x": 4.75, "y": 4, "w": 2, "label": "SPACE1"}, {"x": 6.75, "y": 4, "w": 2, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "HENKAN"}, {"x": 10, "y": 4, "w": 1.25, "label": "RCMD"}, {"x": 11.25, "y": 4, "w": 1, "label": "RCTRL"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "FN"}, {"x": 13.5, "y": 4, "w": 1, "label": "LEFT"}, {"x": 14.5, "y": 4, "w": 1, "label": "DOWN"}, {"x": 15.5, "y": 4, "w": 1, "label": "RIGHT"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,28 @@
|
||||
#include "dz60.h"
|
||||
#include "led.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// Keyboard start-up code goes here
|
||||
// Runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// Looping keyboard code goes here
|
||||
// This runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// Set caps lock LED pin as output
|
||||
DDRB |= (1 << 2);
|
||||
// Default to off
|
||||
PORTB |= (1 << 2);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
}
|
||||
// Code for caps lock LED as reported by the OS
|
||||
// Set this per keymap, instead of globally
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
@@ -92,4 +92,4 @@ ONEHAND_ENABLE = no # Disable Onehand
|
||||
RGBLIGHT_ENABLE = no
|
||||
MIDI_ENABLE = no
|
||||
|
||||
LAYOUTS = ergodox ergodox_80
|
||||
LAYOUTS = ergodox
|
||||
|
@@ -87,6 +87,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 500
|
||||
|
||||
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||
#define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF
|
||||
#define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00
|
||||
#define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00
|
||||
#define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00
|
||||
#define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF
|
||||
#define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF
|
||||
#define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
|
@@ -194,30 +194,82 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
};
|
||||
|
||||
// Runs whenever there is a layer state change.
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case SYMB:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case MDIA:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
uint8_t layer = biton32(state);
|
||||
switch (layer) {
|
||||
case 0:
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#else
|
||||
rgblight_init();
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_1
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_2
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
|
||||
#endif
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_3
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_4
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_5
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
|
||||
#endif
|
||||
break;
|
||||
case 6:
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_6
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
|
||||
#endif
|
||||
break;
|
||||
case 7:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_7
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return state;
|
||||
};
|
||||
|
@@ -14,16 +14,32 @@ enum custom_keycodes {
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD,
|
||||
// shell nav macros
|
||||
SHELL_LS,
|
||||
SHELL_LSLTR,
|
||||
SHELL_CDPRE,
|
||||
SHELL_LESS,
|
||||
SHELL_PLESS,
|
||||
SHELL_PGREP,
|
||||
SHELL_TAILF,
|
||||
|
||||
SHELL_PWD,
|
||||
SHELL_H3,
|
||||
SHELL_AMMCOLO,
|
||||
SHELL_SCREENRD,
|
||||
SHELL_SCREEN_NEW,
|
||||
SHELL_SCREEN_LIST,
|
||||
SHELL_MKE,
|
||||
};
|
||||
|
||||
|
||||
#define BASE 0 // base dvorak layer
|
||||
#define KEYNAV 1 // arrow navigation (right hand)
|
||||
#define KEYSEL 2 // arrow navigation + shift (allow text selection)
|
||||
#define SHELL_NAV 3 // bash shortcuts
|
||||
#define MOUSE 4 // mouse layer (can be locked with lock key)
|
||||
#define COMBINED 5 // combined numbers and symbols layer
|
||||
#define BASE 0 // base dvorak layer
|
||||
#define KEYNAV 1 // arrow navigation (right hand)
|
||||
#define KEYSEL 2 // arrow navigation + shift (allow text selection)
|
||||
#define SHELL_NAV 3 // bash shortcuts
|
||||
#define SHELL_SCREEN 4 // linux screen shortcuts
|
||||
#define MOUSE 5 // mouse layer (can be locked with lock key)
|
||||
#define COMBINED 6 // combined numbers and symbols layer
|
||||
|
||||
// macros
|
||||
#define MOUSE_TOGGLE 1
|
||||
@@ -34,18 +50,38 @@ enum custom_keycodes {
|
||||
#define SWITCH_NDS 7
|
||||
#define SCREEN_COPY_MODE 8
|
||||
#define SCREEN_PASTE 9
|
||||
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15
|
||||
#define SCREEN_RENAME 10
|
||||
#define SCREEN_NUMBER 11
|
||||
#define SCREEN_0 12
|
||||
#define SCREEN_1 13
|
||||
#define SCREEN_2 14
|
||||
#define SCREEN_3 15
|
||||
#define SCREEN_4 16
|
||||
#define SCREEN_5 17
|
||||
#define SCREEN_6 18
|
||||
#define SCREEN_7 19
|
||||
#define SCREEN_8 20
|
||||
#define SCREEN_9 21
|
||||
#define SCREEN_DETACH 22
|
||||
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 30
|
||||
|
||||
|
||||
#define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \
|
||||
case MACRO_NAME:\
|
||||
if (record->event.pressed) {\
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(NUM), END);\
|
||||
}\
|
||||
break;\
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = KEYMAP(
|
||||
// left hand
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2),
|
||||
MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
MEH(KC_0), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3),
|
||||
MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL),
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2),
|
||||
OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3),
|
||||
MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL),
|
||||
|
||||
// left thumb cluster
|
||||
MEH(KC_4), MEH(KC_5),
|
||||
@@ -114,23 +150,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// shell navigation layer
|
||||
[SHELL_NAV] = KEYMAP(
|
||||
// left 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_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, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, SHELL_MKE, SHELL_H3,
|
||||
KC_TRNS,LCTL(KC_A), SHELL_CDPRE, SHELL_LSLTR, SHELL_LS, SHELL_PWD,
|
||||
KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, KC_TRNS, SHELL_AMMCOLO,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
LALT(KC_D),
|
||||
KC_TRNS,RCTL(KC_W),KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(SWITCH_NDS),
|
||||
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||
RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||
// bottom row
|
||||
M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(SWITCH_NDS),
|
||||
RCTL(KC_L), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_TRNS, RCTL(KC_R),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||
RCTL(KC_C), KC_TRNS, M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||
// bottom row (match functionality of base layer)
|
||||
KC_TRNS, RCTL(KC_W), KC_TRNS, LALT(KC_D), RCTL(KC_U),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
@@ -138,16 +174,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
|
||||
// linux screen layer
|
||||
[SHELL_SCREEN] = KEYMAP(
|
||||
// left 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_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,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
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, M(SCREEN_NEW_TAB), M(SCREEN_7), M(SCREEN_8), M(SCREEN_9), M(SCREEN_RENAME), KC_TRNS,
|
||||
M(SCREEN_TAB_LEFT), M(SCREEN_4), M(SCREEN_5), M(SCREEN_6), M(SCREEN_TAB_RIGHT), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(SCREEN_1), M(SCREEN_2), M(SCREEN_3), M(SCREEN_NUMBER), KC_TRNS,
|
||||
// bottom row
|
||||
M(SCREEN_0), KC_TRNS, KC_TRNS, KC_TRNS, M(SCREEN_DETACH),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
[COMBINED] = KEYMAP(
|
||||
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_ESC, KC_LABK, KC_RABK, KC_DQUO, KC_GRAVE,KC_TRNS,
|
||||
KC_TRNS,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC,KC_TRNS,
|
||||
KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS,
|
||||
KC_TRNS,KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_TILD,KC_TRNS,
|
||||
KC_TRNS,KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_TRNS,KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_PIPE, KC_BSLS, KC_CIRC, KC_AMPR,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
|
||||
@@ -157,7 +219,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, MEH(KC_N),
|
||||
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, MEH(KC_O),
|
||||
// bottom row
|
||||
KC_0, KC_DOT, KC_TRNS, KC_TRNS, MEH(KC_P),
|
||||
KC_0, KC_DOT, KC_TILD, KC_GRAVE, MEH(KC_P),
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS),
|
||||
|
||||
@@ -230,6 +292,41 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_DETACH:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(D), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_RENAME:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(A), U(LSFT), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_NUMBER:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),
|
||||
T(N),
|
||||
T(U),
|
||||
T(M),
|
||||
T(B),
|
||||
T(E),
|
||||
T(R),
|
||||
T(SPC),
|
||||
END);
|
||||
}
|
||||
break;
|
||||
|
||||
MACRO_SCREEN_NUM(SCREEN_0,0);
|
||||
MACRO_SCREEN_NUM(SCREEN_1,1);
|
||||
MACRO_SCREEN_NUM(SCREEN_2,2);
|
||||
MACRO_SCREEN_NUM(SCREEN_3,3);
|
||||
MACRO_SCREEN_NUM(SCREEN_4,4);
|
||||
MACRO_SCREEN_NUM(SCREEN_5,5);
|
||||
MACRO_SCREEN_NUM(SCREEN_6,6);
|
||||
MACRO_SCREEN_NUM(SCREEN_7,7);
|
||||
MACRO_SCREEN_NUM(SCREEN_8,8);
|
||||
MACRO_SCREEN_NUM(SCREEN_9,9);
|
||||
|
||||
case SCREEN_COPY_MODE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
|
||||
@@ -282,8 +379,70 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
// shell macros
|
||||
if(record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case SHELL_LS:
|
||||
SEND_STRING("ls\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LSLTR:
|
||||
SEND_STRING("ls -ltr\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_CDPRE:
|
||||
SEND_STRING("cd ..\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LESS:
|
||||
SEND_STRING("less ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PLESS:
|
||||
SEND_STRING(" | less");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PGREP:
|
||||
SEND_STRING(" | grep ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_TAILF:
|
||||
SEND_STRING("tail -f ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PWD:
|
||||
SEND_STRING("echo `pwd`/");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_H3:
|
||||
SEND_STRING("h3\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_AMMCOLO:
|
||||
SEND_STRING("ammcolo\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREENRD:
|
||||
SEND_STRING("screen -r -d ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_NEW:
|
||||
SEND_STRING("screen -S ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_LIST:
|
||||
SEND_STRING("screen -list\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_MKE:
|
||||
SEND_STRING("mke\n");
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -306,6 +465,8 @@ void matrix_scan_user(void) {
|
||||
case COMBINED:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case SHELL_NAV:
|
||||
case SHELL_SCREEN:
|
||||
case KEYNAV:
|
||||
case KEYSEL:
|
||||
ergodox_right_led_3_on();
|
||||
|
@@ -86,4 +86,4 @@ LED_DRIVER = is31fl3731c
|
||||
LED_WIDTH = 7
|
||||
LED_HEIGHT = 7
|
||||
|
||||
LAYOUTS = ergodox ergodox_80
|
||||
LAYOUTS = ergodox
|
||||
|
17
keyboards/gh60/info.json
Normal file
17
keyboards/gh60/info.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"keyboard_name": "GH60",
|
||||
"identifier": "FEED:6060:0001",
|
||||
"layout": {
|
||||
"LAYOUT_60_ansi": {
|
||||
"layout": [{"x":0, "y":0, "label":"~"}, {"x":1, "y":0, "label":"!"}, {"x":2, "y":0, "label":"@"}, {"x":3, "y":0, "label":"#"}, {"x":4, "y":0, "label":"$"}, {"x":5, "y":0, "label":"%"}, {"x":6, "y":0, "label":"^"}, {"x":7, "y":0, "label":"&"}, {"x":8, "y":0, "label":"*"}, {"x":9, "y":0, "label":"("}, {"x":10, "y":0, "label":")"}, {"x":11, "y":0, "label":"_"}, {"x":12, "y":0, "label":"+"}, {"x":14, "y":0, "label":"Backspace", "w":2}, {"x":0.5, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":14, "y":1, "label":"|", "w":1.5}, {"x":0.75, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":14, "y":2, "label":"Enter", "w":2.25}, {"x":1.25, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":14, "y":3, "label":"Shift", "w":2.75}, {"x":0.25, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.5, "y":4, "label":"Win", "w":1.25}, {"x":2.75, "y":4, "label":"Alt", "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "label":"Alt", "w":1.25}, {"x":11.5, "y":4, "label":"Win", "w":1.25}, {"x":12.75, "y":4, "label":"Menu", "w":1.25}, {"x":14, "y":4, "label":"Ctrl", "w":1.25}]
|
||||
}
|
||||
},
|
||||
"maintainer": "qmk",
|
||||
"keyboard_folder": "gh60",
|
||||
"width": 15,
|
||||
"bootloader": "atmel-dfu",
|
||||
"processor": "atmega32u4",
|
||||
"height": 5,
|
||||
"url": "http://qmk.fm/keyboards/gh60",
|
||||
"manufacturer": "geekhack"
|
||||
}
|
190
keyboards/knops/mini/config.h
Normal file
190
keyboards/knops/mini/config.h
Normal file
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
Copyright 2017 Pawnerd
|
||||
|
||||
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 0xFEFD
|
||||
#define PRODUCT_ID 0x9460
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Alltrons IT
|
||||
#define PRODUCT Knops Mini
|
||||
#define DESCRIPTION Advanced 3x2 macrokeyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/*
|
||||
* 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 { D0 }
|
||||
#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BACKLIGHT_LEVELS 3
|
||||
|
||||
|
||||
/* 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 */
|
||||
|
||||
/* 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
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* 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 1
|
||||
|
||||
#endif
|
24
keyboards/knops/mini/keymaps/default/config.h
Normal file
24
keyboards/knops/mini/keymaps/default/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2017 Pawnerd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
361
keyboards/knops/mini/keymaps/default/keymap.c
Normal file
361
keyboards/knops/mini/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,361 @@
|
||||
#include "mini.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
KEYMAP(
|
||||
LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
|
||||
KEYMAP(
|
||||
LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)),
|
||||
|
||||
KEYMAP(
|
||||
LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
//keyevent_t event = record->event;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(T), T(G), T(G), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(NO), T(L), U(NO), END );
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(Z), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(X), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void set_switch_led(int ledId, bool state) {
|
||||
if(state) {
|
||||
switch(ledId) {
|
||||
case 1:
|
||||
PORTD |= (1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC |= (1<<6);
|
||||
break;
|
||||
case 3:
|
||||
PORTD |= (1<<4);
|
||||
break;
|
||||
case 4:
|
||||
PORTE |= (1<<6);
|
||||
break;
|
||||
case 5:
|
||||
PORTB |= (1<<4);
|
||||
break;
|
||||
case 6:
|
||||
PORTD |= (1<<6);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch(ledId) {
|
||||
case 1:
|
||||
PORTD &= ~(1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC &= ~(1<<6);
|
||||
break;
|
||||
case 3:
|
||||
PORTD &= ~(1<<4);
|
||||
break;
|
||||
case 4:
|
||||
PORTE &= ~(1<<6);
|
||||
break;
|
||||
case 5:
|
||||
PORTB &= ~(1<<4);
|
||||
break;
|
||||
case 6:
|
||||
PORTD &= ~(1<<6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_layer_led(int layerId) {
|
||||
PORTD |= (1<<5);
|
||||
PORTB &= ~(1<<6);
|
||||
PORTB |= (1<<0);
|
||||
switch(layerId) {
|
||||
case 0:
|
||||
PORTD &= ~(1<<5);
|
||||
break;
|
||||
case 1:
|
||||
PORTB |= (1<<6);
|
||||
break;
|
||||
case 2:
|
||||
PORTB &= ~(1<<0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
led_init_ports();
|
||||
|
||||
|
||||
PORTD |= (1<<7);
|
||||
PORTC |= (1<<6);
|
||||
PORTD |= (1<<4);
|
||||
PORTE |= (1<<6);
|
||||
PORTB |= (1<<4);
|
||||
PORTD |= (1<<6);
|
||||
|
||||
set_layer_led(0);
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
void led_init_ports() {
|
||||
// led voor switch #1
|
||||
DDRD |= (1<<7);
|
||||
PORTD &= ~(1<<7);
|
||||
|
||||
// led voor switch #2
|
||||
DDRC |= (1<<6);
|
||||
PORTC &= ~(1<<6);
|
||||
|
||||
// led voor switch #3
|
||||
DDRD |= (1<<4);
|
||||
PORTD &= ~(1<<4);
|
||||
|
||||
// led voor switch #4
|
||||
DDRE |= (1<<6);
|
||||
PORTE &= ~(1<<6);
|
||||
|
||||
// led voor switch #5
|
||||
DDRB |= (1<<4);
|
||||
PORTB &= ~(1<<4);
|
||||
|
||||
// led voor switch #6
|
||||
DDRD |= (1<<6);
|
||||
PORTD &= ~(1<<6);
|
||||
|
||||
/*
|
||||
DDRD |= (1<<7);
|
||||
PORTD |= (1<<7);
|
||||
|
||||
DDRC |= (1<<6);
|
||||
PORTC |= (1<<6);
|
||||
|
||||
DDRD |= (1<<4);
|
||||
PORTD |= (1<<4);
|
||||
|
||||
DDRE |= (1<<6);
|
||||
PORTE |= (1<<6);
|
||||
|
||||
DDRB |= (1<<4);
|
||||
PORTB |= (1<<4);
|
||||
|
||||
DDRD |= (1<<6);
|
||||
PORTD |= (1<<6);
|
||||
// */
|
||||
|
||||
DDRD |= (1<<5);
|
||||
DDRB |= (1<<6);
|
||||
DDRB |= (1<<0);
|
||||
//led_set_layer(0);
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
*
|
||||
* In case you don't understand this coding stuff, please
|
||||
* feel free to mail me or post something
|
||||
* at the /r/knops subreddit and I will configure the code as
|
||||
* you wish for your needs to make the LEDs do what you want :-).
|
||||
*
|
||||
* Contact me at: support@knops.io
|
||||
*
|
||||
*
|
||||
* Knops Mini LED Numbers:
|
||||
* _____ _____ _____
|
||||
* | | | | | |
|
||||
* | 1 | | 2 | | 3 | <---
|
||||
* |_____| |_____| |_____| | These LEDs are called 'Switch LEDs'
|
||||
* _____ _____ _____ |----- To turn on/off these leds, use:
|
||||
* | | | | | | | set_switch_led( [1-6], [true/false]);
|
||||
* | 4 | | 5 | | 6 | <---
|
||||
* |_____| |_____| |_____|
|
||||
*
|
||||
* < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs'
|
||||
* To turn one of them on, use:
|
||||
* set_layer_led( [0-2] );
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This function led_set_layer gets called when you switch between layers.
|
||||
* It allows you to turn on and off leds for each different layer and do
|
||||
* other cool stuff. Currently the GUI does not have LED support. I am working
|
||||
* on that, but takes time.
|
||||
*/
|
||||
void led_set_layer(int layer) {
|
||||
switch(layer) {
|
||||
|
||||
/**
|
||||
* Here is an example to turn LEDs on and of. By default:
|
||||
* - the LEDs are turned on in layer 0
|
||||
* - the LEDs are turned off in layer 1
|
||||
* - the LEDs don't change from state for layer 2
|
||||
*/
|
||||
|
||||
case 0:
|
||||
set_layer_led(0); // Turn on only the first/left layer indicator
|
||||
set_switch_led(1, true);
|
||||
set_switch_led(2, true);
|
||||
set_switch_led(3, true);
|
||||
set_switch_led(4, true);
|
||||
set_switch_led(5, true);
|
||||
set_switch_led(6, true);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
set_layer_led(1); // Turn on only the second/middle layer indicator
|
||||
set_switch_led(1, false);
|
||||
set_switch_led(2, false);
|
||||
set_switch_led(3, false);
|
||||
set_switch_led(4, false);
|
||||
set_switch_led(5, false);
|
||||
set_switch_led(6, false);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
set_layer_led(2); // Turn on only the third/right layer indicator
|
||||
|
||||
// Keep leds for layer two in their current state, since we don't use set_switch_led(SWITCH_ID, TRUE_OR_FALSE)
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case TO(0):
|
||||
if (record->event.pressed) {
|
||||
led_set_layer(0);
|
||||
}
|
||||
break;
|
||||
case TO(1):
|
||||
if (record->event.pressed) {
|
||||
led_set_layer(1);
|
||||
}
|
||||
break;
|
||||
case TO(2):
|
||||
if (record->event.pressed) {
|
||||
led_set_layer(2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
7
keyboards/knops/mini/keymaps/default/readme.md
Normal file
7
keyboards/knops/mini/keymaps/default/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Default Knops Mini Layout
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
This is the default layout that comes flashed on every Knops Mini. For your use, you probably want to change this. We suggest you to use [our configurator tool](http://knops.io/configurator.html) for this.
|
44
keyboards/knops/mini/mini.c
Normal file
44
keyboards/knops/mini/mini.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/* Copyright 2017 Kayle Knops
|
||||
*
|
||||
* 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 "mini.h"
|
||||
/*
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
*/
|
30
keyboards/knops/mini/mini.h
Normal file
30
keyboards/knops/mini/mini.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Copyright 2017 Pawnerd
|
||||
*
|
||||
* 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 "quantum.h"
|
||||
|
||||
#ifndef KNOPS_MINI_H
|
||||
#define KNOPS_MINI_H
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The following is an example using the Planck MIT layout
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
K00, K01, K02, K03, K04, K05 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05 }, \
|
||||
}
|
||||
#endif
|
21
keyboards/knops/mini/readme.md
Normal file
21
keyboards/knops/mini/readme.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Knops Mini
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
A fully customizable 3x2 macropad. An exploded view of the keyboard is [available here](https://i.imgur.com/H83l5H8.gif).
|
||||
|
||||
*The best way to change settings on your keyboard*, is by using [our official configurator tool](http://knops.io/configurator.html).
|
||||
|
||||
* Keyboard Maintainer: [Pawnerd](https://github.com/pawnerd)
|
||||
* Contact / Questions (by e-mail): kayle `at` knops `dot` io
|
||||
* Hardware Supported: Knops Mini
|
||||
* rev1 (1.0) (Sold by CMStore EU/USA/CAD from 27th of august, 2017)
|
||||
* Hardware Availability: [knops.io](http://knops.io/knopsmini.html), [Direct EU](http://www.cmstore.eu/maker-made/knops-mini-macro-keyboard/), [Direct USA/CAN](http://www.cmstore-usa.com/knops-mini-macro-keyboard/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make knops/mini: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.
|
68
keyboards/knops/mini/rules.mk
Normal file
68
keyboards/knops/mini/rules.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
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
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
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
|
||||
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
10
keyboards/knops/readme.md
Normal file
10
keyboards/knops/readme.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Knops
|
||||
|
||||

|
||||
|
||||
[Knops](http://www.knops.io/) makes fully customizable custom keyboards in a variety of formfactors. So far the Knops Mini, a 3x2 macro keypad is the biggest success. Inside this directory you'll find support for the entire line of Knops products.
|
||||
|
||||
* Maintainer: [Pawnerd](https://github.com/pawnerd)
|
||||
* Hardware Supported:
|
||||
* [`Mini`](mini/): Knops Mini
|
||||
* Hardware Availability: [knops.io](https://www.knops.io/)
|
@@ -23,7 +23,6 @@
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -57,4 +57,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
|
||||
#endif
|
||||
|
@@ -23,7 +23,6 @@
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -57,4 +57,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
|
||||
#endif
|
||||
|
@@ -57,4 +57,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
|
||||
#endif
|
||||
|
22
keyboards/mitosis/keymaps/datagrok/config.h
Normal file
22
keyboards/mitosis/keymaps/datagrok/config.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// I use a pro micro clocked at 8Mhz. It can't reach 1M baud, so this is the
|
||||
// next fastest possible baud without errors. I don't notice any difference in
|
||||
// behavior at this slower speed. (So I think it should maybe be the default,
|
||||
// to allow a single codebase to support both available flavors of pro micro.)
|
||||
// This requires a corresponding change to the wireless module firmware; see
|
||||
// https://github.com/reversebias/mitosis/pull/10
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
|
||||
// TODO: figure out which of these I can safely enable to reduce firmware size.
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT // can't; errors
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@@ -1,34 +1,12 @@
|
||||
#include "mitosis.h"
|
||||
|
||||
// Arrows in a layer in the home position.
|
||||
// Fn+Arrows = PgUp PgDn Home End, which is intuitive for me
|
||||
//
|
||||
// Since QWERTY and WORKMAN keep angle brackets together, I wanted to place
|
||||
// other enclosing symbols on the same keys. So, 9 and 0 and [ and ] land there
|
||||
// in other layers. That informed the numbers placement, which informed the
|
||||
// function-key placement.
|
||||
//
|
||||
// To do:
|
||||
// - Improve LED indications (may require modding bluetooth firmware):
|
||||
// - Is any board nonresponsive (which one?)
|
||||
// - Does either board have a low battery?
|
||||
// - Use "shifted keys" hack to make programming symbols easier to type
|
||||
// - Add "media" keysyms, Insert, PrintScr, Pause/Break
|
||||
// - Dynamically toggle QWERTY or other layouts
|
||||
// - See if the henkans placement is at all useful for Japanese speakers, or
|
||||
// abuse different keysyms
|
||||
// - Overlay a 10key numpad somewhere
|
||||
// - Mod a speaker onto my receiver and enable tones
|
||||
// - Mod more indicator LEDs onto my receiver
|
||||
// - Do something with Num/Caps/Scroll lock?
|
||||
// - Improve tri-layer behavior
|
||||
|
||||
enum mitosis_layers
|
||||
{
|
||||
_WORKMAN,
|
||||
_FUNC,
|
||||
_NUMS,
|
||||
_NMFN
|
||||
_xW, // workman
|
||||
_xQ, // qwerty
|
||||
_xS, // symbols
|
||||
_xN, // numbers
|
||||
_xF // functions
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
@@ -38,67 +16,125 @@ enum mitosis_layers
|
||||
#define KC_LMTA KC_LALT // For fun, name the mods like the space cadet keyboard does
|
||||
#define KC_RMTA KC_RALT // META
|
||||
#define KC_LSUP KC_LGUI // SUPER
|
||||
#define KC_RSUP KC_RGUI //
|
||||
#define KC_RSUP KC_RGUI //
|
||||
#define KC_RHYP KC_INT4 // HYPER (actually muhenkan 無変換 and henkan 変換)
|
||||
#define KC_LHYP KC_INT5 // or NFER/XFER.
|
||||
|
||||
// I didn't want to mess about with new keymappings and custom logic etc. to
|
||||
// enable tri-state layers like mitosis default does. This layout accomplishes
|
||||
// it with a small quirk that triggering both layers then releasing one
|
||||
// out-of-order will leave the tri-state triggered. Which doesn't bother me.
|
||||
// Momentary tri-state layers. Mitosis default keymap does this too but employs
|
||||
// new keymappings and a bunch of conditional code. This simpler keymap
|
||||
// accomplishes it, but with a small quirk: triggering both layers then
|
||||
// releasing one out-of-order will leave the tri-state triggered until the
|
||||
// other is released. Which doesn't bother me.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_WORKMAN] = {
|
||||
{KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN},
|
||||
{KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I},
|
||||
{KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH},
|
||||
{XXXXXXX, MO(_NUMS), KC_LCTL, KC_LSFT, KC_BSPC, KC_SPC, KC_RSFT, KC_RCTL, MO(_NUMS), XXXXXXX},
|
||||
{XXXXXXX, KC_LHYP, KC_LSUP, KC_LMTA, MO(_FUNC), MO(_FUNC), KC_RMTA, KC_RSUP, KC_RHYP, XXXXXXX}
|
||||
},
|
||||
[_FUNC] = {
|
||||
{KC_ESC, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_QUOT},
|
||||
{KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_GRV},
|
||||
{_______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{XXXXXXX, MO(_NMFN), _______, _______, KC_DEL, KC_ENT, _______, _______, MO(_NMFN), XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, ___M___, ___M___, _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_NUMS] = {
|
||||
{_______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_4},
|
||||
{_______, _______, _______, _______, _______, _______, KC_5, KC_6, KC_7, KC_8},
|
||||
{_______, _______, _______, _______, _______, _______, KC_MINS, KC_9, KC_0, KC_EQL},
|
||||
{XXXXXXX, ___M___, _______, _______, _______, _______, _______, _______, ___M___, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, MO(_NMFN), MO(_NMFN), _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_NMFN] = {
|
||||
{_______, _______, KC_PGUP, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4},
|
||||
{_______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8},
|
||||
{_______, _______, _______, _______, _______, _______, KC_F8, KC_F9, KC_F10, KC_F12},
|
||||
{XXXXXXX, ___M___, _______, _______, _______, _______, _______, _______, ___M___, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, ___M___, ___M___, _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_xW] = {
|
||||
{KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN},
|
||||
{KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I},
|
||||
{KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT},
|
||||
{XXXXXXX, KC_LSUP, KC_LCTL, MO(_xN), KC_LSFT, KC_RSFT, MO(_xN), KC_RCTL, KC_RSUP, XXXXXXX},
|
||||
{XXXXXXX, KC_LHYP, KC_LMTA, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RMTA, KC_RHYP, XXXXXXX}
|
||||
},
|
||||
[_xQ] = {
|
||||
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P},
|
||||
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
|
||||
{KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT},
|
||||
{XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX}
|
||||
},
|
||||
[_xS] = {
|
||||
{KC_ESC, _______, KC_UP, _______, _______, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TILD},
|
||||
{KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CIRC, KC_AMPR, KC_PIPE, KC_GRV, KC_UNDS},
|
||||
{KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_RABK, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH},
|
||||
{XXXXXXX, _______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, ___M___, KC_DEL, KC_ENT, ___M___, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_xN] = {
|
||||
{_______, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_P0},
|
||||
{_______, _______, _______, _______, _______, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS},
|
||||
{_______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PEQL},
|
||||
{XXXXXXX, _______, _______, ___M___, _______, _______, ___M___, _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, MO(_xF), _______, KC_PENT, MO(_xF), _______, _______, XXXXXXX},
|
||||
},
|
||||
[_xF] = {
|
||||
{_______, _______, KC_PGUP, _______, KC_VOLU, KC_F13, KC_F7, KC_F8, KC_F9, KC_F10},
|
||||
{_______, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_F14, KC_F4, KC_F5, KC_F6, KC_F11},
|
||||
{TG(_xQ), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||
{XXXXXXX, _______, _______, ___M___, _______, _______, ___M___, _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, ___M___, ___M___, _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
};
|
||||
|
||||
// This is a hack to place <question mark> on <shift-comma> and <exclaimation
|
||||
// mark> on <shift-period>, when using an operating system configured for a
|
||||
// US/qwerty layout.
|
||||
bool comm_shifted = false;
|
||||
bool ques_shifted = false;
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t shifted;
|
||||
uint16_t s_keycode;
|
||||
bool *k_shifted;
|
||||
|
||||
switch (keycode) {
|
||||
case KC_COMM:
|
||||
s_keycode = KC_SLSH;
|
||||
k_shifted = &comm_shifted;
|
||||
break;
|
||||
case KC_DOT:
|
||||
s_keycode = KC_1;
|
||||
k_shifted = &ques_shifted;
|
||||
break;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||
|
||||
// Keydown. If shift is currently pressed, register its alternate keycode.
|
||||
if (record->event.pressed && shifted) {
|
||||
*k_shifted = true;
|
||||
register_code(s_keycode);
|
||||
return false;
|
||||
// Keyup. If shift was pressed back when the key was pressed, unregister
|
||||
// its alternate keycode.
|
||||
} else if (!(record->event.pressed) && *k_shifted) {
|
||||
*k_shifted = false;
|
||||
unregister_code(s_keycode);
|
||||
return false;
|
||||
// Otherwise, behave as normal.
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the bits of A selected by MASK to the corresponding bits of B
|
||||
#define setbits(A, B, MASK) A = (A & (B | ~MASK)) | (B & MASK)
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
//
|
||||
// Bit # 7 6 5 4 3 2 1 0
|
||||
// layer_state: [ | | | _xF | _xN | _xS | _xQ | _xW ]
|
||||
// usb_led [ | | |kana |cmps |scrl |caps | num ]
|
||||
// PORTB: [ NC | 10 | 9 | 8 | 14 | 16 | 15 |rxled]
|
||||
// PORTC: [ NC | 5 | | | | | | ]
|
||||
// PORTD: [ 6 | NC |txled| 4 | tx* | rx* | grn | p29 ]
|
||||
// PORTE: [ | 7 | | | | | | ]
|
||||
// PORTF: [ a0 | a1 | red | blu | | | NC | NC ]
|
||||
//
|
||||
// PD0 is connected to the pairing switch and p29 on the wireless module.
|
||||
// PF0,PF1,PB7,PC7,PD6 are not broken out by the pro micro board. I don't understand why.
|
||||
// PB1-PB6,PD4,PD5,PD6,PF6,PF7 are not connected to the Mitosis receiver
|
||||
// board. Each may be connected to an LED by way of a resistor (4.7k to
|
||||
// match the others) for a total of 14 additional indicators.
|
||||
|
||||
switch (layer) {
|
||||
case _WORKMAN:
|
||||
red_led_off;
|
||||
grn_led_off;
|
||||
break;
|
||||
case _FUNC:
|
||||
red_led_off;
|
||||
grn_led_on;
|
||||
break;
|
||||
case _NUMS:
|
||||
red_led_on;
|
||||
grn_led_off;
|
||||
break;
|
||||
case _NMFN:
|
||||
red_led_on;
|
||||
grn_led_on;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
// A simple (but technically inaccurate) model of the momentary layer state:
|
||||
// Fn1 key makes _xS active; indicator = red
|
||||
// Fn2 key makes _xN active; indicator = blue
|
||||
// Both keys make _xF active; indicator = purple
|
||||
// Toggling QWERTY mode makes indicator include green, so (red/blue/purple becomes yellow/cyan/white)
|
||||
|
||||
// negated because for ports 0=LED on.
|
||||
uint32_t portf_bits = ~(layer_state|layer_state<<1|(layer_state&0b100)<<3);
|
||||
setbits(PORTF, portf_bits, 0b00110000);
|
||||
setbits(PORTD, ~layer_state, 0b00000010);
|
||||
}
|
||||
|
||||
// vim: set sw=2 et:
|
||||
|
74
keyboards/mitosis/keymaps/datagrok/readme.md
Normal file
74
keyboards/mitosis/keymaps/datagrok/readme.md
Normal file
@@ -0,0 +1,74 @@
|
||||

|
||||
|
||||
[Keyboard layout editor source](http://www.keyboard-layout-editor.com/#/gists/e1a6a7a480fd4984c0bed38ee35f6c4f)
|
||||
|
||||
# a layout for the Mitosis
|
||||
|
||||
- Emphasis on momentary modifiers, all usable from either hand, arranged
|
||||
symmetrically, but distinguishable left/right by the OS. Shift, Fn1
|
||||
("Lower"), Fn2 ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper.
|
||||
|
||||
- Fn1 and Fn2 are used to momentary-enable (like a shift key) one of three layers:
|
||||
|
||||
- Fn1 (Red): Symbols layer
|
||||
- Fn2 (Blue): Numbers layer
|
||||
- Both: Functions layer
|
||||
|
||||
- The base layer is a slight variant of [Workman][]. QWERTY may be toggled-on.
|
||||
|
||||
- Paired programming symbols (braces, brackets, parentheses) are arranged
|
||||
symmetrically in the symbols layer. `?` and `!` are moved to take the place
|
||||
of `<` and `>`.
|
||||
|
||||
- No OS keymap modification required.
|
||||
|
||||
## Design notes
|
||||
|
||||
- **I use an 8Mhz Pro Micro.** If you want to use this keymap with the standard
|
||||
16Mhz Pro Micro specified in the Mitosis design:
|
||||
|
||||
- Remove the lines in `rules.mk` mentioning `F_CPU` and `F_USB`.
|
||||
- Remove the lines in `config.h` mentioning `SERIAL_UART_BAUD`.
|
||||
|
||||
- I'm learning a new key placement, so might as well go all out and use an
|
||||
optimal non-QWERTY layout.
|
||||
|
||||
- I like the way Workman feels and some of its advantages over Colemak.
|
||||
Unfortunately, it was designed using a weighting system based on a standard
|
||||
column-staggered keyboard so is probably not as optimal as one could achieve
|
||||
on an ergonomic board like the Mitosis.
|
||||
|
||||
- Arrows in the home position (on a layer). Mod+Arrows = PgUp/PgDn/Home/End,
|
||||
which is intuitive for me
|
||||
|
||||
### Abandoned ideas
|
||||
|
||||
- ~~"Since QWERTY and Workman keep angle brackets together, place other
|
||||
enclosing symbols on the same keys. This informs the numbers placement,
|
||||
which informs the function-key placement."~~
|
||||
|
||||
- I tried this and it was bad. I don't like having to pick the right
|
||||
modifier to get the right flavor of bracket. Instead, now, one modifier
|
||||
activates a symbols layer where all brackets are easily accessible.
|
||||
|
||||
- Space/Enter to the left of layer select for Enter doesn't work well; I always
|
||||
trigger space first.
|
||||
|
||||
- I used to have Blue layer on ring finger, but that was too hard to use in
|
||||
conjunction with shift.
|
||||
|
||||
## To do
|
||||
|
||||
- Improve LED indications (may require modding bluetooth firmware):
|
||||
- Is any board nonresponsive (which one?)
|
||||
- Does either board have a low battery?
|
||||
- Add Insert, PrintScr, Pause/Break
|
||||
- Make QWERTY base layer for people who customize layout in software? Store
|
||||
default base layer in eeprom?
|
||||
- See if the henkans placement is at all useful for Japanese speakers, or abuse
|
||||
different keysyms
|
||||
- Mod a speaker onto my receiver and enable tones
|
||||
- Implement "layer lock" key
|
||||
- Improve tri-layer behavior
|
||||
|
||||
[Workman]: https://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/
|
15
keyboards/mitosis/keymaps/datagrok/rules.mk
Normal file
15
keyboards/mitosis/keymaps/datagrok/rules.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
# I use an 8Mhz Pro Micro
|
||||
F_CPU = 8000000
|
||||
# Necessary, with above change?
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
# vim: set ts=8 noet:
|
@@ -28,4 +28,15 @@ void matrix_scan_kb(void) {
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ONEHAND_ENABLE
|
||||
__attribute__ ((weak))
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||
{{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||
{{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||
{{9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||
{{9, 4}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
|
||||
};
|
||||
#endif
|
||||
|
@@ -5,7 +5,7 @@ This nyquist layout is based on my Ergodox Infinity Layout, which is [here](../.
|
||||
## Layers
|
||||
|
||||
### QWERTY
|
||||
The shift modifiers on this layer all use OSM to allow for quick single capitalization. Press and hold F to go to the VIM movement layer. Layer is also a one-shot layer toggle, and can be held down to type multiple characters on the Lower layer. Game is a regular toggle layer.
|
||||
The shift modifiers on this layer all use OSM to allow for quick single capitalization. LwrVIM acts a combo one-shot toggle and momentary layer toggle. Tap once to make the next key be sent on the Lower. Hold to move to the Lower layer until release. Tap and hold (so press, release, press and hold) to move to the VIM layer until release. Game is a regular toggle layer.
|
||||
|
||||
```
|
||||
Qwerty
|
||||
@@ -14,11 +14,11 @@ Qwerty
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
|
||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
| Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " |
|
||||
| Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift|
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Lock | = | Game | Del |
|
||||
| Ctrl | Alt | F4 | GUI |LwrVIM| Bksp | Spc | Ent | Lock | = | RAlt | Del |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
@@ -36,7 +36,7 @@ Lower
|
||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
| APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Pscr | | | | | | 0 | . | = | Prev | Next | Play |
|
||||
| Pscr | | | | | GAME | 0 | . | = | Prev | Next | Play |
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
|
@@ -1,20 +1,18 @@
|
||||
#include "nyquist.h"
|
||||
#include "action_layer.h"
|
||||
#include "action_util.h"
|
||||
#include "eeconfig.h"
|
||||
#include "333fred.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _VIM 2
|
||||
#define _GAME 3
|
||||
|
||||
enum custom_macros {
|
||||
DLEFT,
|
||||
DRIGHT,
|
||||
PSCREEN_APP
|
||||
};
|
||||
|
||||
// Tap dance for layer transitions
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
@@ -27,22 +25,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D |LTVIMF| G | H | J | K | L | ; | " |
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | F4 | GUI |Lower | Bksp | Spc | Ent | Alt | + | Game | Del |
|
||||
* | Ctrl | Alt | F4 | GUI |Lwr/VM| Bksp | Spc | Ent | Lock | = | Alt | Del |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP( \
|
||||
[BASE] = KEYMAP( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \
|
||||
KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, TG(_GAME), KC_DEL \
|
||||
KC_LCTL, KC_LALT, KC_F4, KC_LGUI, TD(TD_SYM_VIM), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, KC_RALT, KC_DEL \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
/* Symbols
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
@@ -52,36 +50,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Pscr | | | | | | 0 | . | = | Prev | Next | Play |
|
||||
* | Pscr | | | | | GAME | 0 | . | = | Prev | Next | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP( \
|
||||
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \
|
||||
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \
|
||||
M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \
|
||||
KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \
|
||||
[SYMB] = KEYMAP( \
|
||||
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \
|
||||
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \
|
||||
M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \
|
||||
KC_PSCR, _______, _______, _______, _______, TG(GAME), KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Vim Movement (Hold down F)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* | | | | LSHFT| | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | |
|
||||
* | | DLeft|DRight| LCTRL| LGUI | | Left | Down | Up | Right| | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | LShft| | | | | | | |
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_VIM] = KEYMAP( \
|
||||
[VIM] = KEYMAP( \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Gaming mode (Raise)
|
||||
@@ -98,12 +96,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | Enter| | Lock | Bksp | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GAME] = KEYMAP( \
|
||||
[GAME] = KEYMAP( \
|
||||
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, \
|
||||
KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSL(_LOWER), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(_QWERTY) \
|
||||
KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSL(SYMB), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(BASE) \
|
||||
)
|
||||
|
||||
};
|
||||
@@ -133,3 +131,8 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
tap_dance_process_record(keycode);
|
||||
return true;
|
||||
}
|
||||
|
@@ -1,6 +1,7 @@
|
||||
KEY_LOCK_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
|
@@ -23,6 +23,4 @@
|
||||
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45 \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_5x12 KEYMAP
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -63,4 +63,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_5x12 KEYMAP
|
||||
|
||||
#endif
|
||||
|
@@ -54,7 +54,7 @@
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 2, "x": 5.5, "y": 3 },
|
||||
{ "w": 2, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
|
@@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6061
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Ortholinear Keyboards
|
||||
#define MANUFACTURER OLKB
|
||||
#define PRODUCT The Preonic Keyboard
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
|
141
keyboards/preonic/info.json
Normal file
141
keyboards/preonic/info.json
Normal file
@@ -0,0 +1,141 @@
|
||||
{
|
||||
"keyboard_name": "Preonic",
|
||||
"keyboard_folder": "preonic",
|
||||
"manufacturer": "OLKB",
|
||||
"identifier": "FEED:6061:0001",
|
||||
"url": "https://olkb.com/preonic",
|
||||
"maintainer": "jackhumbert",
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"width": 12,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_preonic_mit": {
|
||||
"key_count": 59,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 8, "y": 0 },
|
||||
{ "w": 1, "x": 9, "y": 0 },
|
||||
{ "w": 1, "x": 10, "y": 0 },
|
||||
{ "w": 1, "x": 11, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 8, "y": 1 },
|
||||
{ "w": 1, "x": 9, "y": 1 },
|
||||
{ "w": 1, "x": 10, "y": 1 },
|
||||
{ "w": 1, "x": 11, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 8, "y": 2 },
|
||||
{ "w": 1, "x": 9, "y": 2 },
|
||||
{ "w": 1, "x": 10, "y": 2 },
|
||||
{ "w": 1, "x": 11, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 1, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 6, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
{ "w": 1, "x": 10, "y": 3 },
|
||||
{ "w": 1, "x": 11, "y": 3 },
|
||||
{ "w": 1, "x": 0, "y": 4 },
|
||||
{ "w": 1, "x": 1, "y": 4 },
|
||||
{ "w": 1, "x": 2, "y": 4 },
|
||||
{ "w": 1, "x": 3, "y": 4 },
|
||||
{ "w": 1, "x": 4, "y": 4 },
|
||||
{ "w": 2, "x": 5, "y": 4 },
|
||||
{ "w": 1, "x": 7, "y": 4 },
|
||||
{ "w": 1, "x": 8, "y": 4 },
|
||||
{ "w": 1, "x": 9, "y": 4 },
|
||||
{ "w": 1, "x": 10, "y": 4 },
|
||||
{ "w": 1, "x": 11, "y": 4 } ]
|
||||
},
|
||||
"LAYOUT_preonic_grid": {
|
||||
"key_count": 60,
|
||||
"layout": [
|
||||
{ "w": 1, "x": 0, "y": 0 },
|
||||
{ "w": 1, "x": 1, "y": 0 },
|
||||
{ "w": 1, "x": 2, "y": 0 },
|
||||
{ "w": 1, "x": 3, "y": 0 },
|
||||
{ "w": 1, "x": 4, "y": 0 },
|
||||
{ "w": 1, "x": 5, "y": 0 },
|
||||
{ "w": 1, "x": 6, "y": 0 },
|
||||
{ "w": 1, "x": 7, "y": 0 },
|
||||
{ "w": 1, "x": 8, "y": 0 },
|
||||
{ "w": 1, "x": 9, "y": 0 },
|
||||
{ "w": 1, "x": 10, "y": 0 },
|
||||
{ "w": 1, "x": 11, "y": 0 },
|
||||
{ "w": 1, "x": 0, "y": 1 },
|
||||
{ "w": 1, "x": 1, "y": 1 },
|
||||
{ "w": 1, "x": 2, "y": 1 },
|
||||
{ "w": 1, "x": 3, "y": 1 },
|
||||
{ "w": 1, "x": 4, "y": 1 },
|
||||
{ "w": 1, "x": 5, "y": 1 },
|
||||
{ "w": 1, "x": 6, "y": 1 },
|
||||
{ "w": 1, "x": 7, "y": 1 },
|
||||
{ "w": 1, "x": 8, "y": 1 },
|
||||
{ "w": 1, "x": 9, "y": 1 },
|
||||
{ "w": 1, "x": 10, "y": 1 },
|
||||
{ "w": 1, "x": 11, "y": 1 },
|
||||
{ "w": 1, "x": 0, "y": 2 },
|
||||
{ "w": 1, "x": 1, "y": 2 },
|
||||
{ "w": 1, "x": 2, "y": 2 },
|
||||
{ "w": 1, "x": 3, "y": 2 },
|
||||
{ "w": 1, "x": 4, "y": 2 },
|
||||
{ "w": 1, "x": 5, "y": 2 },
|
||||
{ "w": 1, "x": 6, "y": 2 },
|
||||
{ "w": 1, "x": 7, "y": 2 },
|
||||
{ "w": 1, "x": 8, "y": 2 },
|
||||
{ "w": 1, "x": 9, "y": 2 },
|
||||
{ "w": 1, "x": 10, "y": 2 },
|
||||
{ "w": 1, "x": 11, "y": 2 },
|
||||
{ "w": 1, "x": 0, "y": 3 },
|
||||
{ "w": 1, "x": 1, "y": 3 },
|
||||
{ "w": 1, "x": 2, "y": 3 },
|
||||
{ "w": 1, "x": 3, "y": 3 },
|
||||
{ "w": 1, "x": 4, "y": 3 },
|
||||
{ "w": 1, "x": 5, "y": 3 },
|
||||
{ "w": 1, "x": 6, "y": 3 },
|
||||
{ "w": 1, "x": 7, "y": 3 },
|
||||
{ "w": 1, "x": 8, "y": 3 },
|
||||
{ "w": 1, "x": 9, "y": 3 },
|
||||
{ "w": 1, "x": 10, "y": 3 },
|
||||
{ "w": 1, "x": 11, "y": 3 },
|
||||
{ "w": 1, "x": 0, "y": 4 },
|
||||
{ "w": 1, "x": 1, "y": 4 },
|
||||
{ "w": 1, "x": 2, "y": 4 },
|
||||
{ "w": 1, "x": 3, "y": 4 },
|
||||
{ "w": 1, "x": 4, "y": 4 },
|
||||
{ "w": 1, "x": 5, "y": 4 },
|
||||
{ "w": 1, "x": 6, "y": 4 },
|
||||
{ "w": 1, "x": 7, "y": 4 },
|
||||
{ "w": 1, "x": 8, "y": 4 },
|
||||
{ "w": 1, "x": 9, "y": 4 },
|
||||
{ "w": 1, "x": 10, "y": 4 },
|
||||
{ "w": 1, "x": 11, "y": 4 } ]
|
||||
}
|
||||
}
|
||||
}
|
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define PREONIC_MIT( \
|
||||
#define LAYOUT_preonic_mit( \
|
||||
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, \
|
||||
@@ -18,7 +18,7 @@
|
||||
{ k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4a, k4b } \
|
||||
}
|
||||
|
||||
#define PREONIC_GRID( \
|
||||
#define LAYOUT_preonic_grid( \
|
||||
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, \
|
||||
@@ -33,7 +33,7 @@
|
||||
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \
|
||||
}
|
||||
|
||||
#define KEYMAP PREONIC_MIT
|
||||
#define LAYOUT_ortho_5x12 PREONIC_GRID
|
||||
#define KEYMAP LAYOUT_preonic_mit
|
||||
#define LAYOUT_ortho_5x12 LAYOUT_preonic_grid
|
||||
|
||||
#endif
|
||||
|
@@ -5,8 +5,8 @@ Preonic
|
||||
|
||||
A compact 50% (12x5) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/preonic/)
|
||||
|
||||
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
|
||||
Hardware Supported: Preonic PCB rev1, Teensy 2.0
|
||||
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
|
||||
Hardware Supported: Preonic PCB rev1, Teensy 2.0
|
||||
Hardware Availability: [OLKB.com](https://olkb.com/preonic/), [Massdrop](https://www.massdrop.com/buy/preonic-mechanical-keyboard?mode=guest_open)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
@@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | L1 | L2 | | | Layer hold
|
||||
*/
|
||||
[_NP] = /* Numpad */
|
||||
SINGLES_KEYMAP(KC_P7, KC_P8, KC_P9, KC_BSPC, \
|
||||
LAYOUT_ortho_4x4(KC_P7, KC_P8, KC_P9, KC_BSPC, \
|
||||
KC_P4, KC_P5, KC_P6, KC_TAB, \
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
LT(1, KC_P0), LT(2, KC_SPC), KC_PDOT, KC_PSLS),
|
||||
@@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_L1] = /* LAYER 1 */
|
||||
SINGLES_KEYMAP(RESET, XXXXXXX, XXXXXXX, KC_DEL, \
|
||||
LAYOUT_ortho_4x4(RESET, XXXXXXX, XXXXXXX, KC_DEL, \
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \
|
||||
STR192, STR255, XXXXXXX, XXXXXXX, \
|
||||
_______, BL_STEP, _______, XXXXXXX),
|
||||
@@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_L2] = /* LAYER 2 */
|
||||
SINGLES_KEYMAP(XXXXXXX, XXXXXXX, ADMIN, SMSPC1, \
|
||||
LAYOUT_ortho_4x4(XXXXXXX, XXXXXXX, ADMIN, SMSPC1, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, _______, XXXXXXX, XXXXXXX)
|
||||
|
@@ -23,12 +23,12 @@ extern keymap_config_t keymap_config;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_NP] = /* Numpad */
|
||||
SINGLES_KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
||||
LAYOUT_ortho_4x4(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
||||
KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, \
|
||||
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
|
||||
KC_KP_0, KC_KP_DOT, TG(_L1), KC_BSPC),
|
||||
[_L1] = /* LAYER 1 */
|
||||
SINGLES_KEYMAP(KC_NUMLOCK, KC_TRNS, KC_TRNS, KC_VOLU, \
|
||||
LAYOUT_ortho_4x4(KC_NUMLOCK, KC_TRNS, KC_TRNS, KC_VOLU, \
|
||||
KC_TRNS, KC_UP, KC_TRNS, KC_VOLD, \
|
||||
KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
|
@@ -147,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_NP] = /* Numpad */
|
||||
SINGLES_KEYMAP(KC_7, KC_8, KC_9, KC_SLASH, \
|
||||
LAYOUT_ortho_4x4(KC_7, KC_8, KC_9, KC_SLASH, \
|
||||
KC_4, KC_5, KC_6, KC_KP_ASTERISK, \
|
||||
KC_1, KC_2, KC_3, KC_MINUS, \
|
||||
TD(TD_0_L3), TD(TD_DOT_L2), TD(TD_KP_PLUS_L1), TD(TD_EQUAL_NP)),
|
||||
@@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_L1] = /* LAYER 1 */
|
||||
SINGLES_KEYMAP(KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \
|
||||
LAYOUT_ortho_4x4(KC_ESCAPE, KC_BSPACE, KC_HOME, KC_PGUP, \
|
||||
KC_TAB, KC_UP, KC_END, KC_PGDOWN, \
|
||||
KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
@@ -181,7 +181,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_L2] = /* LAYER 2 */
|
||||
SINGLES_KEYMAP(KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \
|
||||
LAYOUT_ortho_4x4(KC_SYSTEM_SLEEP, KC_MS_BTN1, KC_MS_BTN2, KC_AUDIO_VOL_UP, \
|
||||
LALT(KC_F4), KC_F11, LGUI(KC_TAB), KC_AUDIO_VOL_DOWN, \
|
||||
KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
@@ -199,7 +199,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_L3] = /* LAYER 3 */
|
||||
SINGLES_KEYMAP(KC_WWW_BACK, KC_WWW_HOME, KC_WWW_FORWARD, KC_F5, \
|
||||
LAYOUT_ortho_4x4(KC_WWW_BACK, KC_WWW_HOME, KC_WWW_FORWARD, KC_F5, \
|
||||
KC_CALCULATOR, LCTL(KC_Z), LCTL(KC_Y), KC_WWW_SEARCH, \
|
||||
LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_F), \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
@@ -17,7 +17,7 @@
|
||||
{ K30, KC_NO, K32, KC_NO } \
|
||||
}
|
||||
|
||||
#define SINGLES_KEYMAP( \
|
||||
#define LAYOUT_ortho_4x4( \
|
||||
K00, K01, K02, K03, \
|
||||
K10, K11, K12, K13, \
|
||||
K20, K21, K22, K23, \
|
||||
@@ -30,6 +30,4 @@
|
||||
{ K30, K31, K32, K33 } \
|
||||
}
|
||||
|
||||
#define LAYOUT_ortho_4x4 SINGLES_KEYMAP
|
||||
|
||||
#endif
|
||||
|
26
keyboards/satan/keymaps/dkrieger/config.h
Normal file
26
keyboards/satan/keymaps/dkrieger/config.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/* Tap Dance */
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
167
keyboards/satan/keymaps/dkrieger/keymap.c
Normal file
167
keyboards/satan/keymaps/dkrieger/keymap.c
Normal file
@@ -0,0 +1,167 @@
|
||||
#include "satan.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define _DEFAULT 0
|
||||
#define _FN 1
|
||||
#define _MOUSE 2
|
||||
#define _MOUSESHIFT 3
|
||||
#define _UTIL 4
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define ______ KC_TRNS
|
||||
|
||||
enum {
|
||||
SUPER_FN = 0,
|
||||
SINGLE_HOLD = 1,
|
||||
DOUBLE_HOLD = 2,
|
||||
TRIPLE_HOLD = 3
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tap;
|
||||
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->interrupted == false || state->pressed) {
|
||||
if (state->count < 2) return SINGLE_HOLD;
|
||||
if (state->count < 3) return DOUBLE_HOLD;
|
||||
else return TRIPLE_HOLD;
|
||||
}
|
||||
else return 9;
|
||||
}
|
||||
|
||||
//instantiate an instance of 'tap' for the 'fn' tap dance.
|
||||
static tap fn_tap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void fn_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
fn_tap_state.state = cur_dance(state);
|
||||
switch (fn_tap_state.state) {
|
||||
/* case SINGLE_HOLD: register_code(MO(_FN)); break; */
|
||||
case SINGLE_HOLD: layer_on(_FN); break;
|
||||
case DOUBLE_HOLD: layer_on(_MOUSE); break;
|
||||
case TRIPLE_HOLD: layer_on(_UTIL);
|
||||
}
|
||||
}
|
||||
|
||||
void fn_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (fn_tap_state.state) {
|
||||
case SINGLE_HOLD: layer_off(_FN); break;
|
||||
case DOUBLE_HOLD: layer_off(_MOUSE); layer_off(_MOUSESHIFT); break;
|
||||
case TRIPLE_HOLD: layer_off(_UTIL);
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[SUPER_FN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, fn_finished, fn_reset)
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Qwerty gui/alt/space/alt/gui
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* |LGUI | LAlt | Space | RAlt |RGUI |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_DEFAULT] = KEYMAP_HHKB( /* Basic QWERTY */
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSPC, \
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TD(SUPER_FN), \
|
||||
______, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, ______, ______ \
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | CAPS | BL- | BL+ | BL | | | | | Psc | Slck| Paus| Up | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | Stop | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_FN] = KEYMAP_HHKB( /* Layer 1 */
|
||||
______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \
|
||||
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
|
||||
______, KC_VOLD,KC_VOLU,KC_MUTE,______, ______, KC_PAST,KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \
|
||||
______, KC_MPRV,KC_MPLY,KC_MNXT,______, ______, KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______, ______, \
|
||||
______, ______, ______, ______, KC_MSTP, ______, ______, ______ \
|
||||
),
|
||||
|
||||
/* MOUSE Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | |RESET|
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | | |UCurs| | |
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | |LCurs|RCurs| |
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | ScrollHold| | | | | | | | | |DCurs| ScrollHold| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | LClick | MClick| RClick|
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_MOUSE] = KEYMAP_HHKB(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_UP, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_LEFT, KC_MS_RIGHT, ______, \
|
||||
MO(_MOUSESHIFT), ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_DOWN, MO(_MOUSESHIFT), ______, \
|
||||
______, ______, ______, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, ______, ______ \
|
||||
),
|
||||
|
||||
/* MOUSESHIFT Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | | |UScrl| | |
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | |LScrl|RScrl| |
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | |DScrl| | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_MOUSESHIFT] = KEYMAP_HHKB(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_WH_UP, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_WH_LEFT, KC_MS_WH_RIGHT, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_WH_DOWN, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______ \
|
||||
),
|
||||
|
||||
/* UTIL Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | |RESET|
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
[_UTIL] = KEYMAP_HHKB(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______ \
|
||||
)
|
||||
};
|
23
keyboards/satan/keymaps/dkrieger/readme.md
Normal file
23
keyboards/satan/keymaps/dkrieger/readme.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# dkrieger HHKB like Layout
|
||||
|
||||
Base derived from dbroqua (special thanks)
|
||||
|
||||
Based on HHKB with the following [dip switches][1] engaged:
|
||||
|
||||
- SW3: delete key -> backspace
|
||||
- SW5: swap alt and meta keys
|
||||
- SW2: Mac Mode (partial implementation, includes media keys
|
||||
- Note: this was copied from dbroqua, there seem to have been some
|
||||
modifications from stock Mac Mode
|
||||
|
||||
Additionally, this layout includes a mouse layer engaged by tapping Fn 3 times,
|
||||
holding on the third time. The arrow keys move the mouse, scrolling when shift
|
||||
is held (either left or right). Right alt is left click, right meta is right
|
||||
click.
|
||||
|
||||
# Programming Instructions:
|
||||
Enter into programming mode and run the following command.
|
||||
```
|
||||
$ sudo KEYMAP=dkrieger_hhkb make dfu
|
||||
```
|
||||
[1]: http://www.elitekeyboards.com/products.php?sub=pfu_keyboards,hhkbpro2&pid=pdkb400b
|
22
keyboards/satan/keymaps/dkrieger/rules.mk
Normal file
22
keyboards/satan/keymaps/dkrieger/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
26
keyboards/xd60/keymaps/petesmom/README.md
Normal file
26
keyboards/xd60/keymaps/petesmom/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# pete's mom Layout
|
||||
|
||||
Customized xd60 keymap based on yuuki's but a step sideways with Mac support. For Pete on his 40th
|
||||
|
||||
## Programming Instructions
|
||||
|
||||
Change the layout in `keymap.c` then run `make xd60-petesmom`. The compiled file will be located in `.build/xd60_petesmom.hex` relative to the project root. To flash it onto your keyboard, use whatever program works on your OS. I personally use `dfu-programmer`, and run:
|
||||
|
||||
* `sudo dfu-programmer atmega32u4 erase`
|
||||
* `sudo dfu-programmer atmega32u4 flash .build/xd60-petesmom.hex`
|
||||
* `sudo dfu-programmer atmega32u4 start`
|
||||
|
||||
## Layout
|
||||
|
||||
See `keymap.c` for the details, but here are the important features:
|
||||
|
||||
| Key | Function |
|
||||
| -------------------------- | ---------------------------------- |
|
||||
| ESC | ESC when pressed alone but acts as ~ when pressed with Shift or LGUI down |
|
||||
| FN + ESC | Grave |
|
||||
| Right Shift | When tapped generates / |
|
||||
| FN + HJKL | Arrow Keys |
|
||||
| FN + C | ^ |
|
||||
| FN + V | & |
|
||||
| FN + , . RShift | Mac Vol - + Mute |
|
||||
| FN + P [ ] \ | Mac Play/Pause, Prev Track, Next Track, Stop |
|
28
keyboards/xd60/keymaps/petesmom/keymap.c
Normal file
28
keyboards/xd60/keymaps/petesmom/keymap.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "xd60.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define BASE 0
|
||||
#define FN 1
|
||||
|
||||
#define CTL_SLSH CTL_T(KC_SLSH)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// 0: Base Layer
|
||||
[BASE] = 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_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_NO, KC_ENT, \
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, RSFT_T(KC_SLASH), KC_UP, KC_RCTL, \
|
||||
CTL_SLSH, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(FN), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
// 1: Function Layer
|
||||
[FN] = 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, KC_DEL, KC_DEL, \
|
||||
KC_TRNS, RGB_MOD, RGB_VAI, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MRWD, KC_MFFD, KC_MSTP, \
|
||||
KC_TRNS, RGB_TOG, RGB_VAD, KC_MUTE, KC_VOLU, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_ENT, \
|
||||
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_TRNS, KC_TRNS, KC_TRNS,KC__VOLDOWN,KC__VOLUP,KC_NO, KC__MUTE,KC_PGUP, RESET, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN,KC_END
|
||||
),
|
||||
|
||||
};
|
@@ -5,24 +5,23 @@
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - |
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
| TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ |
|
||||
| TAB | Q | W | E | R | T | L1 | | L2 | Y | U | I | O | P | \ |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L |; / : | ' |
|
||||
|--------+------+------+------+------+------| L1 | |TT(3) |------+------+------+------+------+--------|
|
||||
| Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|
||||
|--------+------+------+------+------+------| L2 | |TT(3) |------+------+------+------+------+--------|
|
||||
| LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
|LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,-------------.
|
||||
| Copy | Paste| | Alt |Ctrl/Esc|
|
||||
| Copy | Paste| | Copy | Paste |
|
||||
,------|------|------| |------+--------+------.
|
||||
| | | PgUp | | PgDn | | |
|
||||
| Bcksp|OSL(2)|------| |------| Ent |Space |
|
||||
| | | Del | |OSL(2)| | |
|
||||
| | VIM | Del | |OSL(2)| | |
|
||||
`--------------------' `----------------------'
|
||||
```
|
||||
* Double-click `;` to get a `:`
|
||||
* Press-and-hold `f` to go to the movement layer
|
||||
* For a single tap or single hold, OSL behaves like OSL(SYMB). For a tap + hold, it behaves like MO(VIM).
|
||||
|
||||
### Keymap 1: Code Layer
|
||||
```
|
||||
@@ -38,7 +37,7 @@
|
||||
| | | | | | | F12 |GoToIm| FAR | | |
|
||||
`----------------------------------' `----------------------------------'
|
||||
,-------------. ,---------------.
|
||||
|Format|Build | | Test | DTest |
|
||||
|Format|Build | | Copy | Paste |
|
||||
,------|------|------| |------+--------+------.
|
||||
| | |Refact| |Sort U| | |
|
||||
| | |------| |------| | |
|
||||
@@ -46,13 +45,11 @@
|
||||
`--------------------' `----------------------'
|
||||
```
|
||||
* Build - Visualt Studio Build Solution. Sends `CTRL + SHFT + B`
|
||||
* DTest - Visual Studio Debug Test. Sends `CTRL + R, CTRL + T`
|
||||
* FAR - Visual Studio Find All References. Sends `CTRL + K, R`
|
||||
* Format - Visual Studio Format. Sends `CTRL + K, CTRL + D`
|
||||
* GoToIm - Visual Studio Go To Implementation. Sends `CTRL + F12`
|
||||
* Refact - Visual Studio Refactor. Sends `CTRL + R, R`
|
||||
* Sort U - Visual Studio Sort Usings. Sends `CTRL + R, CTRL + G`
|
||||
* Test - Visual Studio Run Test. Sends `CTRL + R, T`
|
||||
|
||||
|
||||
### Keymap 2: Symbol Layer
|
||||
@@ -105,9 +102,9 @@
|
||||
,--------------------------------------------------. ,--------------------------------------------------.
|
||||
| | | | | | | | | | | | | | | |
|
||||
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
| |KOpen |KType | | | | | | | Copy | | | | Paste| |
|
||||
| |KOpen |KType | LSFT | | | | | | Copy | | | | Paste| |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| |DLeft |DRight| LCTL | | |------| |------| Left | Down | Up | Right| | |
|
||||
| |DLeft |DRight| LCTL | LGUI | |------| |------| Left | Down | Up | Right| | |
|
||||
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
| |SFT_TB| Tab | | | | | | | | | | | | |
|
||||
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
@@ -117,7 +114,7 @@
|
||||
| | | | Home | End |
|
||||
,------|------|------| |------+------+------.
|
||||
| | | | | | | |
|
||||
| | LSFT |------| |------| | |
|
||||
| | |------| |------| | |
|
||||
| | | | | | | |
|
||||
`--------------------' `--------------------'
|
||||
```
|
||||
|
@@ -2,12 +2,7 @@
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define CODE 1 // code layer
|
||||
#define SYMB 2 // symbols
|
||||
#define MDIA 3 // media keys
|
||||
#define MOVE 4 // movement layer
|
||||
#include "333fred.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
@@ -48,20 +43,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | = | | L1 | 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | Q | W | E | R | T | L2 | | L2 | Y | U | I | O | P | \ |
|
||||
* | TAB | Q | W | E | R | T | L1 | | L2 | Y | U | I | O | P | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Esc | A | S | D |LT 3,F| G |------| |------| H | J | K | L | ; | ' |
|
||||
* |--------+------+------+------+------+------| L1 | |MO(3) |------+------+------+------+------+--------|
|
||||
* |--------+------+------+------+------+------| L2 | |MO(3) |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |LCTRL | F4 | F5 | LGUI | LALT | | Left | Down | Up | Right| RGUI |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | Copy | Paste| | Alt | Lock |
|
||||
* | Copy | Paste| | Copy | Paste |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | PgUp | | PgDn | | |
|
||||
* | Bcksp|OSL(2)|------| |------| Ent |Space |
|
||||
* | | | Del | | RCtrl| | |
|
||||
* | | VIM | Del | | RCtrl| | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
@@ -69,22 +64,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = LAYOUT_ergodox( // layer 0 : default
|
||||
// left hand
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
|
||||
KC_ESC, KC_A, KC_S, KC_D, LT(MOVE, KC_F),KC_G,
|
||||
OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(CODE),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(CODE),
|
||||
KC_ESC, KC_A, KC_S, KC_D, LT(VIM, KC_F),KC_G,
|
||||
OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(SYMB),
|
||||
OSM(MOD_LCTL), KC_F4, KC_F5, KC_LGUI,KC_LALT,
|
||||
LCTL(KC_C),LCTL(KC_V),
|
||||
KC_PGUP,
|
||||
KC_BSPC,OSL(SYMB), KC_DEL,
|
||||
LCTL(KC_C), LCTL(KC_V),
|
||||
KC_PGUP,
|
||||
KC_BSPC,TD(TD_SYM_VIM), KC_DEL,
|
||||
// right hand
|
||||
TG(CODE), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
MO(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT),
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, KC_RGUI,
|
||||
KC_RALT, KC_LOCK,
|
||||
LCTL(KC_C), LCTL(KC_V),
|
||||
KC_PGDN,
|
||||
KC_RCTL, KC_ENT, KC_SPC
|
||||
KC_RCTL, KC_ENT, KC_SPC
|
||||
),
|
||||
/* Keymap 1: Code Layer
|
||||
*
|
||||
@@ -100,10 +95,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | F12 |GoToIm| FAR | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,---------------.
|
||||
* |Format|Build | | Test | DTest |
|
||||
* |Format|Build | | Copy | Paste |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | |Refact| |Sort U| | |
|
||||
* | | |------| |------| | |
|
||||
* | |ACCESS|------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
@@ -126,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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_F12, M(GO_TO_IMPL),M(FIND_ALL_REF),KC_TRNS, KC_TRNS,
|
||||
M(TEST), M(DEBUG_TEST),
|
||||
LCTL(KC_C), LCTL(KC_V),
|
||||
M(REMOVE_SORT_USINGS),
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
@@ -218,9 +213,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | |KOpen |KType | | | | | | | Copy | | | | Paste| |
|
||||
* | |KOpen |KType |LSHFT | | | | | | Copy | | | | Paste| |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |DLeft |DRight|LCTRL |ACCESS| |------| |------| Left | Down | Up | Right| | |
|
||||
* | |DLeft |DRight|LCTRL | LGUI | |------| |------| Left | Down | Up | Right| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |SFT_TB| TAB | | | | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
@@ -230,20 +225,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | Home | End |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | |LSHIFT|------| |------| | |
|
||||
* | |ACCESS|------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MEDIA AND MOUSE
|
||||
[MOVE] = LAYOUT_ergodox(
|
||||
[VIM] = LAYOUT_ergodox(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, M(KEEPASS_OPEN),M(KEEPASS_TYPE),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, M(DLEFT), M(DRIGHT), KC_LCTL, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, M(KEEPASS_OPEN),M(KEEPASS_TYPE),KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, KC_TRNS,
|
||||
KC_TRNS, M(LSFT_TAB), KC_TAB, 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_LSFT, 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, LCTL(KC_C),KC_TRNS, KC_TRNS, KC_TRNS, LCTL(KC_V),KC_TRNS,
|
||||
@@ -349,6 +344,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
tap_dance_process_record(keycode);
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
|
@@ -3,6 +3,7 @@ LCD_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
KEY_LOCK_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
|
||||
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
// Update array in the source code with the C array produced by the conversion program
|
||||
|
||||
// The image below is generated from lcd_logo.png
|
||||
__attribute__((weak))
|
||||
const uint8_t resource_lcd_logo[512] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
@@ -64,10 +64,15 @@ void default_layer_xor(uint32_t state)
|
||||
uint32_t layer_state = 0;
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
return layer_state_set_user(state);
|
||||
}
|
||||
|
||||
static void layer_state_set(uint32_t state)
|
||||
{
|
||||
state = layer_state_set_kb(state);
|
||||
|
@@ -72,6 +72,8 @@ void layer_xor(uint32_t state);
|
||||
#define layer_xor(state)
|
||||
#define layer_debug()
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t layer_state_set_user(uint32_t state);
|
||||
__attribute__((weak))
|
||||
uint32_t layer_state_set_kb(uint32_t state);
|
||||
#endif
|
||||
|
@@ -7,6 +7,7 @@
|
||||
# define PROGMEM
|
||||
# define pgm_read_byte(p) *((unsigned char*)p)
|
||||
# define pgm_read_word(p) *((uint16_t*)p)
|
||||
# define pgm_read_dword(p) *((uint32_t*)p)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
63
users/333fred/333fred.c
Normal file
63
users/333fred/333fred.c
Normal file
@@ -0,0 +1,63 @@
|
||||
#include "333fred.h"
|
||||
#include "quantum.h"
|
||||
#include "action.h"
|
||||
|
||||
typedef enum {
|
||||
SINGLE_TAP, SINGLE_HOLD, DOUBLE
|
||||
} tap_dance_state_enum;
|
||||
|
||||
static tap_dance_state_enum tap_dance_state;
|
||||
static bool tap_dance_active = false;
|
||||
|
||||
void tap_dance_layer_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
// Determine the current state
|
||||
if (state->count == 1) {
|
||||
if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP;
|
||||
else tap_dance_state = SINGLE_HOLD;
|
||||
} else {
|
||||
// Handle any number of other taps as a VIM movement hold
|
||||
tap_dance_state = DOUBLE;
|
||||
}
|
||||
|
||||
switch (tap_dance_state) {
|
||||
case SINGLE_TAP:
|
||||
if (tap_dance_active) {
|
||||
reset_oneshot_layer();
|
||||
tap_dance_active = false;
|
||||
} else {
|
||||
set_oneshot_layer(SYMB, ONESHOT_START);
|
||||
tap_dance_active = true;
|
||||
}
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
layer_on(SYMB);
|
||||
break;
|
||||
case DOUBLE:
|
||||
layer_on(VIM);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void tap_dance_layer_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch(tap_dance_state) {
|
||||
case SINGLE_TAP:
|
||||
clear_oneshot_layer_state(ONESHOT_PRESSED);
|
||||
break;
|
||||
case SINGLE_HOLD:
|
||||
layer_off(SYMB);
|
||||
break;
|
||||
case DOUBLE:
|
||||
layer_off(VIM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_layer_finished, tap_dance_layer_reset)
|
||||
};
|
||||
|
||||
void tap_dance_process_record(uint16_t keycode) {
|
||||
if (tap_dance_state == SINGLE_TAP && keycode != TD(TD_SYM_VIM)) {
|
||||
tap_dance_active = false;
|
||||
}
|
||||
}
|
22
users/333fred/333fred.h
Normal file
22
users/333fred/333fred.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef FRED_333
|
||||
#define FRED_333
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define BASE 0
|
||||
#define CODE 1 // code layer
|
||||
#define SYMB 2
|
||||
#define MDIA 3 // media keys
|
||||
#define VIM 4
|
||||
#define GAME 5
|
||||
|
||||
// Tap dance config shared between my keyboards
|
||||
enum tap_dance_declarations {
|
||||
TD_SYM_VIM = 0
|
||||
};
|
||||
|
||||
void tap_dance_layer_finished(qk_tap_dance_state_t*, void*);
|
||||
void tap_dance_layer_reset(qk_tap_dance_state_t*, void*);
|
||||
void tap_dance_process_record(uint16_t);
|
||||
|
||||
#endif
|
2
users/333fred/rules.mk
Normal file
2
users/333fred/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
SRC += 333fred.c
|
Reference in New Issue
Block a user