Compare commits
99 Commits
Author | SHA1 | Date | |
---|---|---|---|
0306e487e2 | |||
1d3b9eea94 | |||
2e8b32b9b5 | |||
79b58937f4 | |||
2f009d7461 | |||
e611433cb5 | |||
3542e573c8 | |||
b416113616 | |||
3c0c432836 | |||
b4ae07cbb1 | |||
8e47f64888 | |||
0ba9620d65 | |||
4d8eefc694 | |||
5dcb1114d7 | |||
af3956d8ba | |||
b5feae07c2 | |||
5d1ea88bf7 | |||
ba70ab1748 | |||
465559e166 | |||
cf596a0371 | |||
87ab49e403 | |||
fafb33d9dd | |||
f940b6c5fa | |||
d1f735b6d2 | |||
9667c10477 | |||
2dd031d4f0 | |||
6b1009b7a8 | |||
2a33d2c424 | |||
5be7d09b36 | |||
ae79b60e6b | |||
8cf7265f8f | |||
127ec5f1e3 | |||
2cc674c24d | |||
4822ad6be1 | |||
37b042a594 | |||
0f8431a57f | |||
58993d3cde | |||
b0d308eea1 | |||
17fbfcb898 | |||
a0d5e270eb | |||
6393135afa | |||
8df044b868 | |||
c6fd44cf26 | |||
09ee7da6de | |||
9d2b10d077 | |||
215375f37c | |||
59c846975d | |||
ebec12fbe8 | |||
c4680a6460 | |||
76afdd097a | |||
52f1206712 | |||
12406c646f | |||
e2f7c3d5a5 | |||
fa583e9c60 | |||
81c1bad7c0 | |||
1d0bc5b7ba | |||
3c26f07f5a | |||
0ebec1e411 | |||
ba05f9667b | |||
ade6f8e71a | |||
db8d68acdc | |||
cd819a7f7e | |||
94ba2e5a9f | |||
77399bfe51 | |||
d53432393b | |||
28929ad017 | |||
5fcca9a226 | |||
f97894d8db | |||
e48cb34de6 | |||
2fd86f4252 | |||
6630e4bb41 | |||
57fbf072f1 | |||
c768ffeb33 | |||
2dcce4c351 | |||
bc63da4fbf | |||
5287b94e6f | |||
9105bf2434 | |||
ee96b7a89d | |||
929065b1a9 | |||
c8cbee5d71 | |||
9bd4b932d0 | |||
a9982e3b6b | |||
246c3e4ef4 | |||
caf0c8e164 | |||
9ef46494b2 | |||
baaa138e90 | |||
4cde82ef57 | |||
87b277c21a | |||
3ea7c2a434 | |||
67adc29aa3 | |||
d8eace35eb | |||
52ccd8d89f | |||
cad0e3b90c | |||
81ad6cac7e | |||
9c136e1168 | |||
6ca52c9d57 | |||
9f3afae5d1 | |||
d55dc9b816 | |||
1950a145c7 |
31
Vagrantfile
vendored
31
Vagrantfile
vendored
@ -2,8 +2,11 @@
|
||||
# vi: set ft=ruby :
|
||||
|
||||
Vagrant.configure(2) do |config|
|
||||
# VMware/Virtualbox 64 bit
|
||||
config.vm.box = "phusion/ubuntu-14.04-amd64"
|
||||
# define a name instead of just 'default'
|
||||
config.vm.define "qmk_firmware"
|
||||
|
||||
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
|
||||
config.vm.box = "bento/ubuntu-16.04"
|
||||
|
||||
# This section allows you to customize the Virtualbox VM
|
||||
# settings, ie showing the GUI or upping the memory
|
||||
@ -15,13 +18,16 @@ Vagrant.configure(2) do |config|
|
||||
# your Teensy via the VM rather than your host OS
|
||||
#vb.customize ['modifyvm', :id, '--usb', 'on']
|
||||
#vb.customize ['usbfilter', 'add', '0',
|
||||
# '--target', :id,
|
||||
# '--name', 'teensy',
|
||||
# '--vendorid', '0x16c0',
|
||||
# '--productid','0x0478'
|
||||
# ]
|
||||
# '--target', :id,
|
||||
# '--name', 'teensy',
|
||||
# '--vendorid', '0x16c0',
|
||||
# '--productid','0x0478'
|
||||
# ]
|
||||
# Customize the amount of memory on the VM:
|
||||
vb.memory = "512"
|
||||
# Uncomment the below lines if you have time sync
|
||||
# issues with make and incremental builds
|
||||
#vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ]
|
||||
end
|
||||
|
||||
# This section allows you to customize the VMware VM
|
||||
@ -56,19 +62,18 @@ Vagrant.configure(2) do |config|
|
||||
# This script ensures the required packages for AVR programming are installed
|
||||
# It also ensures the system always gets the latest updates when powered on
|
||||
# If this causes issues you can run a 'vagrant destroy' and then
|
||||
# add a # before ,args: and run 'vagrant up' to get a working
|
||||
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
|
||||
# non-updated box and then attempt to troubleshoot or open a Github issue
|
||||
|
||||
config.vm.provision "shell", run: "always", path: "./util/qmk_install.sh", args: "-update"
|
||||
config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always"
|
||||
|
||||
config.vm.post_up_message = <<-EOT
|
||||
|
||||
Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is
|
||||
located at /vagrant
|
||||
To compile the .hex files use make command inside this directory.
|
||||
To compile the .hex files use make command inside this directory, e.g.
|
||||
cd /vagrant
|
||||
make <keyboard>:default
|
||||
|
||||
QMK's make format recently changed to use folder locations and colons:
|
||||
make project_folder:keymap[:target]
|
||||
Examples:
|
||||
make planck/rev4:default:dfu
|
||||
make planck:default
|
||||
|
@ -254,6 +254,7 @@ QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c
|
||||
|
||||
# Include the standard or split matrix code if needed
|
||||
ifneq ($(strip $(CUSTOM_MATRIX)), yes)
|
||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
|
||||
@ -262,11 +263,25 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Include the standard debounce code if needed
|
||||
ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes)
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
OPT_DEFS += -DSPLIT_KEYBOARD
|
||||
|
||||
# Include files used by all split keyboards
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
|
||||
$(QUANTUM_DIR)/split_common/split_util.c
|
||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c
|
||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c
|
||||
$(QUANTUM_DIR)/split_common/split_util.c
|
||||
|
||||
# Determine which (if any) transport files are required
|
||||
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
|
||||
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
||||
# Unused functions are pruned away, which is why we can add both drivers here without bloat.
|
||||
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \
|
||||
$(QUANTUM_DIR)/split_common/serial.c
|
||||
endif
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||
endif
|
||||
|
@ -143,7 +143,7 @@ If you define these options you will enable the associated feature, which may in
|
||||
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
|
||||
* `#define LEADER_TIMEOUT 300`
|
||||
* how long before the leader key times out
|
||||
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
|
||||
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
|
||||
* `#define LEADER_PER_KEY_TIMING`
|
||||
* sets the timer for leader key chords to run on each key press rather than overall
|
||||
* `#define LEADER_KEY_STRICT_KEY_PROCESSING`
|
||||
@ -197,6 +197,9 @@ If you define these options you will enable the associated feature, which may in
|
||||
|
||||
Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk
|
||||
|
||||
* `SPLIT_TRANSPORT = custom`
|
||||
* Allows replacing the standard split communication routines with a custom one. ARM based split keyboards must use this at present.
|
||||
|
||||
### Setting Handedness
|
||||
|
||||
One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave.
|
||||
@ -208,7 +211,7 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
|
||||
4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half
|
||||
|
||||
* `#define SPLIT_HAND_PIN B7`
|
||||
* `#define SPLIT_HAND_PIN B7`
|
||||
* For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
|
||||
|
||||
* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined)
|
||||
@ -302,6 +305,10 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Current options are AdafruitEzKey, AdafruitBLE, RN42
|
||||
* `SPLIT_KEYBOARD`
|
||||
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||
* `CUSTOM_MATRIX`
|
||||
* Allows replacing the standard matrix scanning routine with a custom one.
|
||||
* `CUSTOM_DEBOUNCE`
|
||||
* Allows replacing the standard key debouncing routine with a custom one.
|
||||
* `WAIT_FOR_USB`
|
||||
* Forces the keyboard to wait for a USB connection to be established before it starts up
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
|
@ -90,7 +90,7 @@ keyrecord_t record {
|
||||
|
||||
# LED Control
|
||||
|
||||
This allows you to control the 5 LED's defined as part of the USB Keyboard spec. It will be called when the state of one of those 5 LEDs changes.
|
||||
QMK provides methods to read the 5 LEDs defined as part of the HID spec:
|
||||
|
||||
* `USB_LED_NUM_LOCK`
|
||||
* `USB_LED_CAPS_LOCK`
|
||||
@ -98,31 +98,44 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
|
||||
* `USB_LED_COMPOSE`
|
||||
* `USB_LED_KANA`
|
||||
|
||||
These five constants correspond to the positional bits of the host LED state.
|
||||
There are two ways to get the host LED state:
|
||||
|
||||
* by implementing `led_set_user()`
|
||||
* by calling `host_keyboard_leds()`
|
||||
|
||||
## `led_set_user()`
|
||||
|
||||
This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a parameter.
|
||||
Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macros to check the LED status.
|
||||
|
||||
!> `host_keyboard_leds()` may already reflect a new value before `led_set_user()` is called.
|
||||
|
||||
### Example `led_set_user()` Implementation
|
||||
|
||||
```c
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||
PORTB |= (1<<0);
|
||||
} else {
|
||||
PORTB &= ~(1<<0);
|
||||
}
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
PORTB |= (1<<1);
|
||||
} else {
|
||||
PORTB &= ~(1<<1);
|
||||
}
|
||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
|
||||
PORTB |= (1<<2);
|
||||
} else {
|
||||
PORTB &= ~(1<<2);
|
||||
}
|
||||
if (usb_led & (1<<USB_LED_COMPOSE)) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) {
|
||||
PORTB |= (1<<3);
|
||||
} else {
|
||||
PORTB &= ~(1<<3);
|
||||
}
|
||||
if (usb_led & (1<<USB_LED_KANA)) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_KANA)) {
|
||||
PORTB |= (1<<4);
|
||||
} else {
|
||||
PORTB &= ~(1<<4);
|
||||
@ -135,10 +148,26 @@ void led_set_user(uint8_t usb_led) {
|
||||
* Keyboard/Revision: `void led_set_kb(uint8_t usb_led)`
|
||||
* Keymap: `void led_set_user(uint8_t usb_led)`
|
||||
|
||||
## `host_keyboard_leds()`
|
||||
|
||||
Call this function to get the last received LED state. This is useful for reading the LED state outside `led_set_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
|
||||
For convenience, you can use the `IS_HOST_LED_ON(led_name)` and `IS_HOST_LED_OFF(led_name)` macros instead of calling and checking `host_keyboard_leds()` directly.
|
||||
|
||||
## Setting Physical LED State
|
||||
|
||||
Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
|
||||
|
||||
### Ergodox Boards
|
||||
|
||||
The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index.
|
||||
|
||||
In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`.
|
||||
|
||||
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
|
||||
|
||||
# Matrix Initialization Code
|
||||
|
||||
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i²c controllers you will need to set up that hardware before it can be used.
|
||||
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LEDs or i²c controllers you will need to set up that hardware before it can be used.
|
||||
|
||||
|
||||
### Example `matrix_init_user()` Implementation
|
||||
@ -176,7 +205,7 @@ This example has been deliberately omitted. You should understand enough about Q
|
||||
|
||||
This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
|
||||
|
||||
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
|
||||
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LEDs or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
|
||||
|
||||
|
||||
# Keyboard Idling/Wake Code
|
||||
|
@ -25,7 +25,7 @@ These functions allow you to activate layers in various ways. Note that layers a
|
||||
|
||||
* `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).)
|
||||
* `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated.
|
||||
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers.
|
||||
* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers: `MOD_LCTL`, `MOD_LSFT`, `MOD_LALT`, `MOD_LGUI` (note the use of `MOD_` constants instead of `KC_`). These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`.
|
||||
* `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15.
|
||||
* `OSL(layer)` - momentarily activates *layer* until the next key is pressed. See [One Shot Keys](#one-shot-keys) for details and additional functionality.
|
||||
* `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa
|
||||
@ -60,21 +60,21 @@ Sometimes, you might want to switch between layers in a macro or as part of a ta
|
||||
|
||||
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|----------------------|----------------------------------------------------|
|
||||
|`LCTL(kc)`| |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`| |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` |
|
||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|----------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||
|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||
|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
||||
|
||||
You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
||||
|
||||
@ -110,20 +110,20 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
||||
|Key |Aliases |Description |
|
||||
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||
|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
||||
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||
|
||||
## Caveats
|
||||
|
||||
|
@ -32,15 +32,19 @@ The callback functions can be inserted into your `<keyboard>.c`:
|
||||
or `keymap.c`:
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
register_code(KC_PGDN);
|
||||
unregister_code(KC_PGDN);
|
||||
} else {
|
||||
register_code(KC_PGUP);
|
||||
unregister_code(KC_PGUP);
|
||||
}
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
} else if (index == 2) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_UP);
|
||||
} else {
|
||||
tap_code(KC_DOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
## Hardware
|
||||
|
@ -11,6 +11,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [Combos](feature_combo.md) - Custom actions for multiple key holds.
|
||||
* [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic").
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [Encoders](feature_encoders.md) - Rotary encoders!
|
||||
* [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave.
|
||||
* [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard.
|
||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||
|
@ -97,7 +97,7 @@ This allows you to send Unicode characters using `UC(<code point>)` in your keym
|
||||
|
||||
`UNICODEMAP_ENABLE`
|
||||
|
||||
This allows you to send Unicode characters using `X(<map index>)` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported.
|
||||
This allows you to send Unicode characters using `X(<map index>)` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported.
|
||||
|
||||
`UCIS_ENABLE`
|
||||
|
||||
@ -135,6 +135,18 @@ This enables [key lock](feature_key_lock.md). This consumes an additional 260 by
|
||||
|
||||
This enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
|
||||
|
||||
`SPLIT_TRANSPORT`
|
||||
|
||||
As there is no standard split communication driver for ARM-based split keyboards yet, `SPLIT_TRANSPORT = custom` must be used for these. It will prevent the standard split keyboard communication code (which is AVR-specific) from being included, allowing a custom implementation to be used.
|
||||
|
||||
`CUSTOM_MATRIX`
|
||||
|
||||
Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan().
|
||||
|
||||
`CUSTOM_DEBOUNCE`
|
||||
|
||||
Lets you replace the default key debouncing routine with your own code. You will need to provide your own implementation of debounce().
|
||||
|
||||
## Customizing Makefile Options on a Per-Keymap Basis
|
||||
|
||||
If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# GPIO Control
|
||||
|
||||
QMK has a GPIO control abstraction layer which is micro-controller agnostic. This is done to allow easy access to pin control across different platforms.
|
||||
QMK has a GPIO control abstraction layer which is microcontroller agnostic. This is done to allow easy access to pin control across different platforms.
|
||||
|
||||
## Functions
|
||||
|
||||
@ -17,7 +17,7 @@ The following functions can provide basic control of GPIOs and are found in `qua
|
||||
|`writePin(pin, level)`|Set pin level, assuming it is an output |
|
||||
|`readPin(pin)` |Returns the level of the pin |
|
||||
|
||||
## Advance settings
|
||||
## Advanced Settings
|
||||
|
||||
Each micro-controller can have multiple advance settings regarding its GPIO. This abstraction layer does not limit the use of architecture specific functions. Advance users should consult the datasheet of there desired device and include any needed libraries. For AVR the standard avr/io.h library is used and for STM32 the Chibios [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.
|
||||
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.
|
||||
|
||||
|
@ -53,7 +53,7 @@ This is pretty straight-forward - we'll be connecting like-things to like-things
|
||||
The only difference between the .hex files below is which pin is connected to RESET. You can use them on other boards as well, as long as you're aware of the pins being used. If for some reason neither of these pins are available, [create an issue](https://github.com/qmk/qmk_firmware/issues/new), and we can generate one for you!
|
||||
|
||||
* Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`)
|
||||
* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_mico_ISP_B6_10.hex) (`B6/10`)
|
||||
* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`B6/10`)
|
||||
|
||||
**Flash your Teenys/Pro Micro with one of these and continue - you won't need the file after flashing your ISP device.**
|
||||
|
||||
|
454
docs/keycodes.md
454
docs/keycodes.md
File diff suppressed because it is too large
Load Diff
@ -97,14 +97,14 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|
||||
## Lock Keys
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|--------------------|-------------------------|
|
||||
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock |
|
||||
|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock |
|
||||
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear|
|
||||
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
||||
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
||||
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock |
|
||||
|Key |Aliases |Description |
|
||||
|-------------------|--------------------|------------------------------------|
|
||||
|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock |
|
||||
|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)|
|
||||
|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |
|
||||
|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |
|
||||
|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |
|
||||
|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock |
|
||||
|
||||
## Modifiers
|
||||
|
||||
@ -144,48 +144,48 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
||||
|
||||
## Commands
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------------|-------------------|------------------------------|
|
||||
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|
||||
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`|Pause |
|
||||
|`KC_INSERT` |`KC_INS` |Insert |
|
||||
|`KC_HOME` | |Home |
|
||||
|`KC_PGUP` | |Page Up |
|
||||
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|
||||
|`KC_END` | |End |
|
||||
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|
||||
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|
||||
|`KC_LEFT` | |Left Arrow |
|
||||
|`KC_DOWN` | |Down Arrow |
|
||||
|`KC_UP` | |Up Arrow |
|
||||
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key)|
|
||||
|`KC_POWER` | |System Power (macOS/Linux) |
|
||||
|`KC_EXECUTE` |`KC_EXEC` |Execute |
|
||||
|`KC_HELP` | |Help |
|
||||
|`KC_MENU` | |Menu |
|
||||
|`KC_SELECT` |`KC_SLCT` |Select |
|
||||
|`KC_STOP` | |Stop |
|
||||
|`KC_AGAIN` |`KC_AGIN` |Again |
|
||||
|`KC_UNDO` | |Undo |
|
||||
|`KC_CUT` | |Cut |
|
||||
|`KC_COPY` | |Copy |
|
||||
|`KC_PASTE` |`KC_PSTE` |Paste |
|
||||
|`KC_FIND` | |Find |
|
||||
|`KC__MUTE` | |Mute (macOS) |
|
||||
|`KC__VOLUP` | |Volume Up (macOS) |
|
||||
|`KC__VOLDOWN` | |Volume Down (macOS) |
|
||||
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase |
|
||||
|`KC_SYSREQ` | |SysReq/Attention |
|
||||
|`KC_CANCEL` | |Cancel |
|
||||
|`KC_CLEAR` |`KC_CLR` |Clear |
|
||||
|`KC_PRIOR` | |Prior |
|
||||
|`KC_RETURN` | |Return |
|
||||
|`KC_SEPARATOR` | |Separator |
|
||||
|`KC_OUT` | |Out |
|
||||
|`KC_OPER` | |Oper |
|
||||
|`KC_CLEAR_AGAIN` | |Clear/Again |
|
||||
|`KC_CRSEL` | |CrSel/Props |
|
||||
|`KC_EXSEL` | |ExSel |
|
||||
|Key |Aliases |Description |
|
||||
|------------------|------------------------------|------------------------------|
|
||||
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|
||||
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |
|
||||
|`KC_INSERT` |`KC_INS` |Insert |
|
||||
|`KC_HOME` | |Home |
|
||||
|`KC_PGUP` | |Page Up |
|
||||
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|
||||
|`KC_END` | |End |
|
||||
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|
||||
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|
||||
|`KC_LEFT` | |Left Arrow |
|
||||
|`KC_DOWN` | |Down Arrow |
|
||||
|`KC_UP` | |Up Arrow |
|
||||
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key)|
|
||||
|`KC_POWER` | |System Power (macOS/Linux) |
|
||||
|`KC_EXECUTE` |`KC_EXEC` |Execute |
|
||||
|`KC_HELP` | |Help |
|
||||
|`KC_MENU` | |Menu |
|
||||
|`KC_SELECT` |`KC_SLCT` |Select |
|
||||
|`KC_STOP` | |Stop |
|
||||
|`KC_AGAIN` |`KC_AGIN` |Again |
|
||||
|`KC_UNDO` | |Undo |
|
||||
|`KC_CUT` | |Cut |
|
||||
|`KC_COPY` | |Copy |
|
||||
|`KC_PASTE` |`KC_PSTE` |Paste |
|
||||
|`KC_FIND` | |Find |
|
||||
|`KC__MUTE` | |Mute (macOS) |
|
||||
|`KC__VOLUP` | |Volume Up (macOS) |
|
||||
|`KC__VOLDOWN` | |Volume Down (macOS) |
|
||||
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase |
|
||||
|`KC_SYSREQ` | |SysReq/Attention |
|
||||
|`KC_CANCEL` | |Cancel |
|
||||
|`KC_CLEAR` |`KC_CLR` |Clear |
|
||||
|`KC_PRIOR` | |Prior |
|
||||
|`KC_RETURN` | |Return |
|
||||
|`KC_SEPARATOR` | |Separator |
|
||||
|`KC_OUT` | |Out |
|
||||
|`KC_OPER` | |Oper |
|
||||
|`KC_CLEAR_AGAIN` | |Clear/Again |
|
||||
|`KC_CRSEL` | |CrSel/Props |
|
||||
|`KC_EXSEL` | |ExSel |
|
||||
|
||||
## Media Keys
|
||||
|
||||
|
@ -9,23 +9,26 @@
|
||||
|
||||
#include "i2c_slave.h"
|
||||
|
||||
void i2c_init(uint8_t address){
|
||||
volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
|
||||
|
||||
static volatile uint8_t buffer_address;
|
||||
static volatile bool slave_has_register_set = false;
|
||||
|
||||
void i2c_slave_init(uint8_t address){
|
||||
// load address into TWI address register
|
||||
TWAR = (address << 1);
|
||||
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
|
||||
TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN);
|
||||
}
|
||||
|
||||
void i2c_stop(void){
|
||||
void i2c_slave_stop(void){
|
||||
// clear acknowledge and enable bits
|
||||
TWCR &= ~((1 << TWEA) | (1 << TWEN));
|
||||
}
|
||||
|
||||
ISR(TWI_vect){
|
||||
uint8_t ack = 1;
|
||||
// temporary stores the received data
|
||||
//uint8_t data;
|
||||
|
||||
|
||||
switch(TW_STATUS){
|
||||
case TW_SR_SLA_ACK:
|
||||
// The device is now a slave receiver
|
||||
@ -38,13 +41,13 @@ ISR(TWI_vect){
|
||||
if(!slave_has_register_set){
|
||||
buffer_address = TWDR;
|
||||
|
||||
if (buffer_address >= RX_BUFFER_SIZE){ // address out of bounds dont ack
|
||||
ack = 0;
|
||||
buffer_address = 0;
|
||||
if (buffer_address >= I2C_SLAVE_REG_COUNT) { // address out of bounds dont ack
|
||||
ack = 0;
|
||||
buffer_address = 0;
|
||||
}
|
||||
slave_has_register_set = true; // address has been receaved now fill in buffer
|
||||
} else {
|
||||
rxbuffer[buffer_address] = TWDR;
|
||||
i2c_slave_reg[buffer_address] = TWDR;
|
||||
buffer_address++;
|
||||
}
|
||||
break;
|
||||
@ -52,7 +55,7 @@ ISR(TWI_vect){
|
||||
case TW_ST_SLA_ACK:
|
||||
case TW_ST_DATA_ACK:
|
||||
// This device is a slave transmitter and master has requested data
|
||||
TWDR = txbuffer[buffer_address];
|
||||
TWDR = i2c_slave_reg[buffer_address];
|
||||
buffer_address++;
|
||||
break;
|
||||
|
||||
@ -63,6 +66,6 @@ ISR(TWI_vect){
|
||||
break;
|
||||
}
|
||||
|
||||
// Reset i2c state mahcine to be ready for next interrupt
|
||||
// Reset i2c state machine to be ready for next interrupt
|
||||
TWCR |= (1 << TWIE) | (1 << TWINT) | (ack << TWEA) | (1 << TWEN);
|
||||
}
|
@ -8,16 +8,11 @@
|
||||
#ifndef I2C_SLAVE_H
|
||||
#define I2C_SLAVE_H
|
||||
|
||||
#define TX_BUFFER_SIZE 30
|
||||
#define RX_BUFFER_SIZE 30
|
||||
#define I2C_SLAVE_REG_COUNT 30
|
||||
|
||||
volatile uint8_t buffer_address;
|
||||
static volatile bool slave_has_register_set = false;
|
||||
volatile uint8_t txbuffer[TX_BUFFER_SIZE];
|
||||
volatile uint8_t rxbuffer[RX_BUFFER_SIZE];
|
||||
extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
|
||||
|
||||
void i2c_init(uint8_t address);
|
||||
void i2c_stop(void);
|
||||
ISR(TWI_vect);
|
||||
void i2c_slave_init(uint8_t address);
|
||||
void i2c_slave_stop(void);
|
||||
|
||||
#endif // I2C_SLAVE_H
|
31
keyboards/1upkeyboards/sweet16/keymaps/switchtester/keymap.c
Normal file
31
keyboards/1upkeyboards/sweet16/keymaps/switchtester/keymap.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "switches.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
LAYOUT_ortho_4x4(
|
||||
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
|
||||
)
|
||||
};
|
||||
|
||||
struct mechswitch switches[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{CHERRY_MX_BLUE, CHERRY_MX_RED, CHERRY_MX_BLACK, CHERRY_MX_BROWN},
|
||||
{GATERON_BLUE, GATERON_RED, GATERON_BLACK, GATERON_BROWN},
|
||||
{KAILH_BLUE, KAILH_RED, KAILH_BLACK, KAILH_BROWN},
|
||||
{HAKO_CLEAR, HAKO_TRUE, HAKO_VIOLET, HAKO_ROYAL_TRUE}
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t col = record->event.key.col;
|
||||
uint8_t row = record->event.key.row;
|
||||
|
||||
if (record->event.pressed) {
|
||||
char name[MAX_SWITCH_NAME_LENGTH];
|
||||
switch_name(switches[row][col], name);
|
||||
send_string(name);
|
||||
SEND_STRING("\n");
|
||||
}
|
||||
return false;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
# Sweet16 as a switch tester
|
||||
|
||||
This keymap uses the Sweet16 as a switch tester. The functionality outputs the switch name of whatever key the user pressed.
|
||||
|
||||
the `switches` two-dimensional (4x4) array contains the switches attached to the macropad. The switches supported are defined as macros in the `switches.h` header file.
|
12
keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk
Normal file
12
keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk
Normal file
@ -0,0 +1,12 @@
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE = no
|
||||
|
||||
SRC += switches.c
|
@ -0,0 +1,99 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "switches.h"
|
||||
|
||||
static const char *BRAND_NAMES[] = {
|
||||
"Kailh",
|
||||
"Kailh Low Profile Choc",
|
||||
"Gateron",
|
||||
"Cherry MX",
|
||||
"Cherry ML",
|
||||
"Outemu",
|
||||
"Greetech",
|
||||
"Varmilo",
|
||||
"MOD",
|
||||
"Hako"
|
||||
};
|
||||
|
||||
static const char *COLOR_NAMES[] = {
|
||||
"",
|
||||
"White",
|
||||
"Black",
|
||||
"Blue",
|
||||
"Red",
|
||||
"Yellow",
|
||||
"Brown",
|
||||
"Green",
|
||||
"Clear",
|
||||
"Silver",
|
||||
"Nature White",
|
||||
"Grey",
|
||||
"Jade",
|
||||
"Navy",
|
||||
"Burnt Orange",
|
||||
"Pale Blue",
|
||||
"Dark Yellow",
|
||||
"Gold",
|
||||
"Chocolate White",
|
||||
"Burgundy",
|
||||
"Purple",
|
||||
"Light Green",
|
||||
"True",
|
||||
"Berry",
|
||||
"Plum",
|
||||
"Sage",
|
||||
"Violet",
|
||||
"L",
|
||||
"M",
|
||||
"H",
|
||||
"SH"
|
||||
};
|
||||
|
||||
static const char *VARIANT_NAMES[] = {
|
||||
"",
|
||||
"BOX",
|
||||
"BOX Thick",
|
||||
"BOX Heavy",
|
||||
"Silent",
|
||||
"Tactile",
|
||||
"Linear",
|
||||
"Speed",
|
||||
"Speed Heavy",
|
||||
"Speed Thick Click",
|
||||
"Pro",
|
||||
"Pro Heavy",
|
||||
"Royal",
|
||||
"Thick Click",
|
||||
"Heavy"
|
||||
};
|
||||
|
||||
const char *brand_name(struct mechswitch ms) {
|
||||
return BRAND_NAMES[ms.brand - 1];
|
||||
}
|
||||
|
||||
const char *variant_name(struct mechswitch ms) {
|
||||
return VARIANT_NAMES[ms.variant];
|
||||
}
|
||||
|
||||
const char *color_name(struct mechswitch ms) {
|
||||
return COLOR_NAMES[ms.color];
|
||||
}
|
||||
|
||||
void switch_name(struct mechswitch ms, char *buf) {
|
||||
const char *v_name = variant_name(ms);
|
||||
const char *c_name = color_name(ms);
|
||||
|
||||
snprintf(buf, MAX_SWITCH_NAME_LENGTH, "%s", brand_name(ms));
|
||||
strncat(buf, " ", MAX_SWITCH_NAME_LENGTH - strlen(buf));
|
||||
if (strlen(v_name) > 0) {
|
||||
strncat(buf, v_name, MAX_SWITCH_NAME_LENGTH - strlen(buf));
|
||||
strncat(buf, " ", MAX_SWITCH_NAME_LENGTH - strlen(buf));
|
||||
}
|
||||
if (strlen(c_name) > 0) {
|
||||
strncat(buf, c_name, MAX_SWITCH_NAME_LENGTH - strlen(buf));
|
||||
}
|
||||
}
|
||||
|
||||
int bitfieldtoi(struct mechswitch ms) {
|
||||
return ((ms.brand << 9) | (ms.variant << 5) | ms.color);
|
||||
}
|
189
keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.h
Normal file
189
keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.h
Normal file
@ -0,0 +1,189 @@
|
||||
#pragma once
|
||||
|
||||
struct mechswitch
|
||||
{
|
||||
unsigned int brand: 4;
|
||||
unsigned int variant: 4;
|
||||
unsigned int color: 5;
|
||||
};
|
||||
|
||||
#define MAX_SWITCH_NAME_LENGTH 256
|
||||
|
||||
#define BRAND_KAILH 1
|
||||
#define BRAND_KAILH_LOW 2
|
||||
#define BRAND_GATERON 3
|
||||
#define BRAND_CHERRY_MX 4
|
||||
#define BRAND_CHERRY_ML 5
|
||||
#define BRAND_OUTEMU 6
|
||||
#define BRAND_GREETECH 7
|
||||
#define BRAND_VARMILO 8
|
||||
#define BRAND_MOD 9
|
||||
#define BRAND_HAKO 10
|
||||
|
||||
#define COLOR_NO 0
|
||||
#define COLOR_WHITE 1
|
||||
#define COLOR_BLACK 2
|
||||
#define COLOR_BLUE 3
|
||||
#define COLOR_RED 4
|
||||
#define COLOR_YELLOW 5
|
||||
#define COLOR_BROWN 6
|
||||
#define COLOR_GREEN 7
|
||||
#define COLOR_CLEAR 8
|
||||
#define COLOR_SILVER 9
|
||||
#define COLOR_NATURE_WHITE 10
|
||||
#define COLOR_GREY 11
|
||||
#define COLOR_JADE 12
|
||||
#define COLOR_NAVY 13
|
||||
#define COLOR_BURNT_ORANGE 14
|
||||
#define COLOR_PALE_BLUE 15
|
||||
#define COLOR_DARK_YELLOW 16
|
||||
#define COLOR_GOLD 17
|
||||
#define COLOR_CHOCOLATE_WHITE 18
|
||||
#define COLOR_BURGUNDY 19
|
||||
#define COLOR_PURPLE 20
|
||||
#define COLOR_LIGHT_GREEN 21
|
||||
#define COLOR_TRUE 22
|
||||
#define COLOR_BERRY 23
|
||||
#define COLOR_PLUM 24
|
||||
#define COLOR_SAGE 25
|
||||
#define COLOR_VIOLET 26
|
||||
#define COLOR_L 27
|
||||
#define COLOR_M 28
|
||||
#define COLOR_H 29
|
||||
#define COLOR_SH 30
|
||||
|
||||
#define VARIANT_NO 0
|
||||
#define VARIANT_BOX 1
|
||||
#define VARIANT_BOX_THICK 2
|
||||
#define VARIANT_BOX_HEAVY 3
|
||||
#define VARIANT_SILENT 4
|
||||
#define VARIANT_TACTILE 5
|
||||
#define VARIANT_LINEAR 6
|
||||
#define VARIANT_SPEED 7
|
||||
#define VARIANT_SPEED_HEAVY 8
|
||||
#define VARIANT_SPEED_CLICK_THICK 9
|
||||
#define VARIANT_PRO 10
|
||||
#define VARIANT_PRO_HEAVY 11
|
||||
#define VARIANT_ROYAL 12
|
||||
#define VARIANT_CLICK_THICK 13
|
||||
|
||||
#define CHERRY_MX_BLUE {BRAND_CHERRY_MX, VARIANT_NO, COLOR_BLUE}
|
||||
#define CHERRY_MX_RED {BRAND_CHERRY_MX, VARIANT_NO, COLOR_RED}
|
||||
#define CHERRY_MX_BROWN {BRAND_CHERRY_MX, VARIANT_NO, COLOR_BROWN}
|
||||
#define CHERRY_MX_BLACK {BRAND_CHERRY_MX, VARIANT_NO, COLOR_BLACK}
|
||||
#define CHERRY_MX_GREEN {BRAND_CHERRY_MX, VARIANT_NO, COLOR_GREEN}
|
||||
#define CHERRY_MX_CLEAR {BRAND_CHERRY_MX, VARIANT_NO, COLOR_CLEAR}
|
||||
#define CHERRY_MX_WHITE {BRAND_CHERRY_MX, VARIANT_NO, COLOR_WHITE}
|
||||
#define CHERRY_MX_SILVER {BRAND_CHERRY_MX, VARIANT_NO, COLOR_SILVER}
|
||||
#define CHERRY_MX_NATURE_WHITE {BRAND_CHERRY_MX, VARIANT_NO, COLOR_NATURE_WHITE}
|
||||
#define CHERRY_MX_SILENT_BLACK {BRAND_CHERRY_MX, VARIANT_SILENT, COLOR_BLACK}
|
||||
#define CHERRY_MX_SILENT_RED {BRAND_CHERRY_MX, VARIANT_SILENT, COLOR_RED}
|
||||
#define CHERRY_MX_TACTILE_BLACK {BRAND_CHERRY_MX, VARIANT_SILENT, COLOR_GREY}
|
||||
#define CHERRY_MX_LINEAR_BLACK {BRAND_CHERRY_MX, VARIANT_LINEAR, COLOR_GREY}
|
||||
|
||||
#define CHERRY_ML {BRAND_CHERRY_ML, VARIANT_NO, COLOR_NO}
|
||||
|
||||
#define GATERON_BLUE {BRAND_GATERON, VARIANT_NO, COLOR_BLUE}
|
||||
#define GATERON_BROWN {BRAND_GATERON, VARIANT_NO, COLOR_BROWN}
|
||||
#define GATERON_BLACK {BRAND_GATERON, VARIANT_NO, COLOR_BLACK}
|
||||
#define GATERON_RED {BRAND_GATERON, VARIANT_NO, COLOR_RED}
|
||||
#define GATERON_CLEAR {BRAND_GATERON, VARIANT_NO, COLOR_CLEAR}
|
||||
#define GATERON_GREEN {BRAND_GATERON, VARIANT_NO, COLOR_GREEN}
|
||||
#define GATERON_YELLOW {BRAND_GATERON, VARIANT_NO, COLOR_YELLOW}
|
||||
|
||||
#define GATERON_SILENT_CLEAR {BRAND_GATERON, VARIANT_SILENT, COLOR_CLEAR}
|
||||
#define GATERON_SILENT_RED {BRAND_GATERON, VARIANT_SILENT, COLOR_RED}
|
||||
#define GATERON_SILENT_YELLOW {BRAND_GATERON, VARIANT_SILENT, COLOR_YELLOW}
|
||||
#define GATERON_SILENT_BLACK {BRAND_GATERON, VARIANT_SILENT, COLOR_BLACK}
|
||||
#define GATERON_SILENT_BROWN {BRAND_GATERON, VARIANT_SILENT, COLOR_BROWN}
|
||||
|
||||
#define GREETECH_BLUE {BRAND_GREETECH, VARIANT_NO, COLOR_BLUE}
|
||||
#define GREETECH_BROWN {BRAND_GREETECH, VARIANT_NO, COLOR_BROWN}
|
||||
#define GREETECH_BLACK {BRAND_GREETECH, VARIANT_NO, COLOR_BLACK}
|
||||
#define GREETECH_RED {BRAND_GREETECH, VARIANT_NO, COLOR_RED}
|
||||
|
||||
#define OUTEMU_BLUE {BRAND_OUTEMU, VARIANT_NO, COLOR_BLUE}
|
||||
#define OUTEMU_BROWN {BRAND_OUTEMU, VARIANT_NO, COLOR_BROWN}
|
||||
#define OUTEMU_BLACK {BRAND_OUTEMU, VARIANT_NO, COLOR_BLACK}
|
||||
#define OUTEMU_RED {BRAND_OUTEMU, VARIANT_NO, COLOR_RED}
|
||||
|
||||
#define KAILH_BLUE {BRAND_KAILH, VARIANT_NO, COLOR_BLUE}
|
||||
#define KAILH_BROWN {BRAND_KAILH, VARIANT_NO, COLOR_BROWN}
|
||||
#define KAILH_BLACK {BRAND_KAILH, VARIANT_NO, COLOR_BLACK}
|
||||
#define KAILH_RED {BRAND_KAILH, VARIANT_NO, COLOR_RED}
|
||||
#define KAILH_GREEN {BRAND_KAILH, VARIANT_NO, COLOR_GREEN}
|
||||
|
||||
#define KAILH_BOX_WHITE {BRAND_KAILH, VARIANT_BOX, COLOR_WHITE}
|
||||
#define KAILH_BOX_RED {BRAND_KAILH, VARIANT_BOX, COLOR_RED}
|
||||
#define KAILH_BOX_BLACK {BRAND_KAILH, VARIANT_BOX, COLOR_BLACK}
|
||||
#define KAILH_BOX_BROWN {BRAND_KAILH, VARIANT_BOX, COLOR_BROWN}
|
||||
#define KAILH_BOX_ROYAL {BRAND_KAILH, VARIANT_BOX, COLOR_ROYAL}
|
||||
|
||||
#define KAILH_BOX_THICK_JADE {BRAND_KAILH, VARIANT_BOX_THICK, COLOR_JADE}
|
||||
#define KAILH_BOX_THICK_NAVY {BRAND_KAILH, VARIANT_BOX_THICK, COLOR_NAVY}
|
||||
#define KAILH_BOX_HEAVY_BURNT_ORANGE {BRAND_KAILH, VARIANT_BOX_HEAVY, COLOR_BURNT_ORANGE}
|
||||
#define KAILH_BOX_HEAVY_PALE_BLUE {BRAND_KAILH, VARIANT_BOX_HEAVY, COLOR_PALE_BLUE}
|
||||
#define KAILH_BOX_HEAVY_DARK_YELLOW {BRAND_KAILH, VARIANT_BOX_HEAVY, COLOR_DARK_YELLOW}
|
||||
|
||||
#define KAILH_SPEED_BRONZE {BRAND_KAILH, VARIANT_SPEED, COLOR_BRONZE}
|
||||
#define KAILH_SPEED_COPPER {BRAND_KAILH, VARIANT_SPEED, COLOR_COPPER}
|
||||
#define KAILH_SPEED_GOLD {BRAND_KAILH, VARIANT_SPEED, COLOR_GOLD}
|
||||
#define KAILH_SPEED_SILVER {BRAND_KAILH, VARIANT_SPEED, COLOR_SILVER}
|
||||
|
||||
#define KAILH_SPEED_HEAVY_BURNT_ORANGE {BRAND_KAILH, VARIANT_SPEED_HEAVY, COLOR_BURNT_ORANGE}
|
||||
#define KAILH_SPEED_HEAVY_PALE_BLUE {BRAND_KAILH, VARIANT_SPEED_HEAVY, COLOR_PALE_BLUE}
|
||||
#define KAILH_SPEED_HEAVY_DARK_YELLOW {BRAND_KAILH, VARIANT_SPEED_HEAVY, COLOR_DARK_YELLOW}
|
||||
|
||||
#define KAILH_SPEED_THICK_CLICK_NAVY {BRAND_KAILH, VARIANT_SPEED_CLICK_THICK, COLOR_NAVY}
|
||||
|
||||
#define KAILH_PRO_BURGUNDY {BRAND_KAILH, VARIANT_PRO, COLOR_BURGUNDY}
|
||||
#define KAILH_PRO_PURPLE {BRAND_KAILH, VARIANT_PRO, COLOR_PURPLE}
|
||||
#define KAILH_PRO_LIGHT_GREEN {BRAND_KAILH, VARIANT_PRO, COLOR_LIGHT_GREEN}
|
||||
|
||||
#define KAILH_PRO_HEAVY_BERRY {BRAND_KAILH, VARIANT_PRO_HEAVY, COLOR_BERRY}
|
||||
#define KAILH_PRO_HEAVY_PLUM {BRAND_KAILH, VARIANT_PRO_HEAVY, COLOR_PLUM}
|
||||
#define KAILH_PRO_GEAVY_SAGE {BRAND_KAILH, VARIANT_PRO_HEAVY, COLOR_SAGE}
|
||||
|
||||
#define KAILH_LOW_WHITE {BRAND_KAILH_LOW, VARIANT_NO, COLOR_WHITE}
|
||||
#define KAILH_LOW_BROWN {BRAND_KAILH_LOW, VARIANT_NO, COLOR_BROWN}
|
||||
#define KAILH_LOW_RED {BRAND_KAILH_LOW, VARIANT_NO, COLOR_RED}
|
||||
#define KAILH_LOW_CHOCOLATE_WHITE {BRAND_KAILH_LOW, VARIANT_NO, COLOR_CHOCOLATE_WHITE}
|
||||
#define KAILH_LOW_THICK_CLICK_NAVY {BRAND_KAILH_LOW, VARIANT_THICK_CLICK, COLOR_NAVY}
|
||||
#define KAILH_LOW_THICK_CLICK_JADE {BRAND_KAILH_LOW, VARIANT_THICK_CLICK, COLOR_JADE}
|
||||
#define KAILH_LOW_HEAVY_DARK_YELLOW {BRAND_KAILH_LOW, VARIANT_HEAVY, COLOR_DARK_YELLOW}
|
||||
#define KAILH_LOW_HEAVY_BURNT_ORANGE {BRAND_KAILH_LOW, VARIANT_HEAVY, COLOR_BURNT_ORANGE}
|
||||
#define KAILH_LOW_HEAVY_PALE_BLUE {BRAND_KAILH_LOW, VARIANT_HEAVY, COLOR_PALE_BLUE}
|
||||
|
||||
#define HAKO_ROYAL_CLEAR {BRAND_HAKO, VARIANT_ROYAL, COLOR_CLEAR}
|
||||
#define HAKO_ROYAL_TRUE {BRAND_HAKO, VARIANT_ROYAL, COLOR_TRUE}
|
||||
|
||||
#define HAKO_CLEAR {BRAND_HAKO, VARIANT_NO, COLOR_CLEAR}
|
||||
#define HAKO_TRUE {BRAND_HAKO, VARIANT_NO, COLOR_TRUE}
|
||||
#define HAKO_VIOLET {BRAND_HAKO, VARIANT_NO, COLOR_VIOLET}
|
||||
|
||||
#define MOD_L_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_L}
|
||||
#define MOD_M_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_M}
|
||||
#define MOD_H_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_H}
|
||||
#define MOD_SH_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_SH}
|
||||
|
||||
#define MOD_L_LINEAR {BRAND_MOD, VARIANT_LINEAR, COLOR_L}
|
||||
#define MOD_M_LINEAR {BRAND_MOD, VARIANT_LINEAR, COLOR_M}
|
||||
#define MOD_H_LINEAR {BRAND_MOD, VARIANT_LINEAR, COLOR_H}
|
||||
|
||||
#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"
|
||||
#define BYTE_TO_BINARY(byte) \
|
||||
(byte & 0x80 ? '1' : '0'), \
|
||||
(byte & 0x40 ? '1' : '0'), \
|
||||
(byte & 0x20 ? '1' : '0'), \
|
||||
(byte & 0x10 ? '1' : '0'), \
|
||||
(byte & 0x08 ? '1' : '0'), \
|
||||
(byte & 0x04 ? '1' : '0'), \
|
||||
(byte & 0x02 ? '1' : '0'), \
|
||||
(byte & 0x01 ? '1' : '0')
|
||||
|
||||
|
||||
const char *brand_name(struct mechswitch ms);
|
||||
const char *variant_name(struct mechswitch ms);
|
||||
const char *color_name(struct mechswitch ms);
|
||||
void switch_name(struct mechswitch ms, char *buf);
|
||||
int bitfieldtoi(struct mechswitch ms);
|
@ -1,12 +1,74 @@
|
||||
{
|
||||
"keyboard_name": "foobar",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_60_ansi": {
|
||||
"layout": [{"label":"~", "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":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}]
|
||||
}
|
||||
"keyboard_name": "Luddite",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_60_ansi": {
|
||||
"layout": [
|
||||
{"label":"`", "x":0, "y":0},
|
||||
{"label":"1", "x":1, "y":0},
|
||||
{"label":"2", "x":2, "y":0},
|
||||
{"label":"3", "x":3, "y":0},
|
||||
{"label":"4", "x":4, "y":0},
|
||||
{"label":"5", "x":5, "y":0},
|
||||
{"label":"6", "x":6, "y":0},
|
||||
{"label":"7", "x":7, "y":0},
|
||||
{"label":"8", "x":8, "y":0},
|
||||
{"label":"9", "x":9, "y":0},
|
||||
{"label":"0", "x":10, "y":0},
|
||||
{"label":"-", "x":11, "y":0},
|
||||
{"label":"=", "x":12, "y":0},
|
||||
{"label":"Backspace", "x":13, "y":0, "w":2},
|
||||
{"label":"Tab", "x":0, "y":1, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":1},
|
||||
{"label":"W", "x":2.5, "y":1},
|
||||
{"label":"E", "x":3.5, "y":1},
|
||||
{"label":"R", "x":4.5, "y":1},
|
||||
{"label":"T", "x":5.5, "y":1},
|
||||
{"label":"Y", "x":6.5, "y":1},
|
||||
{"label":"U", "x":7.5, "y":1},
|
||||
{"label":"I", "x":8.5, "y":1},
|
||||
{"label":"O", "x":9.5, "y":1},
|
||||
{"label":"P", "x":10.5, "y":1},
|
||||
{"label":"[", "x":11.5, "y":1},
|
||||
{"label":"]", "x":12.5, "y":1},
|
||||
{"label":"\\", "x":13.5, "y":1, "w":1.5},
|
||||
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":2},
|
||||
{"label":"S", "x":2.75, "y":2},
|
||||
{"label":"D", "x":3.75, "y":2},
|
||||
{"label":"F", "x":4.75, "y":2},
|
||||
{"label":"G", "x":5.75, "y":2},
|
||||
{"label":"H", "x":6.75, "y":2},
|
||||
{"label":"J", "x":7.75, "y":2},
|
||||
{"label":"K", "x":8.75, "y":2},
|
||||
{"label":"L", "x":9.75, "y":2},
|
||||
{"label":";", "x":10.75, "y":2},
|
||||
{"label":"'", "x":11.75, "y":2},
|
||||
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
|
||||
{"label":"Shift", "x":0, "y":3, "w":2.25},
|
||||
{"label":"Z", "x":2.25, "y":3},
|
||||
{"label":"X", "x":3.25, "y":3},
|
||||
{"label":"C", "x":4.25, "y":3},
|
||||
{"label":"V", "x":5.25, "y":3},
|
||||
{"label":"B", "x":6.25, "y":3},
|
||||
{"label":"N", "x":7.25, "y":3},
|
||||
{"label":"M", "x":8.25, "y":3},
|
||||
{"label":",", "x":9.25, "y":3},
|
||||
{"label":".", "x":10.25, "y":3},
|
||||
{"label":"/", "x":11.25, "y":3},
|
||||
{"label":"Shift", "x":12.25, "y":3, "w":2.75},
|
||||
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
|
||||
{"label":"GUI", "x":1.25, "y":4, "w":1.25},
|
||||
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
|
||||
{"label":"Space", "x":3.75, "y":4, "w":6.25},
|
||||
{"label":"Alt", "x":10, "y":4, "w":1.25},
|
||||
{"label":"GUI", "x":11.25, "y":4, "w":1.25},
|
||||
{"label":"Menu", "x":12.5, "y":4, "w":1.25},
|
||||
{"label":"Ctrl", "x":13.75, "y":4, "w":1.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ Go to the [default layout README](keymaps/default/readme.md) for more informatio
|
||||
|
||||
Credit: Forked from [di0ib TMK version](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gnap)
|
||||
|
||||
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.
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||
|
||||
### Build Guide
|
||||
|
||||
|
@ -71,12 +71,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
keyevent_t event = record->event;
|
||||
(void)event;
|
||||
|
@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 6ball: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.
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||
|
@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 9key: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.
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make acr60: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.
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||
|
@ -15,10 +15,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
|
@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment):
|
||||
make al1:default
|
||||
make al1:splitbs
|
||||
|
||||
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.
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||
|
@ -24,19 +24,19 @@
|
||||
// layout of the board and position of the keys
|
||||
// The second converts the arguments into a two-dimensional array which
|
||||
// represents the switch matrix.
|
||||
#define LAYOUT( \
|
||||
#define LAYOUT_all( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE, \
|
||||
K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
|
||||
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
|
||||
K40, K42, K43, K45, K47, K48, K4A, K4B, K4C, K4D, K4E \
|
||||
) \
|
||||
{ \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
|
||||
{ K40, KC_NO, K42, K43, KC_NO, K45, KC_NO, K47, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE }, \
|
||||
{ K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
|
||||
{ K40, KC_NO, K42, K43, KC_NO, K45, KC_NO, K47, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -2,11 +2,12 @@
|
||||
"keyboard_name": "dc60",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"bootloader": "",
|
||||
"width": 15,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"~", "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}]
|
||||
"LAYOUT_all": {
|
||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
@ -16,27 +16,23 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, MO(1), KC_RGUI, KC_RGUI, KC_RCTL
|
||||
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
[1] = LAYOUT(
|
||||
[1] = LAYOUT_all(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO,
|
||||
KC_TRNS, KC_LSFT, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user