mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-07 12:49:09 +00:00
Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cf9f6bbd91 | ||
![]() |
41df0dc9a7 | ||
![]() |
30dc34d529 | ||
![]() |
e899cb8940 | ||
![]() |
80e489e122 | ||
![]() |
29d1abff07 | ||
![]() |
b546da0a19 | ||
![]() |
f357bd0ccc | ||
![]() |
685d4c2f97 | ||
![]() |
535c2f60a9 | ||
![]() |
65eaab8a1a | ||
![]() |
18f3cd1123 | ||
![]() |
e45ce2dcb3 | ||
![]() |
137456e5b1 | ||
![]() |
ec59147507 | ||
![]() |
074b78700a | ||
![]() |
432674781a | ||
![]() |
4e41beeaa6 | ||
![]() |
00733f4b87 | ||
![]() |
19753788c1 | ||
![]() |
54a8abd785 |
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
----------------------- ------------------
|
||||
|
@@ -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
|
||||
|
30
keyboards/ergodox_ez/keymaps/default/config.h
Normal file
30
keyboards/ergodox_ez/keymaps/default/config.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
Copyright 2017 Jack Humbert <jack.humbgmail.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 ERGODOX_EZ_USER_CONFIG_H
|
||||
#define ERGODOX_EZ_USRE_CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||
#define RGBLIGHT_COLOR_LAYER_1 0xFF, 0x00, 0x00
|
||||
#define RGBLIGHT_COLOR_LAYER_2 0x00, 0xFF, 0x00
|
||||
#define RGBLIGHT_COLOR_LAYER_3 0xFF, 0xFF, 0x00
|
||||
#define RGBLIGHT_COLOR_LAYER_4 0x00, 0xFF, 0xFF
|
||||
#define RGBLIGHT_COLOR_LAYER_5 0xFF, 0x00, 0xFF
|
||||
|
||||
#endif
|
@@ -197,27 +197,53 @@ void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 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();
|
||||
|
||||
uint8_t layer = biton32(state);
|
||||
switch (layer) {
|
||||
// TODO: Make this relevant to the ErgoDox EZ.
|
||||
case SYMB:
|
||||
case 0:
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_1
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
|
||||
#endif
|
||||
break;
|
||||
case MDIA:
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_2
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
case 3:
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_3
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_4
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_5
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
||||
return state;
|
||||
};
|
@@ -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
|
||||
|
@@ -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
|
@@ -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
|
||||
|
Reference in New Issue
Block a user