Merge remote-tracking branch 'upstream/master'
@ -1,12 +1,12 @@
|
||||
[submodule "lib/chibios"]
|
||||
path = lib/chibios
|
||||
url = https://github.com/ChibiOS/ChibiOS.git
|
||||
url = https://github.com/qmk/ChibiOS
|
||||
[submodule "lib/chibios-contrib"]
|
||||
path = lib/chibios-contrib
|
||||
url = https://github.com/ChibiOS/ChibiOS-Contrib.git
|
||||
url = https://github.com/qmk/ChibiOS-Contrib
|
||||
[submodule "lib/ugfx"]
|
||||
path = lib/ugfx
|
||||
url = https://bitbucket.org/Tectu/ugfx
|
||||
url = https://github.com/qmk/uGFX
|
||||
[submodule "lib/googletest"]
|
||||
path = lib/googletest
|
||||
url = https://github.com/google/googletest
|
||||
|
@ -0,0 +1,30 @@
|
||||
# Copyright 2017 Fred Sundvik
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include $(TMK_PATH)/protocol.mk
|
||||
|
||||
TEST_PATH=tests/$(TEST)
|
||||
|
||||
$(TEST)_SRC= \
|
||||
$(TEST_PATH)/test.cpp \
|
||||
$(TMK_COMMON_SRC) \
|
||||
$(QUANTUM_SRC) \
|
||||
tests/test_common/matrix.c \
|
||||
tests/test_common/test_driver.cpp \
|
||||
tests/test_common/keyboard_report_util.cpp \
|
||||
tests/test_common/test_fixture.cpp
|
||||
$(TEST)_DEFS=$(TMK_COMMON_DEFS)
|
||||
$(TEST)_CONFIG=$(TEST_PATH)/config.h
|
||||
VPATH+=$(TOP_DIR)/tests/test_common
|
@ -0,0 +1,153 @@
|
||||
# Copyright 2017 Fred Sundvik
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
SERIAL_DIR := $(QUANTUM_DIR)/serial_link
|
||||
SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||
SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
|
||||
SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
|
||||
SERIAL_DEFS += -DSERIAL_LINK_ENABLE
|
||||
COMMON_VPATH += $(SERIAL_PATH)
|
||||
|
||||
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
||||
OPT_DEFS += -DAPI_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/api.c
|
||||
MIDI_ENABLE=yes
|
||||
endif
|
||||
|
||||
MUSIC_ENABLE := 0
|
||||
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
OPT_DEFS += -DMIDI_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||
endif
|
||||
|
||||
ifeq ($(MUSIC_ENABLE), 1)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||
OPT_DEFS += -DCOMBO_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||
OPT_DEFS += -DVIRTSER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||
OPT_DEFS += -DUCIS_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODEMAP_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODE_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||
OPT_DEFS += -DPRINTING_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
||||
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||
OPT_DEFS += $(SERIAL_DEFS)
|
||||
VAPTH += $(SERIAL_PATH)
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(VARIABLE_TRACE)),)
|
||||
SRC += $(QUANTUM_DIR)/variable_trace.c
|
||||
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
|
||||
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
|
||||
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LCD_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CIE1931_CURVE)), yes)
|
||||
OPT_DEFS += -DUSE_CIE1931_CURVE
|
||||
LED_TABLES = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
|
||||
OPT_DEFS += -DUSE_LED_BREATHING_TABLE
|
||||
LED_TABLES = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_TABLES)), yes)
|
||||
SRC += $(QUANTUM_DIR)/led_tables.c
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
||||
endif
|
@ -1,215 +0,0 @@
|
||||
# Macro shortcuts: Send a whole string when pressing just one key
|
||||
|
||||
Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c).
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
|
||||
{
|
||||
switch(id) {
|
||||
case 0: // this would trigger when you hit a key mapped as M(0)
|
||||
if (record->event.pressed) {
|
||||
return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
A macro can include the following commands:
|
||||
|
||||
* I() change interval of stroke in milliseconds.
|
||||
* D() press key.
|
||||
* U() release key.
|
||||
* T() type key(press and release).
|
||||
* W() wait (milliseconds).
|
||||
* END end mark.
|
||||
|
||||
So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends.
|
||||
|
||||
Note: Using macros to have your keyboard send passwords for you is possible, but a bad idea.
|
||||
|
||||
## Advanced macro functions
|
||||
|
||||
To get more control over the keys/actions your keyboard takes, the following functions are available to you in the `action_get_macro` function block:
|
||||
|
||||
* `record->event.pressed`
|
||||
|
||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||
|
||||
```c
|
||||
if (record->event.pressed) {
|
||||
// on keydown
|
||||
} else {
|
||||
// on keyup
|
||||
}
|
||||
```
|
||||
|
||||
* `register_code(<kc>);`
|
||||
|
||||
This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
|
||||
|
||||
* `unregister_code(<kc>);`
|
||||
|
||||
Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
|
||||
|
||||
* `layer_on(<n>);`
|
||||
|
||||
This will turn on the layer `<n>` - the higher layer number will always take priority. Make sure you have `KC_TRNS` for the key you're pressing on the layer you're switching to, or you'll get stick there unless you have another plan.
|
||||
|
||||
* `layer_off(<n>);`
|
||||
|
||||
This will turn off the layer `<n>`.
|
||||
|
||||
* `clear_keyboard();`
|
||||
|
||||
This will clear all mods and keys currently pressed.
|
||||
|
||||
* `clear_mods();`
|
||||
|
||||
This will clear all mods currently pressed.
|
||||
|
||||
* `clear_keyboard_but_mods();`
|
||||
|
||||
This will clear all keys besides the mods currently pressed.
|
||||
|
||||
* `update_tri_layer(layer_1, layer_2, layer_3);`
|
||||
|
||||
If the user attempts to activate layer 1 AND layer 2 at the same time (for example, by hitting their respective layer keys), layer 3 will be activated. Layers 1 and 2 will _also_ be activated, for the purposes of fallbacks (so a given key will fall back from 3 to 2, to 1 -- and only then to 0).
|
||||
|
||||
### Naming your macros
|
||||
|
||||
If you have a bunch of macros you want to refer to from your keymap, while keeping the keymap easily readable, you can just name them like so:
|
||||
|
||||
```
|
||||
#define AUD_OFF M(6)
|
||||
#define AUD_ON M(7)
|
||||
#define MUS_OFF M(8)
|
||||
#define MUS_ON M(9)
|
||||
#define VC_IN M(10)
|
||||
#define VC_DE M(11)
|
||||
#define PLOVER M(12)
|
||||
#define EXT_PLV M(13)
|
||||
```
|
||||
|
||||
As was done on the [Planck default keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/default/keymap.c#L33-L40)
|
||||
|
||||
#### Timer functionality
|
||||
|
||||
It's possible to start timers and read values for time-specific events - here's an example:
|
||||
|
||||
```c
|
||||
static uint16_t key_timer;
|
||||
key_timer = timer_read();
|
||||
if (timer_elapsed(key_timer) < 100) {
|
||||
// do something if less than 100ms have passed
|
||||
} else {
|
||||
// do something if 100ms or more have passed
|
||||
}
|
||||
```
|
||||
|
||||
It's best to declare the `static uint16_t key_timer;` outside of the macro block (top of file, etc).
|
||||
|
||||
### Example: Single-key copy/paste (hold to copy, tap to paste)
|
||||
|
||||
With QMK, it's easy to make one key do two things, as long as one of those things is being a modifier. :) So if you want a key to act as Ctrl when held and send the letter R when tapped, that's easy: `CTL_T(KC_R)`. But what do you do when you want that key to send Ctrl-V (paste) when tapped, and Ctrl-C (copy) when held?
|
||||
|
||||
Here's what you do:
|
||||
|
||||
|
||||
```
|
||||
static uint16_t key_timer;
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
}
|
||||
else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
And then, to assign this macro to a key on your keyboard layout, you just use `M(0)` on the key you want to press for copy/paste.
|
||||
|
||||
# Dynamic macros: record and replay macros in runtime
|
||||
|
||||
In addition to the static macros described above, you may enable the dynamic macros which you may record while writing. They are forgotten as soon as the keyboard is unplugged. Only two such macros may be stored at the same time, with the total length of 64 keypresses (by default).
|
||||
|
||||
To enable them, first add a new element to the `planck_keycodes` enum — `DYNAMIC_MACRO_RANGE`:
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
EXT_PLV,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
It must be the last element because `dynamic_macros.h` will add some more keycodes after it.
|
||||
|
||||
Below it include the `dynamic_macro.h` header:
|
||||
|
||||
#include "dynamic_macro.h"`
|
||||
|
||||
Add the following keys to your keymap:
|
||||
|
||||
- `DYN_REC_START1` — start recording the macro 1,
|
||||
- `DYN_REC_START2` — start recording the macro 2,
|
||||
- `DYN_MACRO_PLAY1` — replay the macro 1,
|
||||
- `DYN_MACRO_PLAY2` — replay the macro 2,
|
||||
- `DYN_REC_STOP` — finish the macro that is currently being recorded.
|
||||
|
||||
Add the following code to the very beginning of your `process_record_user()` function:
|
||||
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
That should be everything necessary. To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To finish the recording, press the `DYN_REC_STOP` layer button. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`.
|
||||
|
||||
Note that it's possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again.
|
||||
|
||||
For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, use the following snippet instead of the one above:
|
||||
|
||||
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
If the LED-s start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
|
||||
|
||||
For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
|
||||
|
||||
# Sending strings
|
||||
Some people want to have a password or some text on a key. This is possible without having to do every key individually using `SEND_STRING("<text>");`. Note the caps, because `send_string("<text>");` does something else. For example:
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
|
||||
{
|
||||
switch(id) {
|
||||
case 0: // this would trigger when you hit a key mapped as M(0)
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("QMK is the best thing ever!"); // This would type "QMK is the best thing ever!" (without quotation marks).
|
||||
return false; // This is false because it has to return something.
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
If you'd want it to press enter as well, just replace `return false;` with `return MACRO( T(ENT), END );`.
|
@ -1,62 +0,0 @@
|
||||
Keyboard Firmware Projects other than TMK
|
||||
================================
|
||||
## PJRC USB Keyboard/Mouse Example[USB][PJRC][Teensy][AVR]
|
||||
- <http://www.pjrc.com/teensy/usb_keyboard.html>
|
||||
- <http://www.pjrc.com/teensy/usb_mouse.html>
|
||||
|
||||
## kbupgrade[USB][V-USB][AVR]
|
||||
- <http://github.com/rhomann/kbupgrade>
|
||||
- <http://geekhack.org/showwiki.php?title=Island:8406>
|
||||
|
||||
## c64key[USB][V-USB][AVR]
|
||||
- <http://symlink.dk/projects/c64key/>
|
||||
|
||||
## rump[USB][V-USB][AVR]
|
||||
- <http://mg8.org/rump/>
|
||||
- <http://github.com/clee/rump>
|
||||
|
||||
## dulcimer[USB][V-USB][AVR]
|
||||
- <http://www.schatenseite.de/dulcimer.html>
|
||||
|
||||
## humblehacker-keyboard[USB][LUFA][AVR][Ergo]
|
||||
- <http://github.com/humblehacker>
|
||||
- <http://www.humblehacker.com/keyboard/>
|
||||
- <http://geekhack.org/showwiki.php?title=Island:6292>
|
||||
|
||||
## ps2avr[PS/2][AVR]
|
||||
- <http://sourceforge.net/projects/ps2avr/>
|
||||
|
||||
## ErgoDox[Ergo][Split][USB][AVR]
|
||||
- <http://geekhack.org/index.php?topic=22780.0>
|
||||
- <https://github.com/benblazak/ergodox-firmware>
|
||||
- <https://github.com/cub-uanic/tmk_keyboard>
|
||||
|
||||
## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
|
||||
- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
|
||||
- <https://github.com/frobiac/adnw>
|
||||
|
||||
## bpiphany's AVR-Keyboard[PJRC][AVR][USB]
|
||||
- <https://github.com/BathroomEpiphanies/AVR-Keyboard>
|
||||
- <http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions>
|
||||
- <http://deskthority.net/wiki/Phantom>
|
||||
|
||||
## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino]
|
||||
- <http://forum.colemak.com/viewtopic.php?pid=10837>
|
||||
- <https://github.com/darkytoothpaste/keymapper>
|
||||
|
||||
## USB-USB converter threads[converter][USB-USB]
|
||||
- <http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html>
|
||||
- <http://geekhack.org/index.php?topic=19458.0>
|
||||
|
||||
## kbdbabel.org[converter][vintage][protocol][8051]
|
||||
Great resource of vintage keyboard protocol information and code
|
||||
|
||||
- <http://www.kbdbabel.org/>
|
||||
|
||||
## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex]
|
||||
A lots of vintage keyboard protocol supports
|
||||
|
||||
- <https://github.com/kiibohd/controller>
|
||||
|
||||
## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo]
|
||||
- <https://github.com/chrisandreae/kinesis-firmware>
|
@ -1,26 +0,0 @@
|
||||
|
||||
### Getting started
|
||||
* [Introduction](/Home.md)
|
||||
* [QMK Overview](/QMK-Overview.md)
|
||||
* [Build Environment Setup](/Build-Environment-Setup.md)
|
||||
|
||||
### Making a keymap
|
||||
* [Keymap overview](/Keymap.md)
|
||||
* [Keycodes](/Keycodes.md)
|
||||
* [Layer switching](/Key-Functions.md)
|
||||
* [Leader Key](/Leader-Key.md)
|
||||
* [Macros](/Macros.md)
|
||||
* [Space Cadet](/Space-Cadet-Shift.md)
|
||||
* [Tap Dance](/Tap-Dance.md)
|
||||
* [Mouse keys](/Mouse-keys.md)
|
||||
* [FAQ: Creating a Keymap](/FAQ-Keymap.md)
|
||||
* [FAQ: Compiling QMK](/FAQ-Build.md)
|
||||
|
||||
### For hardware makers and modders
|
||||
* [Modding your keyboard](/Modding-your-keyboard.md)
|
||||
* [Porting your keyboard to QMK](/Porting-your-keyboard-to-QMK.md)
|
||||
* [Adding features to QMK](/Adding-features-to-QMK.md)
|
||||
|
||||
### Other topics
|
||||
* [General FAQ](/FAQ.md)
|
||||
* [Differences from TMK](/Differences-from-TMK.md)
|
@ -1,21 +0,0 @@
|
||||
* [Wiki Home](/qmk/qmk_firmware/wiki)
|
||||
* Getting started
|
||||
* [QMK Overview](QMK-Overview)
|
||||
* [Build Environment Setup](Build-Environment-Setup)
|
||||
* [Overview for keymap creators](Keymap)
|
||||
* [Keycodes](Keycodes)
|
||||
* [Layer switching](Key-Functions)
|
||||
* [Leader Key](Leader-Key)
|
||||
* [Macros](Macros)
|
||||
* [Space Cadet](Space-Cadet-Shift)
|
||||
* [Tap Dance](Tap-Dance)
|
||||
* [Mouse keys](Mouse-keys)
|
||||
* [FAQ: Creating a Keymap](FAQ-Keymap)
|
||||
* [FAQ: Compiling QMK](FAQ-Build)
|
||||
* For hardware makers and modders
|
||||
* [Modding your keyboard](Modding-your-keyboard)
|
||||
* [Porting your keyboard to QMK](Porting-your-keyboard-to-QMK)
|
||||
* [Adding features to QMK](Adding-features-to-QMK)
|
||||
* [General FAQ](FAQ)
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
|
||||
### Getting started
|
||||
* [Introduction](home.md)
|
||||
* [QMK Overview](qmk_overview.md)
|
||||
* [Build Environment Setup](build_environment_setup.md)
|
||||
|
||||
### Making a keymap
|
||||
* [Keymap overview](keymap.md)
|
||||
* [Custom Quantum Functions](custom_quantum_functions.md)
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Layer switching](key_functions.md)
|
||||
* [Leader Key](leader_key.md)
|
||||
* [Macros](macros.md)
|
||||
* [Dynamic Macros](dynamic_macros.md)
|
||||
* [Space Cadet](space_cadet_shift.md)
|
||||
* [Tap Dance](tap_dance.md)
|
||||
* [Mouse keys](mouse_keys.md)
|
||||
* [FAQ: Creating a Keymap](faq_keymap.md)
|
||||
* [FAQ: Compiling QMK](faq_build.md)
|
||||
|
||||
### For hardware makers and modders
|
||||
* [Adding a keyboard to QMK](adding_a_keyboard_to_qmk.md)
|
||||
* [Porting your keyboard to QMK](porting_your_keyboard_to_qmk.md)
|
||||
* [Modding your keyboard](modding_your_keyboard.md)
|
||||
* [Adding features to QMK](adding_features_to_qmk.md)
|
||||
|
||||
### Other topics
|
||||
* [General FAQ](faq.md)
|
||||
* [Differences from TMK](differences_from_tmk.md)
|
@ -0,0 +1,35 @@
|
||||
# Adding your keyboard to QMK
|
||||
|
||||
We welcome all keyboard projects into QMK, but ask that you try to stick to a couple guidelines that help us keep things organised and consistent.
|
||||
|
||||
## Naming your directory/project
|
||||
|
||||
All names should be lowercase alphanumeric, and separated by an underscore (`_`), but not begin with one. Dashes (`-`) aren't allow by our build system, and will confuse it with keymaps/subprojects. Your directory and your `.h` and `.c` files should have exactly the same name. Subprojects/revision should follow the same format.
|
||||
|
||||
## `readme.md`
|
||||
|
||||
All projects need to have a `readme.md` file that explains what the keyboard is, who made it, where it is available, and links to move information (template coming).
|
||||
|
||||
## Image/Hardware files
|
||||
|
||||
In an effort to keep the repo size down, we're no longer accepting images of any format in the repo, with few exceptions. Hosting them elsewhere (imgur) and linking them in the readme.md is the preferred method.
|
||||
|
||||
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be store, and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||
|
||||
## 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!
|
||||
|
||||
## Warnings as errors
|
||||
|
||||
When developing your keyboard, keep in mind that all warnings will be treated as errors - these small warnings can build-up and cause larger errors down the road (and keeping them is generally a bad practice).
|
||||
|
||||
## Licenses
|
||||
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, it this format:
|
||||
|
||||
Copyright 2017 Your Name <your@email.com>
|
||||
|
||||
## Technical details
|
||||
|
||||
If you're looking for more information on making your keyboard work with QMK, [check out this guide](porting_your_keyboard_to_qmk.md)!
|
@ -0,0 +1,63 @@
|
||||
# Dynamic macros: record and replay macros in runtime
|
||||
|
||||
QMK supports temporarily macros created on the fly. We call these Dynamic Macros. They are defined by the user from the keyboard and are lost when the keyboard is unplugged or otherwise rebooted.
|
||||
|
||||
You can store one or two macros and they may have a combined total of 128 keypresses. You can increase this size at the cost of RAM.
|
||||
|
||||
To enable them, first add a new element to the `planck_keycodes` enum — `DYNAMIC_MACRO_RANGE`:
|
||||
|
||||
```c
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
EXT_PLV,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
```
|
||||
|
||||
It must be the last element because `dynamic_macros.h` will add some more keycodes after it.
|
||||
|
||||
Below it include the `dynamic_macro.h` header:
|
||||
|
||||
```c
|
||||
#include "dynamic_macro.h"`
|
||||
```
|
||||
|
||||
Add the following keys to your keymap:
|
||||
|
||||
* `DYN_REC_START1` — start recording the macro 1,
|
||||
* `DYN_REC_START2` — start recording the macro 2,
|
||||
* `DYN_MACRO_PLAY1` — replay the macro 1,
|
||||
* `DYN_MACRO_PLAY2` — replay the macro 2,
|
||||
* `DYN_REC_STOP` — finish the macro that is currently being recorded.
|
||||
|
||||
Add the following code to the very beginning of your `process_record_user()` function:
|
||||
|
||||
```c
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
That should be everything necessary. To start recording the macro, press either `DYN_REC_START1` or `DYN_REC_START2`. To finish the recording, press the `DYN_REC_STOP` layer button. To replay the macro, press either `DYN_MACRO_PLAY1` or `DYN_MACRO_PLAY2`.
|
||||
|
||||
Note that it's possible to replay a macro as part of a macro. It's ok to replay macro 2 while recording macro 1 and vice versa but never create recursive macros i.e. macro 1 that replays macro 1. If you do so and the keyboard will get unresponsive, unplug the keyboard and plug it again.
|
||||
|
||||
For users of the earlier versions of dynamic macros: It is still possible to finish the macro recording using just the layer modifier used to access the dynamic macro keys, without a dedicated `DYN_REC_STOP` key. If you want this behavior back, use the following snippet instead of the one above:
|
||||
|
||||
```c
|
||||
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
|
||||
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
If the LED's start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by setting the `DYNAMIC_MACRO_SIZE` preprocessor macro (default value: 128; please read the comments for it in the header).
|
||||
|
||||
For the details about the internals of the dynamic macros, please read the comments in the `dynamic_macro.h` header.
|
@ -1,5 +1,5 @@
|
||||
## READ FIRST
|
||||
- https://github.com/jackhumbert/qmk_firmware/blob/master/doc/BUILD_GUIDE.md
|
||||
- https://github.com/qmk/qmk_firmware/blob/master/docs/build_guide.md
|
||||
|
||||
In short,
|
||||
|
@ -0,0 +1,158 @@
|
||||
# Macros - Send multiple keystrokes when pressing just one key
|
||||
|
||||
QMK has a number of ways to define and use macros. These can do anything you want- type common phrases for you, copypasta, repetitive game movements, or even help you code.
|
||||
|
||||
**Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets ahold of your keyboard will be able to access that information by opening a text editor.
|
||||
|
||||
# Macro Definitions
|
||||
|
||||
By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
This defines two macros which will be run when the key they are assigned to is pressed. If you'd like them to run when the release is released instead you can change the if statement:
|
||||
|
||||
```c
|
||||
if (!record->event.pressed) {
|
||||
```
|
||||
|
||||
## Macro Commands
|
||||
|
||||
A macro can include the following commands:
|
||||
|
||||
* I() change interval of stroke in milliseconds.
|
||||
* D() press key.
|
||||
* U() release key.
|
||||
* T() type key(press and release).
|
||||
* W() wait (milliseconds).
|
||||
* END end mark.
|
||||
|
||||
## Sending strings
|
||||
|
||||
Sometimes you just want a key to type out words or phrases. For the most common situations we've provided `SEND_STRING()`, which will type out your string for you instead of having to build a `MACRO()`. Right now it assumes a US keymap with a QWERTY layout, so if you are using something else it may not behave as you expect.
|
||||
|
||||
For example:
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
SEND_STRING("QMK is the best thing ever!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
## Mapping a Macro to a key
|
||||
|
||||
Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard:
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M(0), M(1)
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case 0:
|
||||
return MACRO(D(LSFT), T(H), U(LSFT), T(I), D(LSFT), T(1), U(LSFT), END);
|
||||
case 1:
|
||||
return MACRO(D(LSFT), T(B), U(LSFT), T(Y), T(E), D(LSFT), T(1), U(LSFT), END);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
When you press the key on the left it will type "Hi!" and when you press the key on the right it will type "Bye!".
|
||||
|
||||
## Naming your macros
|
||||
|
||||
If you have a bunch of macros you want to refer to from your keymap while keeping the keymap easily readable you can name them using `#define` at the top of your file.
|
||||
|
||||
```c
|
||||
#define M_HI M(0)
|
||||
#define M_BYE M(1)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
M_HI, M_BYE
|
||||
),
|
||||
};
|
||||
```
|
||||
|
||||
# Advanced macro functions
|
||||
|
||||
While working within the `action_get_macro()` function block there are some functions you may find useful. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||
|
||||
#### `record->event.pressed`
|
||||
|
||||
This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is
|
||||
|
||||
```c
|
||||
if (record->event.pressed) {
|
||||
// on keydown
|
||||
} else {
|
||||
// on keyup
|
||||
}
|
||||
```
|
||||
|
||||
#### `register_code(<kc>);`
|
||||
|
||||
This sends the `<kc>` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`.
|
||||
|
||||
#### `unregister_code(<kc>);`
|
||||
|
||||
Parallel to `register_code` function, this sends the `<kc>` keyup event to the computer. If you don't use this, the key will be held down until it's sent.
|
||||
|
||||
#### `clear_keyboard();`
|
||||
|
||||
This will clear all mods and keys currently pressed.
|
||||
|
||||
#### `clear_mods();`
|
||||
|
||||
This will clear all mods currently pressed.
|
||||
|
||||
#### `clear_keyboard_but_mods();`
|
||||
|
||||
This will clear all keys besides the mods currently pressed.
|
||||
|
||||
# Advanced Example: Single-key copy/paste (hold to copy, tap to paste)
|
||||
|
||||
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
|
||||
|
||||
```c
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
} else {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 73 KiB |
@ -0,0 +1,4 @@
|
||||
NKRO_ENABLE = true
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
@ -0,0 +1,10 @@
|
||||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||
|
||||
Atreus52 Modification
|
||||
=======================
|
||||
|
||||
Firmware for my custom keyboard based on the Atreus layout, but with 5 rows and only 5 columns per hand.
|
||||
More documentation coming soon.
|
||||
|
||||
# License
|
||||
GPL-3+
|
@ -0,0 +1,18 @@
|
||||
#include "../../config.h"
|
||||
|
||||
#undef MANUFACTURER
|
||||
#undef PRODUCT
|
||||
#undef DESCRIPTION
|
||||
#undef MATRIX_ROW_PINS
|
||||
#undef MATRIX_COL_PINS
|
||||
#undef DIODE_DIRECTION
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define MANUFACTURER Mesh Industries
|
||||
#define PRODUCT Atreus52 Treeboard
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus52
|
||||
|
||||
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { B2, B1, F7, F6, F5, F4, B6, D3, D2, D1, D0, D4, B3 }
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
@ -0,0 +1,99 @@
|
||||
#include "atreus62.h"
|
||||
|
||||
// Layers
|
||||
#define DVORAK 0
|
||||
#define QWERTY 1
|
||||
#define RAISE 2
|
||||
#define LOWER 3
|
||||
#define BDO 4
|
||||
#define RESETL 5
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[DVORAK] = KC_KEYMAP(
|
||||
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||
NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \
|
||||
NO, A, O, E, U, I, D, H, T, N, S, NO, \
|
||||
NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \
|
||||
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ),
|
||||
|
||||
[QWERTY] = KC_KEYMAP(
|
||||
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||
NO, Q, W, E, R, T, Y, U, I, O, P, NO, \
|
||||
NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \
|
||||
NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \
|
||||
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ),
|
||||
|
||||
[RAISE] = KC_KEYMAP(
|
||||
NO, MRWD, MPRV, MPLY, MNXT, MFFD, TRNS, MUTE, VOLD, VOLU, DEL, NO, \
|
||||
NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \
|
||||
NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \
|
||||
NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO ),
|
||||
|
||||
[LOWER] = KC_KEYMAP(
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO, \
|
||||
NO, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, NO, \
|
||||
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, DOT, TRNS, TRNS, TRNS, NO, \
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO ),
|
||||
|
||||
[BDO] = KC_KEYMAP(
|
||||
NO, ESC, 1, 2, 3, 4, 5, 0, SLSH, U, C, NO, \
|
||||
NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \
|
||||
NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \
|
||||
NO, T, Z, X, C, V, 8, B, N, M, L, NO, \
|
||||
NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO ),
|
||||
|
||||
[RESETL] = KEYMAP(
|
||||
KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_FN3,KC_NO )
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer
|
||||
[1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer
|
||||
[2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer
|
||||
[3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
}
|
||||
else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
static uint8_t qw_dv_swap_state = 0;
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
if (keycode == KC_LGUI) {
|
||||
if (record->event.pressed)
|
||||
qw_dv_swap_state |= 0b00000001;
|
||||
else
|
||||
qw_dv_swap_state &= ~(0b00000001);
|
||||
}
|
||||
if (keycode == KC_LCTL) {
|
||||
if (record->event.pressed)
|
||||
qw_dv_swap_state |= 0b00000010;
|
||||
else
|
||||
qw_dv_swap_state &= ~(0b00000010);
|
||||
}
|
||||
|
||||
if (qw_dv_swap_state == 0b00000011) {
|
||||
layer_invert(DVORAK);
|
||||
}
|
||||
return true;
|
||||
}
|
Before Width: | Height: | Size: 446 KiB |
Before Width: | Height: | Size: 415 KiB |
Before Width: | Height: | Size: 423 KiB |
Before Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 110 KiB |
@ -1,11 +1,2 @@
|
||||
```
|
||||
___ _____ _ _ _ __ __ _ __
|
||||
|__ \ / ____| | | | | | / / / /(_) / /
|
||||
||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / /
|
||||
|/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / /
|
||||
|_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _
|
||||
(_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_)
|
||||
```
|
||||
|
||||
# Jokrik's Clueboard Layout
|
||||
|
||||
|
Before Width: | Height: | Size: 105 KiB |
@ -1,2 +1,9 @@
|
||||
|
||||
MOUSEKEY_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
|
||||
MIDI_ENABLE = yes
|
||||
|
||||
# if MIDI_ENABLE is set to yes, then CONSOLE_ENABLE has to be disabled, because of the firmware size
|
||||
CONSOLE_ENABLE = false
|
||||
COMMAND_ENABLE = no
|
||||
|
@ -0,0 +1,44 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
#define MIDI_BASIC
|
||||
*/
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
/* Disabling rollover allows you to use the opposite shift key to cancel the space cadet state in the event
|
||||
of an erroneous press instead of emitting a pair of parentheses when the keys are released.
|
||||
*/
|
||||
#define DISABLE_SPACE_CADET_ROLLOVER
|
||||
|
||||
/*
|
||||
Setting the Space Cadet Parens for German layout
|
||||
|
||||
Default is
|
||||
#define LSPO_KEY KC_9
|
||||
#define RSPC_KEY KC_0
|
||||
*/
|
||||
#define LSPO_KEY KC_8
|
||||
#define RSPC_KEY KC_9
|
||||
|
||||
#endif
|
Before Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 140 KiB |