mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-24 23:55:44 +00:00
Compare commits
77 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d3f3da5112 | ||
![]() |
7dcf9237d5 | ||
![]() |
bce391a663 | ||
![]() |
2835a70749 | ||
![]() |
94c4b6bd74 | ||
![]() |
f5b9690ec7 | ||
![]() |
16f367348a | ||
![]() |
aa65cd7a90 | ||
![]() |
86532fa8d3 | ||
![]() |
0f0062b492 | ||
![]() |
9d5b4ec975 | ||
![]() |
e52930df24 | ||
![]() |
60eae7335b | ||
![]() |
af89752bff | ||
![]() |
c7f8548d9a | ||
![]() |
12e6d41202 | ||
![]() |
2d5c16dfd4 | ||
![]() |
3b13259942 | ||
![]() |
97b8567a1f | ||
![]() |
f3d5b1091d | ||
![]() |
7a751f1141 | ||
![]() |
e83e316555 | ||
![]() |
e01b2d518a | ||
![]() |
99500243e1 | ||
![]() |
cb1935aaff | ||
![]() |
8a9c90ad78 | ||
![]() |
fbc40032e7 | ||
![]() |
e96d196dc9 | ||
![]() |
c2f9e018ab | ||
![]() |
af22609ba5 | ||
![]() |
e290dc5ad8 | ||
![]() |
e14732be9f | ||
![]() |
eb9ea84927 | ||
![]() |
63d53b0f28 | ||
![]() |
0213867dea | ||
![]() |
3a7c65b424 | ||
![]() |
9f2fc1179a | ||
![]() |
9d97e47df4 | ||
![]() |
e73587cfd0 | ||
![]() |
997bafc8ec | ||
![]() |
4c14b5832a | ||
![]() |
b9f060c98c | ||
![]() |
da995d2aea | ||
![]() |
bdc8d89e6b | ||
![]() |
41beecfc18 | ||
![]() |
29f68459a0 | ||
![]() |
6a59198a42 | ||
![]() |
36bed36cd6 | ||
![]() |
db440f3e75 | ||
![]() |
7e655a207e | ||
![]() |
55d37d9fbc | ||
![]() |
27b0f8923e | ||
![]() |
3da8d46a07 | ||
![]() |
4db31fb374 | ||
![]() |
3956b7c685 | ||
![]() |
de5c8d86b4 | ||
![]() |
7e68faa336 | ||
![]() |
588b2329cb | ||
![]() |
6fa88d981c | ||
![]() |
12a07dae33 | ||
![]() |
3235c8527d | ||
![]() |
22ba36a4d8 | ||
![]() |
50bc2dbe77 | ||
![]() |
61ce41ae13 | ||
![]() |
e4b5c44262 | ||
![]() |
074be4fe5e | ||
![]() |
670ff2d19f | ||
![]() |
e95283b545 | ||
![]() |
8725197ad6 | ||
![]() |
d67b99ff3c | ||
![]() |
7c2a7ab817 | ||
![]() |
5b9667a4bf | ||
![]() |
0cde880747 | ||
![]() |
b09dc19d32 | ||
![]() |
bb208f3e3b | ||
![]() |
483ad4e3e0 | ||
![]() |
4c2453aa1b |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -54,6 +54,7 @@ util/Win_Check_Output.txt
|
||||
.vscode/tasks.json
|
||||
.vscode/last.sql
|
||||
.vscode/temp.sql
|
||||
.vscode/ipch/
|
||||
.stfolder
|
||||
.tags
|
||||
|
||||
|
@@ -13,10 +13,14 @@ env:
|
||||
- MAKEFLAGS="-j3 --output-sync"
|
||||
before_install:
|
||||
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
# Need DFU > .5 for dfu-suffix
|
||||
- sudo add-apt-repository --yes ppa:tormodvolden/ppa
|
||||
- sudo apt-get update -qq
|
||||
install:
|
||||
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
||||
- npm install -g moxygen
|
||||
- sudo apt-get -y --force-yes install dfu-util
|
||||
before_script:
|
||||
- avr-gcc --version
|
||||
script:
|
||||
|
2
Makefile
2
Makefile
@@ -534,6 +534,8 @@ endef
|
||||
%:
|
||||
# Check if we have the CMP tool installed
|
||||
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||
# Ensure that python3 is installed. This check can be removed after python is used in more places.
|
||||
if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
|
||||
# Check if the submodules are dirty, and display a warning if they are
|
||||
ifndef SKIP_GIT
|
||||
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
|
||||
|
@@ -324,7 +324,6 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
|
||||
endif
|
||||
|
||||
# # project specific files
|
||||
SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
|
||||
SRC += $(KEYBOARD_SRC) \
|
||||
$(KEYMAP_C) \
|
||||
$(QUANTUM_SRC)
|
||||
@@ -334,15 +333,16 @@ SRC += $(KEYBOARD_SRC) \
|
||||
|
||||
# Search Path
|
||||
VPATH += $(KEYMAP_PATH)
|
||||
VPATH += $(USER_PATH)
|
||||
VPATH += $(KEYBOARD_PATHS)
|
||||
VPATH += $(COMMON_VPATH)
|
||||
VPATH += $(USER_PATH)
|
||||
|
||||
include common_features.mk
|
||||
include $(TMK_PATH)/protocol.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include bootloader.mk
|
||||
|
||||
SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
|
||||
SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC))
|
||||
SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
|
@@ -105,6 +105,7 @@ endif
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
|
@@ -63,6 +63,7 @@
|
||||
* [LED Matrix](feature_led_matrix.md)
|
||||
* [Macros](feature_macros.md)
|
||||
* [Mouse Keys](feature_mouse_keys.md)
|
||||
* [OLED Driver](feature_oled_driver)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
|
@@ -330,6 +330,8 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Forces the keyboard to wait for a USB connection to be established before it starts up
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
* Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
|
||||
* `LINK_TIME_OPTIMIZATION_ENABLE`
|
||||
= Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
|
||||
|
||||
## USB Endpoint Limitations
|
||||
|
||||
|
@@ -230,7 +230,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
void matrix_scan_user(void) { # The very important timer.
|
||||
if (is_alt_tab_active) {
|
||||
if (timer_elapsed(alt_tab_timer) > 1000) {
|
||||
unregister_code16(LALT(KC_TAB));
|
||||
unregister_code(KC_LALT);
|
||||
is_alt_tab_active = false;
|
||||
}
|
||||
}
|
||||
|
@@ -124,21 +124,25 @@ Configure the hardware via your `config.h`:
|
||||
|
||||
---
|
||||
|
||||
From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example:
|
||||
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||
|
||||
```C
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/* {row | col << 4}
|
||||
* | {x=0..224, y=0..64}
|
||||
* | | flags
|
||||
* | | | */
|
||||
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
|
||||
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
|
||||
....
|
||||
}
|
||||
const led_config_t g_led_config = { {
|
||||
// Key Matrix to LED Index
|
||||
{ 5, NO_LED, NO_LED, 0 },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 4, NO_LED, NO_LED, 1 },
|
||||
{ 3, NO_LED, NO_LED, 2 }
|
||||
}, {
|
||||
// LED Index to Physical Position
|
||||
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||
}, {
|
||||
// LED Index to Flag
|
||||
1, 4, 4, 4, 4, 1
|
||||
} };
|
||||
```
|
||||
|
||||
The first part, `{row | col << 4}`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `{x=0..224, y=0..64}` represents the LED's physical position on the keyboard. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64 as the effects are based on this range. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
|
||||
The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
|
||||
|
||||
```C
|
||||
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||
@@ -147,7 +151,7 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
||||
|
||||
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
|
||||
|
||||
`flags` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
||||
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
||||
|
||||
## Flags
|
||||
|
||||
@@ -155,8 +159,8 @@ Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based
|
||||
|------------------------------------|-------------------------------------------|
|
||||
|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
|
||||
|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
|
||||
|`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. |
|
||||
|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
|
||||
|`#define LED_FLAG_NONE 0x00` |If this LED has no flags. |
|
||||
|`#define LED_FLAG_ALL 0xFF` |If this LED has all flags. |
|
||||
|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
|
||||
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|
||||
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
|
||||
@@ -197,7 +201,10 @@ enum rgb_matrix_effects {
|
||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
|
||||
RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
|
||||
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
||||
#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
|
||||
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
||||
#endif
|
||||
#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
|
||||
RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
|
||||
RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
|
||||
@@ -233,6 +240,7 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
||||
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
||||
|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` |
|
||||
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
||||
|
@@ -114,7 +114,7 @@ The following options can be used to tweak the various animations:
|
||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. |
|
||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. |
|
||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |`1.85` |Used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
@@ -145,7 +145,7 @@ const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
|
||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
||||
|
||||
// These control which hues are selected for each of the "Static gradient" modes
|
||||
const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
|
||||
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
@@ -39,15 +39,15 @@ By default Space Cadet assumes a US ANSI layout, but if your layout uses differe
|
||||
|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. |
|
||||
|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. |
|
||||
|`LCPO_KEYS` |`KC_LCTL, KC_LCTL, KC_9` |Send `KC_LCTL` when held, the mod `KC_LCTL` with the key `KC_9` when tapped. |
|
||||
|`RCPO_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` with the key `KC_0` when tapped. |
|
||||
|`RCPC_KEYS` |`KC_RCTL, KC_RCTL, KC_0` |Send `KC_RCTL` when held, the mod `KC_RCTL` with the key `KC_0` when tapped. |
|
||||
|`LAPO_KEYS` |`KC_LALT, KC_LALT, KC_9` |Send `KC_LALT` when held, the mod `KC_LALT` with the key `KC_9` when tapped. |
|
||||
|`RAPO_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` with the key `KC_0` when tapped. |
|
||||
|`RAPC_KEYS` |`KC_RALT, KC_RALT, KC_0` |Send `KC_RALT` when held, the mod `KC_RALT` with the key `KC_0` when tapped. |
|
||||
|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. |
|
||||
|
||||
|
||||
## Obsolete Configuration
|
||||
|
||||
These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `KC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define KC_LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`
|
||||
These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `KC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`.
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------|-------------|------------------------------------------------------------------|
|
||||
|
@@ -4,11 +4,11 @@ There are three Unicode keymap definition methods available in QMK:
|
||||
|
||||
## `UNICODE_ENABLE`
|
||||
|
||||
Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap file, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
|
||||
Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
|
||||
|
||||
## `UNICODEMAP_ENABLE`
|
||||
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 1024 entries.
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 16384 entries.
|
||||
|
||||
You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file:
|
||||
|
||||
@@ -26,13 +26,21 @@ const uint32_t PROGMEM unicode_map[] = {
|
||||
};
|
||||
```
|
||||
|
||||
Then you can use `X(BANG)` etc. in your keymap.
|
||||
Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap.
|
||||
|
||||
### Lower and Upper Case
|
||||
|
||||
Characters often come in lower and upper case pairs, for example: å, Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear.
|
||||
|
||||
This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP`. This blends Unicode keys in with regular alphas.
|
||||
|
||||
Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L40) function. This also allows you to, say, check Ctrl instead of Shift/Caps.
|
||||
|
||||
## `UCIS_ENABLE`
|
||||
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once this function's been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted.
|
||||
Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to add a keycode or function that calls `qk_ucis_start()`. Once this function has been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted.
|
||||
|
||||
For instance, you would define a table like this in your keymap file:
|
||||
For instance, you could define a table like this in your keymap file:
|
||||
|
||||
```c
|
||||
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
|
||||
@@ -42,7 +50,7 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
|
||||
);
|
||||
```
|
||||
|
||||
You call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and input the laughing emoji.
|
||||
To use it, call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and insert the laughing emoji.
|
||||
|
||||
### Customization
|
||||
|
||||
@@ -60,28 +68,29 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort
|
||||
|
||||
The following input modes are available:
|
||||
|
||||
* **`UC_OSX`**: Mac OS X built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`).
|
||||
* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`).
|
||||
|
||||
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
|
||||
By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode.
|
||||
By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_OSX`](#input-key-configuration) with another keycode.
|
||||
|
||||
**Note:** Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as: Option + Left Arrow (`moveWordLeftAndModifySelection`) and Option + Right Arrow (`moveWordRightAndModifySelection`).
|
||||
!> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow.
|
||||
|
||||
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
|
||||
By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with another keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
|
||||
|
||||
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
|
||||
|
||||
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Afterwards, reboot.
|
||||
To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
|
||||
This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead.
|
||||
|
||||
* **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues).
|
||||
|
||||
* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF` (all currently assigned code points).
|
||||
* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.9.0, supports code points up to `0x10FFFF` (all possible code points).
|
||||
|
||||
To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app.
|
||||
By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode.
|
||||
By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with another keycode.
|
||||
|
||||
### Switching Input Modes
|
||||
|
||||
@@ -89,17 +98,17 @@ There are two ways to set the input mode for Unicode: by keycode or by function.
|
||||
|
||||
You can switch the input mode at any time by using one of the following keycodes. The easiest way is to add the ones you use to your keymap.
|
||||
|
||||
|Keycode |Alias |Input mode |Description |
|
||||
|-----------------------|---------|-------------|-----------------------------------------|
|
||||
|`UNICODE_MODE_FORWARD` |`UC_MOD` | |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
|
||||
|`UNICODE_MODE_REVERSE` |`UC_RMOD`| |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
|
||||
|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to Mac OS X input. |
|
||||
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input. |
|
||||
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input. |
|
||||
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented). |
|
||||
|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose.|
|
||||
|Keycode |Alias |Input Mode |Description |
|
||||
|----------------------|---------|------------|--------------------------------------------------------------|
|
||||
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes |
|
||||
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse|
|
||||
|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to macOS input |
|
||||
|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input |
|
||||
|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input |
|
||||
|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) |
|
||||
|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose |
|
||||
|
||||
You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user` (or a similar function). For example:
|
||||
You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user()` (or a similar function). For example:
|
||||
|
||||
```c
|
||||
void eeconfig_init_user(void) {
|
||||
@@ -123,35 +132,45 @@ For instance, you can add these definitions to your `config.h` file:
|
||||
|
||||
### Additional Customization
|
||||
|
||||
Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system.
|
||||
Because Unicode is a large and versatile feature, there are a number of options you can customize to make it work better on your system.
|
||||
|
||||
#### Start and Finish input functions
|
||||
#### Start and Finish Input Functions
|
||||
|
||||
The functions for starting and finishing Unicode input on your platform can be overridden locally. Possible uses include customizing input mode behavior if you don't use the default keys, or adding extra visual/audio feedback to Unicode input.
|
||||
|
||||
* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on Mac.
|
||||
* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on macOS.
|
||||
* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Option key.
|
||||
|
||||
You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c).
|
||||
|
||||
|
||||
#### Input Key Configuration
|
||||
|
||||
Additionally, you can customize the keys used to trigger the unicode input for macOS and WinCompose by adding defines to your `config.h`
|
||||
You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt).
|
||||
|
||||
|Define |Type |Default |Example |
|
||||
|------------------|----------|------------------|-------------------------------------------|
|
||||
|`UNICODE_KEY_OSX` |`uint8_t` |`KC_LALT` |`#define UNICODE_KEY_OSX KC_RALT` |
|
||||
|`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`|
|
||||
|`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` |
|
||||
|
||||
#### Input Mode Cycling
|
||||
|
||||
You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited.
|
||||
|
||||
```c
|
||||
#define UNICODE_OSX_KEY KC_LALT
|
||||
#define UNICODE_WINC_KEY KC_RALT
|
||||
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_WINC
|
||||
```
|
||||
|
||||
#### Input Method Cycling
|
||||
You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`).
|
||||
|
||||
Also, you can choose which input methods are availble for cycling through. By default, this is disabled. But if you want to enabled it, then limiting it to just those modes makes sense. Note that `UNICODE_SELECTED_MODES` define is comma delimited.
|
||||
By default, when the keyboard boots, it will initialize the input mode to the last one you used. You can disable this and make it start with the first mode in the list every time by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_BSD, UC_WINC
|
||||
#define UNICODE_CYCLE_PERSIST false
|
||||
```
|
||||
|
||||
!> Using `UNICODE_SELECTED_MODES` means you don't have to initially set the input mode in `matrix_init_user()` (or a similar function); the Unicode system will do that for you on startup. This has the added benefit of avoiding unnecessary writes to EEPROM.
|
||||
|
||||
## `send_unicode_hex_string`
|
||||
|
||||
To type multiple characters for things like (ノಠ痊ಠ)ノ彡┻━┻, you can use `send_unicode_hex_string()` much like `SEND_STRING()` except you would use hex values separate by spaces.
|
||||
|
@@ -25,7 +25,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
|
||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||
* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting.
|
||||
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||
* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage.
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||
|
@@ -450,7 +450,15 @@ This is a reference only. Each group of keys links to the page documenting their
|
||||
|
||||
## [Unicode Support](feature_unicode.md)
|
||||
|
||||
|Key |Description |
|
||||
|-------|---------------------------------------------------------------------------|
|
||||
|`UC(c)`|Send Unicode code point `c` (`UNICODE_ENABLE`) |
|
||||
|`X(i)` |Send Unicode code point at index `i` in `unicode_map` (`UNICODEMAP_ENABLE`)|
|
||||
|Key |Aliases |Description |
|
||||
|----------------------|---------|----------------------------------------------------------------|
|
||||
|`UC(c)` | |Send Unicode code point `c` |
|
||||
|`X(i)` | |Send Unicode code point at index `i` in `unicode_map` |
|
||||
|`XP(i, j)` | |Send Unicode code point at index `i`, or `j` if Shift/Caps is on|
|
||||
|`UNICODE_MODE_FORWARD`|`UC_MOD` |Cycle through selected input modes |
|
||||
|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Cycle through selected input modes in reverse |
|
||||
|`UNICODE_MODE_OSX` |`UC_M_OS`|Switch to macOS input |
|
||||
|`UNICODE_MODE_LNX` |`UC_M_LN`|Switch to Linux input |
|
||||
|`UNICODE_MODE_WIN` |`UC_M_WI`|Switch to Windows input |
|
||||
|`UNICODE_MODE_BSD` |`UC_M_BS`|Switch to BSD input (not implemented) |
|
||||
|`UNICODE_MODE_WINC` |`UC_M_WC`|Switch to Windows input using WinCompose |
|
||||
|
@@ -13,9 +13,9 @@ Note: These programs are not provided by or endorsed by QMK.
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (Web Based)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (Web Based)
|
||||
|
||||
## Debugging With QMK Toolbox
|
||||
## Debugging
|
||||
|
||||
[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap.
|
||||
Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap.
|
||||
|
||||
```c
|
||||
void keyboard_post_init_user(void) {
|
||||
@@ -27,6 +27,14 @@ void keyboard_post_init_user(void) {
|
||||
}
|
||||
```
|
||||
|
||||
### Debugging With QMK Toolbox
|
||||
|
||||
For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can be used to display debug messages from your keyboard.
|
||||
|
||||
### Debugging With hid_listen
|
||||
|
||||
Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
|
||||
|
||||
<!-- FIXME: Describe the debugging messages here. -->
|
||||
|
||||
## Sending Your Own Debug Messages
|
||||
@@ -41,3 +49,51 @@ After that you can use a few different print functions:
|
||||
* `uprintf("%s string", var)`: Print a formatted string
|
||||
* `dprint("string")` Print a simple string, but only when debug mode is enabled
|
||||
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
|
||||
|
||||
## Debug Examples
|
||||
|
||||
Below is a collection of real world debugging examples. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug.md).
|
||||
|
||||
### Which matrix position is this keypress?
|
||||
|
||||
When porting, or when attempting to diagnose pcb issues, it can be useful to know if a keypress is scanned correctly. To enable logging for this scenario, add the following code to your keymaps `keymap.c`
|
||||
|
||||
```c
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||
#ifdef CONSOLE_ENABLE
|
||||
uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
Example output
|
||||
```text
|
||||
Waiting for device:.......
|
||||
Listening:
|
||||
KL: kc: 169, col: 0, row: 0, pressed: 1
|
||||
KL: kc: 169, col: 0, row: 0, pressed: 0
|
||||
KL: kc: 174, col: 1, row: 0, pressed: 1
|
||||
KL: kc: 174, col: 1, row: 0, pressed: 0
|
||||
KL: kc: 172, col: 2, row: 0, pressed: 1
|
||||
KL: kc: 172, col: 2, row: 0, pressed: 0
|
||||
```
|
||||
|
||||
### How long did it take to scan for a keypress?
|
||||
|
||||
When testing performance issues, it can be useful to know the frequency at which the switch matrix is being scanned. To enable logging for this scenario, add the following code to your keymaps `config.h`
|
||||
|
||||
```c
|
||||
#define DEBUG_MATRIX_SCAN_RATE
|
||||
```
|
||||
|
||||
Example output
|
||||
```text
|
||||
> matrix scan frequency: 315
|
||||
> matrix scan frequency: 313
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
> matrix scan frequency: 316
|
||||
```
|
||||
|
54
docs/zh-cn/getting_started_introduction.md
Normal file
54
docs/zh-cn/getting_started_introduction.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# 介绍
|
||||
|
||||
本页解释了使用QMK项目所需的基本信息。它假定您能熟练使用Unix shell,但您不熟悉C语言也不熟悉使用make编译。
|
||||
|
||||
## 基本QMK结构
|
||||
|
||||
QMK是[Jun Wako](https://github.com/tmk)的[tmk_keyboard](https://github.com/tmk/tmk_keyboard)工程的一个分叉。经过更改的TMK原始代码放在`tmk` 文件夹中。 QMK增加的新东西可以在 `quantum` 文件夹中找到。 键盘项目可以在 `handwired`(手动飞线) 和 `keyboard`(PCB键盘)这两个文件夹找到。
|
||||
|
||||
### 用户空间结构
|
||||
|
||||
在`users`文件夹里面的目录是每个用户的目录。这个文件夹里面放的是用户们在不同键盘都能用到的代码。详见[用户空间特性](feature_userspace.md)
|
||||
|
||||
### 键盘项目结构
|
||||
|
||||
在`keyboards`文件夹和他的子文件夹`handwired`中就是各个键盘的项目了,比如`qmk_firmware/keyboards/clueboard`。内部结构与如下:
|
||||
|
||||
* `keymaps/`: 可以构建的不同布局
|
||||
* `rules.mk`: 用来设置 "make" 命令默认选项的文件。别直接编辑这个文件,你应该使用具体某个布局的 `rules.mk`.
|
||||
* `config.h`: 用于设置默认编译选项的文件。别直接编辑这个文件, 你应该使用具体某个布局的 `config.h`.
|
||||
|
||||
### 布局结构
|
||||
|
||||
在各个布局的文件夹,你能找到以下文件。只有 `keymap.c` 是必要的, 如果其他文件找不到就会直接选择默认选项。
|
||||
|
||||
* `config.h`: 配置布局的选项
|
||||
* `keymap.c`: 布局的全部代码, 必要文件
|
||||
* `rules.mk`: 使能的QMK特性
|
||||
* `readme.md`:介绍你的布局,告诉别人怎么使用,附上功能说明。请将图片上传到imgur等图床(译者注:imgur可能已被墙,为了方便国人访问,建议使用国内可以直接访问的图床)。
|
||||
|
||||
# `config.h` 文件
|
||||
|
||||
有三个重要的`config.h` 位置:
|
||||
|
||||
* 键盘 (`/keyboards/<keyboard>/config.h`)
|
||||
* 用户空间 (`/users/<user>/config.h`)
|
||||
* 布局 (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
构建系统按照上述顺序自动获取配置文件。如果要覆盖由上一个 `config.h` 所做的设置,您需要首先为要更改的设置包含一些样板代码。
|
||||
|
||||
```
|
||||
#pragma once
|
||||
```
|
||||
|
||||
要覆盖上一个 `config.h` 所做的设置,你要先 `#undef` 然后再 `#define` 这个设置.
|
||||
|
||||
样板代码和设置看起来像这样:
|
||||
|
||||
```
|
||||
#pragma once
|
||||
|
||||
// 像下面那样覆盖设置(MY_SETTING指的是你要覆盖的设置项)!
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
163
docs/zh-cn/newbs_best_practices.md
Normal file
163
docs/zh-cn/newbs_best_practices.md
Normal file
@@ -0,0 +1,163 @@
|
||||
# 最佳实践
|
||||
|
||||
## 或者说, "我应如何学会不再担心并开始爱上Git。"
|
||||
|
||||
本文档旨在指导新手以最佳方式获得为QMK做出贡献的丝滑体验。我们将介绍为QMK做出贡献的过程,详细介绍使这项任务更容易的一些方法,然后我们将制造一些问题,来教你如何解决它们。
|
||||
|
||||
本文假设了一些内容:
|
||||
|
||||
1. 一有个GitHub账户, 并[创建qmk_firmware仓库分叉](getting_started_github.md)到你的帐户.
|
||||
2. 你已经[建立你的构建环境](newbs_getting_started.md?id=environment-setup).
|
||||
|
||||
|
||||
## 你分叉的主分支: 一直在上传,但不要提交
|
||||
|
||||
十分推荐您在QMK开发过程中无论开发是否完成都要保持你的 `master` 分支更新,但是 ***一定不要*** 提交。相反,你应该在一个开发分叉中做出你所有修改并在开发时提交pull request。
|
||||
|
||||
减少合并冲突的可能性 — 两个或多个用户同时编辑文件的同一部分的实例 — 保持 `master` 分支最新,并创建一个新的分支来开始新的开发。
|
||||
|
||||
### 更新你的主分支
|
||||
|
||||
保持你的 `master` 更新, 推荐你添加QMK Firmware仓库作为Git的远程仓库,想这么做的话, 你可以打开你的Git命令行接口然后输入:
|
||||
|
||||
```
|
||||
git remote add upstream https://github.com/qmk/qmk_firmware.git
|
||||
```
|
||||
|
||||
运行 `git remote -v`, 来确定这个仓库已经添加,以下是回显:
|
||||
|
||||
```
|
||||
$ git remote -v
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (fetch)
|
||||
origin https://github.com/<your_username>/qmk_firmware.git (push)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (fetch)
|
||||
upstream https://github.com/qmk/qmk_firmware.git (push)
|
||||
```
|
||||
|
||||
现在添加已完成,你可以用`git fetch upstream`来检查仓库的更新. 这会检索branches 和 tags — 统称为"refs" — 从QMK仓库, 也就是 `upstream`。我们可以比较我们的分叉和QMK的 `origin` 数据的不同。
|
||||
|
||||
要更新你的分叉的主分支,请运行以下命令,在每行之后按Enter键:
|
||||
|
||||
```
|
||||
git checkout master
|
||||
git fetch upstream
|
||||
git pull upstream master
|
||||
git push origin master
|
||||
```
|
||||
|
||||
这回切换到你的`master` 分支, 检索你QMK仓库的refs, 下载当前QMK `master` 分支到你的电脑, 并上传到你的分叉.
|
||||
|
||||
### 做改动
|
||||
|
||||
你可以输入以下命令来创建一个新的分支来做改动:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch
|
||||
git push --set-upstream origin dev_branch
|
||||
```
|
||||
|
||||
这回建立一个叫做 `dev_branch`的新分支, 检查一下, 然后想你的分叉保存分支. 使用 `--set-upstream` 参数来告诉git使用你的分叉并且当每次你对你的分支用`git push` 或 `git pull`时要使用`dev_branch`。 它仅需要在第一次push的时候使用;然后你就可以很安全的用 `git push` 或 `git pull`, 并不需要其他参数了。
|
||||
|
||||
!> 使用 `git push`, 你可以用 `-u` 来代替 `--set-upstream` — `-u`是`--set-upstream`的简写。
|
||||
|
||||
您可以将您的分支命名为您想要的任何名称,但建议将其命名为与您要进行的更改相关的内容。
|
||||
|
||||
默认情况下 `git checkout -b` 在已经检出的分支上建立新的分支。您可以将新的分支建立在未检出的现有分支的基础上,方法是将现有分支的名称添加到命令:
|
||||
|
||||
```
|
||||
git checkout -b dev_branch master
|
||||
```
|
||||
|
||||
现在您已经有了一个开发分支,那么就打开您的文本编辑器并进行您需要做的任何更改。建议对您的分支进行许多小的提交;这样,任何引起问题的更改都可以在需要时更容易地跟踪和撤消。要进行更改,编辑并保存任何需要更新的文件,请将它们添加到Git的 *staging area* ,然后将它们提交到您的分支:
|
||||
|
||||
```
|
||||
git add path/to/updated_file
|
||||
git commit -m "My commit message."
|
||||
```
|
||||
|
||||
` git add`添加已更改到Git的*临时区域*也就是Git的“加载区域”的文件。其中包含使用 `git commit` 命令 *提交* 的并已经保存到仓库的更改。建议您使用描述性的提交消息,这样您就可以一目了然地知道更改了什么。
|
||||
|
||||
!> 如果你修改了很多文件,但所有的文件都是同一个更改的一部分,你可以用 `git add .` 来添加当前目录中所有已更改的文件而不是单独添加每个文件.
|
||||
|
||||
### 发布更改
|
||||
|
||||
最后一步是将更改推送到您的分叉。 输入 `git push`来推送. 现在Git将`dev_branch`的当前状态发布到您的分叉。
|
||||
|
||||
|
||||
## 解决合并冲突
|
||||
|
||||
有时,当您在某个分支中的工作需要很长时间才能完成时,其他人所做的更改与您在打开pull request时对该分支所做的更改相冲突。这称为*rebase* 即合并冲突,当多个人编辑同一文件的同一部分时会发生这种情况。
|
||||
|
||||
### 重新调整您的更改
|
||||
|
||||
*rebase*是Git的一种方法,它获取在某一点上应用的更改,撤销它们,然后将相同的更改应用到另一点。在合并冲突的情况下,您可以重新设置您的分支以获取在创建分支时和当前时间之间的那段时间所做的更改。
|
||||
|
||||
运行以下命令来开始:
|
||||
|
||||
```
|
||||
git fetch upstream
|
||||
git rev-list --left-right --count HEAD...upstream/master
|
||||
```
|
||||
|
||||
这里的`git rev-list` 命令返回当前分支和qmk的主分支之间不同的提交数。我们首先运行`git fetch`,以确保我们有代表upstream仓库的refs。 `git rev-list` 命令的回显有两个数字:
|
||||
|
||||
```
|
||||
$ git rev-list --left-right --count HEAD...upstream/master
|
||||
7 35
|
||||
```
|
||||
|
||||
第一个数字表示自创建以来当前分支的提交数, 第二个数字是自创建当前分支以来对 `upstream/master` 进行的提交数, 因此, 当前分支中未记录变动。
|
||||
|
||||
既然知道当前分支和upstream仓库的当前状态,我们可以开始一个rebase操作:
|
||||
|
||||
```
|
||||
git rebase upstream/master
|
||||
```
|
||||
|
||||
这就是让Git撤销当前分支上的提交,然后根据QMK的主分支重新应用它们。
|
||||
|
||||
```
|
||||
$ git rebase upstream/master
|
||||
First, rewinding head to replay your work on top of it...
|
||||
Applying: Commit #1
|
||||
Using index info to reconstruct a base tree...
|
||||
M conflicting_file_1.txt
|
||||
Falling back to patching base and 3-way merge...
|
||||
Auto-merging conflicting_file_1.txt
|
||||
CONFLICT (content): Merge conflict in conflicting_file_1.txt
|
||||
error: Failed to merge in the changes.
|
||||
hint: Use 'git am --show-current-patch' to see the failed patch
|
||||
Patch failed at 0001 Commit #1
|
||||
|
||||
Resolve all conflicts manually, mark them as resolved with
|
||||
"git add/rm <conflicted_files>", then run "git rebase --continue".
|
||||
You can instead skip this commit: run "git rebase --skip".
|
||||
To abort and get back to the state before "git rebase", run "git rebase --abort".
|
||||
```
|
||||
|
||||
这告诉我们有一个合并冲突,并给出带有冲突的文件的名称。在文本编辑器中打开冲突的文件,在该文件的某个位置,您会发现如下内容:
|
||||
|
||||
```
|
||||
<<<<<<< HEAD
|
||||
<p>For help with any issues, email us at support@webhost.us.</p>
|
||||
=======
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
>>>>>>> Commit #1
|
||||
```
|
||||
|
||||
`<<<<<<< HEAD`行标记合并冲突的开始, `>>>>>>> Commit #1` 行标记结束, 冲突选项被 `=======`分隔。`HEAD`那端的部分来自文件的qmk master版本,标记有commit消息的部分来自当前的分支持和提交。
|
||||
|
||||
因为Git跟踪 *对文件的更改* 而不是直接跟踪文件的内容,所以如果Git在提交之前找不到文件中的文本,它将不知道如何编辑该文件。重新编辑文件将解决冲突。进行更改,然后保存文件。
|
||||
|
||||
```
|
||||
<p>Need help? Email support@webhost.us.</p>
|
||||
```
|
||||
|
||||
现在运行:
|
||||
|
||||
```
|
||||
git add conflicting_file_1.txt
|
||||
git rebase --continue
|
||||
```
|
||||
|
||||
Git记录对冲突文件的更改,并继续应用来自我们的分支的提交,直到它到达末尾。
|
81
docs/zh-cn/newbs_building_firmware.md
Normal file
81
docs/zh-cn/newbs_building_firmware.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# 构建第一个固件
|
||||
|
||||
现在您已经建立了构建环境,就可以开始构建自定义固件了。对于本指南的这一部分,我们将在3个程序之间切换——文件管理器、文本编辑器和终端窗口。请保持所有3个程序打开,直到您完成并对键盘固件满意。
|
||||
|
||||
如果您在按照指南第一部分的操作之后关闭并重新打开了终端窗口,请不要忘记输入“cd qmk_firmware”,来使您的终端位于正确的目录。
|
||||
|
||||
## 导航到您的keymaps文件夹
|
||||
|
||||
首先导航到键盘的 `keymaps` 文件夹.
|
||||
|
||||
?> 如果您使用的是MacOS或Windows,可以使用以下命令轻松地打开keymaps文件夹。
|
||||
|
||||
?> macOS:
|
||||
|
||||
open keyboards/<keyboard_folder>/keymaps
|
||||
|
||||
?> Windows:
|
||||
|
||||
start .\\keyboards\\<keyboard_folder>\\keymaps
|
||||
|
||||
## 创建`default` 布局副本
|
||||
|
||||
打开`keymaps`文件夹后,您将需要创建`default`文件夹的副本。我们强烈建议您将文件夹命名为与Github用户名相同的名称,但您也可以使用任何您想使用的名称,只要它只包含小写字母、数字和下划线字符。
|
||||
|
||||
要自动执行此过程,您还可以选择运行`new_keymap.sh`脚本。
|
||||
|
||||
导航到`qmk_firmware/util` 目录然后输入以下命令:
|
||||
|
||||
```
|
||||
./new_keymap.sh <keyboard path> <username>
|
||||
```
|
||||
|
||||
例如,一个名字叫ymzcdg的用户要创建1up60hse的布局,他需要输入
|
||||
|
||||
```
|
||||
./new_keymap.sh 1upkeyboards/1up60hse ymzcdg
|
||||
```
|
||||
|
||||
## 在你最钟爱的文本编辑器中打开`keymap.c`
|
||||
|
||||
打开你的`keymap.c`. 在这个文件中,您可以找到控制键盘行为的结构。 在你的`keymap.c` 的顶部有一些让布局更易读的define和enum。在靠下的位置你会找到一行和下面这句很像的:
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
从这一行开始便是层列表。这行下面你会看到包括 `LAYOUT` 或 `KEYMAP`这两个词的几行, 从这些行开始就是层。在这一行下面是组成该特定层的键的列表。
|
||||
|
||||
!> 编辑您的keymap文件时,注意不要添加或删除任何逗号。如果这样做,您将阻止您的固件编译,并且您可能不容易找出多余的或缺少的逗号在哪里。
|
||||
|
||||
## 根据您的喜好自定义布局
|
||||
|
||||
如何完成这一步骤完全取决于您。改变一直困扰着你的问题,或者完全重做所有的事情。如果您不需要全部图层,可以删除图层,或者将图层总数增加到32个。查看以下文档,了解可以在此处定义的内容:
|
||||
|
||||
* [键码](keycodes.md)
|
||||
* [特性](features.md)
|
||||
* [问题与解答](faq.md)
|
||||
|
||||
?> 当你明白布局是怎么工作时,您也要让每次改变尽可能小。一次改变很大在调试时找出问题会十分困难。
|
||||
|
||||
## 构建你的固件
|
||||
|
||||
完成对布局的更改后,您就要构建固件了。为此,请返回终端窗口并运行build命令:
|
||||
|
||||
make <my_keyboard>:<my_keymap>
|
||||
|
||||
例如,如果您的keymap名为“xyverz”,并且您正在为rev5 planck构建一个keymap,那么您将使用此命令:
|
||||
|
||||
make planck/rev5:xyverz
|
||||
|
||||
在编译过程中,你将看到屏幕上有很多输出,通知您正在编译哪些文件他应该以与下文类似的输出结束:
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||
Checking file size of planck_rev5_xyverz.hex [OK]
|
||||
* File size is fine - 18392/28672
|
||||
```
|
||||
|
||||
## 刷新你的固件
|
||||
|
||||
请移步 [Flashing Firmware](newbs_flashing.md) 来继续。
|
307
docs/zh-cn/newbs_flashing.md
Normal file
307
docs/zh-cn/newbs_flashing.md
Normal file
@@ -0,0 +1,307 @@
|
||||
# 刷新你的键盘
|
||||
|
||||
现在您已经构建了一个自定义固件文件,那么您就需要刷新键盘了。
|
||||
|
||||
## 用QMK工具箱刷新键盘
|
||||
|
||||
刷新键盘的最简单方法是使用[QMK 工具箱](https://github.com/qmk/qmk_toolbox/releases).
|
||||
|
||||
但是,QMK工具箱目前仅适用于Windows和MacOS。如果您使用的是Linux(或者只是希望从命令行刷新固件),则必须使用 [方法概述](newbs_flashing.md#flash-your-keyboard-from-the-command-line).
|
||||
|
||||
### 将文件加载到QMK工具箱中
|
||||
|
||||
首先打开QMK工具箱应用程序。您将要在访达或资源管理器中找到固件文件。您的键盘固件可能是两种格式之一`.hex`或`.bin`。qmk会尝试将键盘的相应文件复制到“qmk_firmware”根目录中。
|
||||
|
||||
?> 如果您在Windows或MacOS上,可以使用以下命令轻松地在资源管理器或访达中打开当前固件文件夹。
|
||||
|
||||
?> Windows:
|
||||
|
||||
start .
|
||||
|
||||
?> macOS:
|
||||
|
||||
open .
|
||||
|
||||
固件文件始终遵循此命名格式:
|
||||
|
||||
<keyboard_name>_<keymap_name>.{bin,hex}
|
||||
|
||||
例如,使用 `default` 布局的 `plank/rev5` 将使用以下名字:
|
||||
|
||||
planck_rev5_default.hex
|
||||
|
||||
找到固件文件后,将其拖到QMK工具箱中的“Local file”框中,或单击“Open”并导航到固件文件的存储位置。
|
||||
|
||||
### 将键盘置于DFU(Bootloader)模式
|
||||
|
||||
要刷新自定义固件,您必须将键盘置于特殊的刷新模式。在此模式下,您将无法键入或使用键盘。在写入固件时,不要拔下键盘插头或以其他方式中断刷新过程,这一点非常重要。
|
||||
|
||||
不同的键盘有不同的方式进入这种特殊模式。如果您的键盘当前运行的是QMK或TMK,而您没有得到特定的指示,请按顺序尝试以下操作:
|
||||
|
||||
* 按住两个shift键并按 `Pause`
|
||||
* 按住两个shift键并按 `B`
|
||||
* 拔下键盘插头, 同时按住空格键和 `B` , 插上键盘然后等一会再放开按键
|
||||
* 按下PCB底部的 `RESET` 物理键
|
||||
* 找到PCB上标记有 `BOOT0` 或 `RESET`的金属点, 在插入PCB的同时短接它们
|
||||
|
||||
成功后,您将在QMK工具箱中看到类似以下内容的消息:
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
```
|
||||
|
||||
### 刷新你的键盘
|
||||
|
||||
单击QMK工具箱中的 `Flash` 按钮。您将看到类似以下内容的输出:
|
||||
|
||||
```
|
||||
*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
|
||||
*** DFU device connected
|
||||
*** Attempting to flash, please don't remove device
|
||||
>>> dfu-programmer atmega32u4 erase --force
|
||||
Erasing flash... Success
|
||||
Checking memory from 0x0 to 0x6FFF... Empty.
|
||||
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
|
||||
Checking memory from 0x0 to 0x55FF... Empty.
|
||||
0% 100% Programming 0x5600 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
0% 100% Reading 0x7000 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
Validating... Success
|
||||
0x5600 bytes written into 0x7000 bytes memory (76.79%).
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
|
||||
*** DFU device disconnected
|
||||
*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
|
||||
```
|
||||
|
||||
## 使用命令行刷新键盘
|
||||
|
||||
首先,您需要知道您的键盘使用的是哪个bootloader。通常是以下四个常见的bootloader。Pro-Micro 和 clones 使用 CATERINA, Teensy 使用 Halfkay, OLKB 键盘使用 QMK-DFU, 其他的atmega32u4芯片使用DFU。
|
||||
|
||||
您可以在以下文章中了解更多关于bootloader[刷新指令和Bootloader信息](flashing.md)。
|
||||
|
||||
如果您知道正在使用的bootloader是哪种,那么在编译固件时,可以向“make”命令里添加一些额外参数,以自动执行刷新过程。
|
||||
|
||||
### DFU
|
||||
|
||||
对于DFU引导加载程序,当您准备好编译和刷新固件时,打开终端窗口并运行构建命令:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:dfu
|
||||
|
||||
例如,如果您的布局名为“xyverz”,并且您正在为rev5 planck构建一个布局,那么您可以使用此命令:
|
||||
|
||||
make planck/rev5:xyverz:dfu
|
||||
|
||||
编译完成后,应输出以下内容:
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev5_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
|
||||
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
|
||||
Checking file size of planck_rev5_xyverz.hex
|
||||
* File size is fine - 18574/28672
|
||||
```
|
||||
|
||||
到了这个时候, 构建脚本将每隔5秒查找一次DFU。它将重复以下操作,直到找到设备或将其取消。
|
||||
|
||||
dfu-programmer: no device present.
|
||||
Error: Bootloader not found. Trying again in 5s.
|
||||
|
||||
一旦出现以上回显,您将需要重置控制器。然后,它应该显示与以下类似的输出:
|
||||
|
||||
```
|
||||
*** Attempting to flash, please don't remove device
|
||||
>>> dfu-programmer atmega32u4 erase --force
|
||||
Erasing flash... Success
|
||||
Checking memory from 0x0 to 0x6FFF... Empty.
|
||||
>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
|
||||
Checking memory from 0x0 to 0x55FF... Empty.
|
||||
0% 100% Programming 0x5600 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
0% 100% Reading 0x7000 bytes...
|
||||
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
|
||||
Validating... Success
|
||||
0x5600 bytes written into 0x7000 bytes memory (76.79%).
|
||||
>>> dfu-programmer atmega32u4 reset
|
||||
```
|
||||
|
||||
如果您对此有任何问题,您可能需要这样做:
|
||||
|
||||
sudo make <my_keyboard>:<my_keymap>:dfu
|
||||
|
||||
#### DFU命令
|
||||
|
||||
有许多DFU命令可用于将固件下载到DFU设备:
|
||||
|
||||
* `:dfu` - 这是正常选项,等待DFU设备可用,然后刷新固件。这将每隔5秒检查一次,以查看是否出现了DFU设备。
|
||||
* `:dfu-ee` - 这将刷新一个`eep`文件,而不是普通的十六进制文件。这很不常见。
|
||||
* `:dfu-split-left` - 这将刷新正常固件,就像默认选项 (`:dfu`)一样. 但是,这也会刷新“左侧”EEPROM文件,用于分割键盘。 _这是基于Elite C的键盘的推荐选择。_
|
||||
* `:dfu-split-right` - 这将刷新正常固件,就像默认选项(`:dfu`). 但是,这也会刷新“右侧”EEPROM文件,用于分割键盘。 _这是基于Elite C的键盘的推荐选择。_
|
||||
|
||||
|
||||
### Caterina
|
||||
|
||||
对于Arduino板以及其克隆版来说(比如SparkFun和ProMicro), 准备好编译和刷新固件后,打开终端窗口并运行构建命令:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:avrdude
|
||||
|
||||
比如, 你的布局叫"xyverz"你要创建一个rev2 Lets Split的布局,你要用以下命令:
|
||||
|
||||
make lets_split/rev2:xyverz:avrdude
|
||||
|
||||
固件完成编译后,它将输出类似以下的内容:
|
||||
|
||||
```
|
||||
Linking: .build/lets_split_rev2_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK]
|
||||
Checking file size of lets_split_rev2_xyverz.hex [OK]
|
||||
* File size is fine - 27938/28672
|
||||
Detecting USB port, reset your controller now..............
|
||||
```
|
||||
|
||||
此时,复位,然后脚本将检测bootloader,然后刷新固件。输出应该像这样:
|
||||
|
||||
```
|
||||
Detected controller on USB port at /dev/ttyS15
|
||||
|
||||
Connecting to programmer: .
|
||||
Found programmer: Id = "CATERIN"; type = S
|
||||
Software Version = 1.0; No Hardware Version given.
|
||||
Programmer supports auto addr increment.
|
||||
Programmer supports buffered memory access with buffersize=128 bytes.
|
||||
|
||||
Programmer supports the following devices:
|
||||
Device code: 0x44
|
||||
|
||||
avrdude.exe: AVR device initialized and ready to accept instructions
|
||||
|
||||
Reading | ################################################## | 100% 0.00s
|
||||
|
||||
avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
|
||||
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
|
||||
To disable this feature, specify the -D option.
|
||||
avrdude.exe: erasing chip
|
||||
avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex"
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
|
||||
avrdude.exe: writing flash (27938 bytes):
|
||||
|
||||
Writing | ################################################## | 100% 2.40s
|
||||
|
||||
avrdude.exe: 27938 bytes of flash written
|
||||
avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex:
|
||||
avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex:
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
|
||||
avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes
|
||||
avrdude.exe: reading on-chip flash data:
|
||||
|
||||
Reading | ################################################## | 100% 0.43s
|
||||
|
||||
avrdude.exe: verifying ...
|
||||
avrdude.exe: 27938 bytes of flash verified
|
||||
|
||||
avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF)
|
||||
|
||||
avrdude.exe done. Thank you.
|
||||
```
|
||||
如果您对此有任何问题,您可能需要这样做:
|
||||
|
||||
sudo make <my_keyboard>:<my_keymap>:avrdude
|
||||
|
||||
|
||||
此外,如果要刷新多个板,请使用以下命令:
|
||||
|
||||
make <keyboard>:<keymap>:avrdude-loop
|
||||
|
||||
当你完成了刷新后,你需要按下ctrl+c或者其他正确的按键来让你的操作系统终止循环。
|
||||
|
||||
|
||||
## HalfKay
|
||||
|
||||
对于PJRC设备(Teensy),当您准备好编译和刷新固件时,打开终端窗口并运行构建命令:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:teensy
|
||||
|
||||
比如, 如果你的布局叫做"xyverz"你想创建Ergodox or Ergodox EZ的布局,你要使用以下命令:
|
||||
|
||||
make erdogox_ez:xyverz:teensy
|
||||
|
||||
固件完成编译后,它将输出如下内容:
|
||||
|
||||
```
|
||||
Linking: .build/ergodox_ez_xyverz.elf [OK]
|
||||
Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK]
|
||||
Checking file size of ergodox_ez_xyverz.hex [OK]
|
||||
* File size is fine - 25584/32256
|
||||
Teensy Loader, Command Line, Version 2.1
|
||||
Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage
|
||||
Waiting for Teensy device...
|
||||
(hint: press the reset button)
|
||||
```
|
||||
|
||||
此时,复位键盘。完成后,您将看到如下输出:
|
||||
|
||||
```
|
||||
Found HalfKay Bootloader
|
||||
Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage
|
||||
Programming............................................................................................................................................................................
|
||||
...................................................
|
||||
Booting
|
||||
```
|
||||
|
||||
## STM32 (ARM)
|
||||
|
||||
对于大多数ARM板(包括Proton C、Planck Rev 6和Preonic Rev 3),当您准备好编译和刷新固件时,打开终端窗口并运行构建命令:
|
||||
|
||||
make <my_keyboard>:<my_keymap>:dfu-util
|
||||
|
||||
例如,如果您的keymap被命名为“xyverz”,并且您正在为Planck Revision 6键盘构建一个布局,那么您需要使用以下命令,然后将键盘重新启动到bootloader(在完成编译之前):
|
||||
|
||||
make planck/rev6:xyverz:dfu-util
|
||||
|
||||
固件完成编译后,它将输出如下内容:
|
||||
|
||||
```
|
||||
Linking: .build/planck_rev6_xyverz.elf [OK]
|
||||
Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK]
|
||||
Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK]
|
||||
|
||||
Size after:
|
||||
text data bss dec hex filename
|
||||
0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex
|
||||
|
||||
Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK]
|
||||
dfu-util 0.9
|
||||
|
||||
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
|
||||
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
|
||||
This program is Free Software and has ABSOLUTELY NO WARRANTY
|
||||
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
|
||||
|
||||
Invalid DFU suffix signature
|
||||
A valid DFU suffix will be required in a future dfu-util release!!!
|
||||
Opening DFU capable USB device...
|
||||
ID 0483:df11
|
||||
Run-time device DFU version 011a
|
||||
Claiming USB DFU Interface...
|
||||
Setting Alternate Setting #0 ...
|
||||
Determining device status: state = dfuERROR, status = 10
|
||||
dfuERROR, clearing status
|
||||
Determining device status: state = dfuIDLE, status = 0
|
||||
dfuIDLE, continuing
|
||||
DFU mode device DFU version 011a
|
||||
Device returned transfer size 2048
|
||||
DfuSe interface name: "Internal Flash "
|
||||
Downloading to address = 0x08000000, size = 41824
|
||||
Download [=========================] 100% 41824 bytes
|
||||
Download done.
|
||||
File downloaded successfully
|
||||
Transitioning to dfuMANIFEST state
|
||||
```
|
||||
|
||||
## 试一试吧!
|
||||
|
||||
恭喜您! 您的自定义固件已经刷写到您的键盘
|
||||
|
||||
试一试,确保一切按你想的方式进行。我们写了[测试和调试](newbs_testing_debugging.md)来完善新手引导。 因此,请前往那里了解如何排除自定义功能的故障。
|
102
docs/zh-cn/newbs_getting_started.md
Normal file
102
docs/zh-cn/newbs_getting_started.md
Normal file
@@ -0,0 +1,102 @@
|
||||
# 介绍
|
||||
|
||||
你的电脑键盘里面包含一个处理器, 这个处理器和你电脑里面的不太一样。这个处理器负责运行一些特殊的软件,这些软件可以监测按钮按下并将按钮处于按下还是释放状态的数据发送出去。QMK就是这样一种软件,即监测按钮被按下并发送这样的信息到作为主机的计算机上。当你创建了你的布局, 你也就创建了你的键盘运行的的可执行程序。
|
||||
|
||||
QMK试图通过使简单的事情变得更简单,使使不可能成为可能来把大量的权力交给你。你不需要懂如何通过程序创建强大的布局——你只需要遵循简单的语法规则。
|
||||
|
||||
# 新手上路
|
||||
|
||||
在你能创建布局前,你要安装一些软件来建立你的开发环境。无论你想编译多少固件,这个操作都只需要进行一次。
|
||||
|
||||
如果您更喜欢图形化界面, 请考虑使用在线工具[QMK配置器](https://config.qmk.fm)。 请参考 [使用在线GUI构建您的第一个固件](newbs_building_firmware_configurator.md)。
|
||||
|
||||
|
||||
## 下载软件
|
||||
|
||||
### 文本编辑器
|
||||
|
||||
你需要一个可以编辑 **纯文本** 文件的程序。在Windows上你可以用Notepad, 在Linux上使用gedit,这两个都是简单又实用的文本编辑工具。 在macOS上, 请小心使用 “文本编辑” 这个默认软件: 如果你不明确的选择_格式_菜单中的 _制作纯文本_ 的话文本将不会被保存为纯文本。
|
||||
|
||||
你也可以下载并安装一个专用编辑器 [Sublime Text](https://www.sublimetext.com/) 或 [VS Code](https://code.visualstudio.com/)。 这大概是跨平台的最好方法了, 这些编辑器是专门为了编辑代码设计的。
|
||||
|
||||
?>搞不清用哪种编辑器? Laurence Bradford 写了篇关于编辑器选择的文章 [a great introduction](https://learntocodewith.me/programming/basics/text-editors/)。
|
||||
|
||||
### QMK 工具箱
|
||||
|
||||
QMK 工具箱 是一种可选的Windows和macOS下的图形化工具,它可以对你的定制键盘进行编程和调试。你可能会发现它就是你能简单的刷新你的键盘固件并查看调试信息的稀世珍宝。
|
||||
|
||||
[在这里下载最新发布版本](https://github.com/qmk/qmk_toolbox/releases/latest)
|
||||
|
||||
* Windows用户: `qmk_toolbox.exe` (绿色版) 或 `qmk_toolbox_install.exe` (安装版)
|
||||
* macOS用户: `QMK.Toolbox.app.zip` (绿色版) or `QMK.Toolbox.pkg` (安装版)
|
||||
|
||||
## 建立你的环境
|
||||
|
||||
我们为了使QMK环境变得更容易建立已竭尽所能。你只需要准备Linux 或 Unix 环境, 然后让QMK安装剩余部分。
|
||||
|
||||
?> 如果你从未使用过Linux/Unix的命令行,有一些你需要学习的基础概念和命令,以下资料将教会您使用QMK环境的必要能力:<br>
|
||||
[必会Linux命令](https://www.guru99.com/must-know-linux-commands.html)<br>
|
||||
[一些基本的Unix命令](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
||||
|
||||
### Windows
|
||||
|
||||
你需要安装MSYS2和Git.
|
||||
|
||||
* 按照以下安装说明进行操作[MSYS2 主页](http://www.msys2.org)。
|
||||
* 关闭所有打开的MSYS2终端并打开新的MSYS2 MinGW 64-bit终端。
|
||||
* 使用以下命令安装Git: `pacman -S git`。
|
||||
|
||||
### macOS
|
||||
|
||||
你需要安装Homebrew。按照以下说明进行操作 [Homebrew 主页](https://brew.sh)。
|
||||
|
||||
在Homebrew安装完成后, 继续 _同步QMK工程_. 这一步你将会通过运行一个脚本安装其他包。
|
||||
|
||||
### Linux
|
||||
|
||||
你将需要安装Git.你很有可能已经安装,但若你尚未安装,可以使用以下命令进行安装:
|
||||
|
||||
* Debian / Ubuntu / Devuan: `apt-get install git`
|
||||
* Fedora / Red Hat / CentOS: `yum install git`
|
||||
* Arch: `pacman -S git`
|
||||
|
||||
?> 无论你使用哪种平台,Docker都可以是你的选择[点这里进一步了解](getting_started_build_tools.md#docker)
|
||||
|
||||
## 同步QMK工程
|
||||
|
||||
当你建立Linux/Unix环境后,你就已经可以下载QMK了.下载时我们可以用Git来 "clone" QMK仓库. 打开一个终端或MSYS2 MinGW 窗口,在阅读剩余的指南时请保持窗口打开。在窗口里面运行以下两句命令:
|
||||
|
||||
```shell
|
||||
git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
|
||||
cd qmk_firmware
|
||||
```
|
||||
|
||||
?> 如果您已经知道[如何使用GitHub](getting_started_github.md), 我们推荐您创建您自己的分支并克隆。 如果您不知道这是什么, 您完全可以忽略这句无关紧要的话。
|
||||
|
||||
QMK附带一个脚本,可帮助您设置剩余的所需内容.您可以通过输入此命令来运行它:
|
||||
|
||||
util/qmk_install.sh
|
||||
|
||||
## 测试你的开发环境
|
||||
|
||||
现在你的QMK环境已经建立完毕, 你可以为你的键盘创建固件了。开始试着创建键盘的默认固件吧。 你需要使用以下格式的命令创建固件:
|
||||
|
||||
make <keyboard>:default
|
||||
|
||||
比如, 制作一个Clueboard 66%的固件,需要用:
|
||||
|
||||
make clueboard/66/rev3:default
|
||||
|
||||
当完成后你要看到一些回显,尾部如下:
|
||||
|
||||
```
|
||||
Linking: .build/clueboard_66_rev3_default.elf [OK]
|
||||
Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK]
|
||||
Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK]
|
||||
Checking file size of clueboard_66_rev3_default.hex [OK]
|
||||
* The firmware size is fine - 26356/28672 (2316 bytes free)
|
||||
```
|
||||
|
||||
# 创建你的布局
|
||||
|
||||
现在你可以创建属于你自己的布局了! 请移步 [构建你的第一个固件](newbs_building_firmware.md)来继续。
|
15
docs/zh-cn/newbs_learn_more_resources.md
Normal file
15
docs/zh-cn/newbs_learn_more_resources.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 学习资源
|
||||
|
||||
这些资源旨在让QMK社区的新成员更了解新成员文档中提供的信息。
|
||||
|
||||
Git 资源:
|
||||
|
||||
* [很好的通用教程](https://www.codecademy.com/learn/learn-git)
|
||||
* [从例子中学习Git游戏](https://learngitbranching.js.org/)
|
||||
* [了解有关GitHub的更多信息的Git资源](getting_started_github.md)
|
||||
* [专门针对QMK的Git资源](contributing.md)
|
||||
|
||||
|
||||
命令行资源:
|
||||
|
||||
* [超棒的命令行通用教程](https://www.codecademy.com/learn/learn-the-command-line)
|
43
docs/zh-cn/newbs_testing_debugging.md
Normal file
43
docs/zh-cn/newbs_testing_debugging.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# 测试和调试
|
||||
|
||||
使用自定义固件刷新键盘后,您就可以测试它了。如果您幸运,一切都会完美运行,但如果没有,这份文件将帮助您找出问题所在。
|
||||
|
||||
## 测试
|
||||
|
||||
测试键盘通常非常简单。按下每一个键并确保它发送的是您期望的键。甚至有一些程序可以帮助您确保没有任何键失效。
|
||||
|
||||
注意:这些程序不是由QMK提供或认可的。
|
||||
|
||||
* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (仅Windows)
|
||||
* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (仅Mac)
|
||||
* [Keyboard Tester](http://www.keyboardtester.com) (网页版)
|
||||
* [Keyboard Checker](http://keyboardchecker.com) (网页版)
|
||||
|
||||
## 使用QMK工具箱进行调试
|
||||
|
||||
[QMK工具箱](https://github.com/qmk/qmk_toolbox) 将会在你的`rules.mk`中有`CONSOLE_ENABLE = yes`的时候显示你键盘发来的消息。 默认情况下,输出极为有限,不过您可以打开调试模式来增加输出信息量。使用你键盘布局中的`DEBUG`键码,使用 [命令](feature_command.md) 特性来使能调试模式, 或者向你的布局中添加以下代码。
|
||||
|
||||
```c
|
||||
void keyboard_post_init_user(void) {
|
||||
// Customise these values to desired behaviour
|
||||
debug_enable=true;
|
||||
debug_matrix=true;
|
||||
//debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
}
|
||||
```
|
||||
|
||||
<!-- 需要修改之处:这里要添加调试回显。 -->
|
||||
|
||||
## 发送您自己的调试消息
|
||||
|
||||
有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`:
|
||||
|
||||
#include <print.h>
|
||||
|
||||
之后,您可以使用一些不同的打印功能:
|
||||
|
||||
* `print("string")`: 打印简单字符串.
|
||||
* `uprintf("%s string", var)`: 打印格式化字符串
|
||||
* `dprint("string")`: 仅在调试模式使能时打印简单字符串
|
||||
* `dprintf("%s string", var)`: 仅在调试模式使能时打印格式化字符串
|
@@ -158,7 +158,7 @@ void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b)
|
||||
|
||||
void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
|
||||
{
|
||||
for (int i = 0; i < RGBLED_NUM; i++) {
|
||||
for (int i = 0; i < sizeof(led)/sizeof(led[0]); i++) {
|
||||
led[i].r = r;
|
||||
led[i].g = g;
|
||||
led[i].b = b;
|
||||
|
15
keyboards/bm16s/bm16s.h
Executable file
15
keyboards/bm16s/bm16s.h
Executable file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_ortho_4x4( \
|
||||
K00, K01, K02, K03, \
|
||||
K10, K11, K12, K13, \
|
||||
K20, K21, K22, K23, \
|
||||
K30, K31, K32, K33 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03 }, \
|
||||
{ K10, K11, K12, K13 }, \
|
||||
{ K20, K21, K22, K23 }, \
|
||||
{ K30, K31, K32, K33 } \
|
||||
}
|
46
keyboards/bm16s/config.h
Executable file
46
keyboards/bm16s/config.h
Executable file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER KPrepublic
|
||||
#define PRODUCT bm16s
|
||||
#define DESCRIPTION KPrepublic bm16s
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { D1, D0, D3, D2 }
|
||||
#define MATRIX_COL_PINS { F7, F6, D4, D6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
#ifdef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#endif
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
30
keyboards/bm16s/info.json
Normal file
30
keyboards/bm16s/info.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"keyboard_name": "bm16s",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 4,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_4x4": {
|
||||
"key_count": 16,
|
||||
"layout": [
|
||||
{"x":0, "y":0},
|
||||
{"x":1, "y":0},
|
||||
{"x":2, "y":0},
|
||||
{"x":3, "y":0},
|
||||
{"x":0, "y":1},
|
||||
{"x":1, "y":1},
|
||||
{"x":2, "y":1},
|
||||
{"x":3, "y":1},
|
||||
{"x":0, "y":2},
|
||||
{"x":1, "y":2},
|
||||
{"x":2, "y":2},
|
||||
{"x":3, "y":2},
|
||||
{"x":0, "y":3},
|
||||
{"x":1, "y":3},
|
||||
{"x":2, "y":3},
|
||||
{"x":3, "y":3}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
16
keyboards/bm16s/keymaps/default/keymap.c
Executable file
16
keyboards/bm16s/keymaps/default/keymap.c
Executable file
@@ -0,0 +1,16 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_4x4(
|
||||
KC_KP_7, KC_KP_8, KC_KP_9, MO(1), \
|
||||
KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, \
|
||||
KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, \
|
||||
KC_KP_0, KC_PDOT, KC_PCMM, KC_PENT \
|
||||
),
|
||||
[1] = LAYOUT_ortho_4x4(
|
||||
RESET, BL_STEP, _______, KC_VOLU, \
|
||||
BL_TOGG, BL_DEC, BL_INC, KC_VOLD, \
|
||||
RGB_TOG, RGB_MOD, RGB_HUI, KC_MUTE, \
|
||||
RGB_SAI, RGB_SAD, RGB_HUD, _______ \
|
||||
),
|
||||
};
|
20
keyboards/bm16s/keymaps/media/keymap.c
Executable file
20
keyboards/bm16s/keymaps/media/keymap.c
Executable file
@@ -0,0 +1,20 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define RGB_BRU RGB_VAI
|
||||
#define RGB_BRD RGB_VAD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_ortho_4x4(
|
||||
KC_BRIU, _______, _______, KC_VOLU, \
|
||||
KC_BRID, _______, _______, KC_VOLD, \
|
||||
_______, _______, _______, KC_MUTE, \
|
||||
KC_MPRV, KC_MPLY, KC_MNXT, MO(1) \
|
||||
),
|
||||
[1] = LAYOUT_ortho_4x4(
|
||||
RESET, _______, _______, _______, \
|
||||
RGB_SPD, RGB_BRU, RGB_SPI, _______, \
|
||||
RGB_RMOD, RGB_BRD, RGB_MOD, _______, \
|
||||
RGB_TOG, _______, _______, _______ \
|
||||
),
|
||||
};
|
13
keyboards/bm16s/readme.md
Normal file
13
keyboards/bm16s/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# bm16s
|
||||
|
||||
A 16-key macropad, with USB C and per-key RGB backlighting. This is a variant of the BM16A, but with low profile Choc switches.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: The PCBs, controllers supported
|
||||
Hardware Availability: [KPrepublic](https://kprepublic.com/collections/pcb/products/bm16s-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch-leds-choc-switch); [AliExpress](https://www.aliexpress.com/item/bm16s-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch/32999247908.html); [Massdrop](https://www.massdrop.com/buy/78169)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make bm16s:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
72
keyboards/bm16s/rules.mk
Executable file
72
keyboards/bm16s/rules.mk
Executable file
@@ -0,0 +1,72 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
# Bootloader selection
|
||||
# Teensy halfkay
|
||||
# Pro Micro caterina
|
||||
# Atmel DFU atmel-dfu
|
||||
# LUFA DFU lufa-dfu
|
||||
# QMK DFU qmk-dfu
|
||||
# atmega32a bootloadHID
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
|
||||
# If you don't know the bootloader type, then you can specify the
|
||||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
LAYOUTS = ortho_4x4
|
16
keyboards/boardwalk/keymaps/brendanwr/config.h
Normal file
16
keyboards/boardwalk/keymaps/brendanwr/config.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
95
keyboards/boardwalk/keymaps/brendanwr/keymap.c
Normal file
95
keyboards/boardwalk/keymaps/brendanwr/keymap.c
Normal file
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
|
||||
enum layer {
|
||||
_BASE,
|
||||
_FN,
|
||||
_BACKLIT
|
||||
};
|
||||
|
||||
|
||||
#define FN MO(_FN)
|
||||
#define BACKLIT MO(_BACKLIT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BASE
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | \ |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BACKSP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||
* | LCTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | HOME |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | FN | END |
|
||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | | LALT | LGUI | SPACE | RGUI | RALT | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_BASE] = LAYOUT_ortho_7u(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, KC_END,
|
||||
KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
|
||||
),
|
||||
|
||||
/* FUNCTION
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ` |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | | | | | | | | | | | UP | | | DEL |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||
* | | VOLD | VOLU | MUTE | | | | | | | LEFT | RIGHT | | PG_UP |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||
* | | | | | | | | | | | DOWN | | | PG_DN |
|
||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | | | | | | | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_FN] = LAYOUT_ortho_7u(
|
||||
_______, 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_GRV,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_DEL,
|
||||
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, KC_PGUP,
|
||||
BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, KC_PGDN,
|
||||
_______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* BACKLIT
|
||||
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||
* | | RGBTOG | RGBMOD | RGBHUI | RGBHUD | RGBSAI | RGBSAD | RGBVAI | RGBVAD | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||
* | | | | | | | |
|
||||
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_BACKLIT] = LAYOUT_ortho_7u(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
@@ -19,20 +19,18 @@
|
||||
#include "haptic.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#include "rgblight.h"
|
||||
#include "rgb_matrix.h"
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
/*{row | col << 4}
|
||||
| {x=0..224, y=0..64}
|
||||
| | modifier
|
||||
| | | */
|
||||
{{1|(3<<4)}, {188, 16}, 4},
|
||||
{{3|(3<<4)}, {187, 48}, 4},
|
||||
{{4|(2<<4)}, {149, 64}, 4},
|
||||
{{4|(1<<4)}, {112, 64}, 4},
|
||||
{{3|(0<<4)}, {37, 48}, 4},
|
||||
{{1|(0<<4)}, {38, 16}, 4}
|
||||
};
|
||||
led_config_t g_led_config = { {
|
||||
{ 5, NO_LED, NO_LED, 0 },
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||
{ 4, NO_LED, NO_LED, 1 },
|
||||
{ 3, NO_LED, NO_LED, 2 }
|
||||
}, {
|
||||
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4
|
||||
} };
|
||||
#endif
|
||||
|
||||
uint8_t *o_fb;
|
||||
@@ -48,12 +46,12 @@ uint16_t counterst = 0;
|
||||
#define ScreenOffInterval 60000 /* milliseconds */
|
||||
static uint16_t last_flush;
|
||||
|
||||
volatile uint8_t led_numlock = false;
|
||||
volatile uint8_t led_capslock = false;
|
||||
volatile uint8_t led_numlock = false;
|
||||
volatile uint8_t led_capslock = false;
|
||||
volatile uint8_t led_scrolllock = false;
|
||||
|
||||
static uint8_t layer;
|
||||
static bool queue_for_send = false;
|
||||
static bool queue_for_send = false;
|
||||
static uint8_t encoder_value = 32;
|
||||
|
||||
__attribute__ ((weak))
|
||||
@@ -64,13 +62,13 @@ void draw_ui(void) {
|
||||
|
||||
/* Boston MK title is 55 x 10 pixels */
|
||||
#define NAME_X 0
|
||||
#define NAME_Y 0
|
||||
#define NAME_Y 0
|
||||
|
||||
draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0);
|
||||
|
||||
/* Layer indicator is 41 x 10 pixels */
|
||||
#define LAYER_INDICATOR_X 60
|
||||
#define LAYER_INDICATOR_Y 0
|
||||
#define LAYER_INDICATOR_Y 0
|
||||
|
||||
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
||||
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
||||
@@ -88,7 +86,7 @@ void draw_ui(void) {
|
||||
draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM);
|
||||
/* hadron oled location on thumbnail */
|
||||
draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM);
|
||||
@@ -195,7 +193,7 @@ void matrix_init_kb(void) {
|
||||
queue_for_send = true;
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
if (queue_for_send) {
|
||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||
|
56
keyboards/butterstick/butterstick.c
Normal file
56
keyboards/butterstick/butterstick.c
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Copyright 2019 Jeremy Bernhardt
|
||||
*
|
||||
* 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 "butterstick.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
// These are only required if you want to perform custom actions.
|
||||
|
||||
/*
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
*/
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
#ifdef DEBUG_MATRIX
|
||||
for (uint8_t c = 0; c < MATRIX_COLS; c++)
|
||||
for (uint8_t r = 0; r < MATRIX_ROWS; r++)
|
||||
if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
|
||||
#endif
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
/*
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
*/
|
11
keyboards/butterstick/butterstick.h
Normal file
11
keyboards/butterstick/butterstick.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT_butter( \
|
||||
k09, k08, k07, k06, k05, k04, k03, k02, k01, k00, \
|
||||
k19, k18, k17, k16, k15, k14, k13, k12, k11, k10 \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
|
||||
}
|
26
keyboards/butterstick/config.h
Normal file
26
keyboards/butterstick/config.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x1337
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER g Heavy Industries
|
||||
#define PRODUCT Butter Stick
|
||||
#define DESCRIPTION Its a stick of butter
|
||||
#define VERSION "Paula Deen"
|
||||
|
||||
#define DEBOUNCING_DELAY 5
|
||||
#define FORCE_NKRO
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 2
|
||||
#define MATRIX_COLS 10
|
||||
#define MATRIX_ROW_PINS { F4, F5 }
|
||||
#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7}
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL*/
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
183
keyboards/butterstick/keymaps/default/keymap.c
Normal file
183
keyboards/butterstick/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,183 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include "sten.h"
|
||||
/*
|
||||
* Key names are inherited from steno machines
|
||||
* .-----------------------------------------------------.
|
||||
* | LSU | LFT | LP | LH | ST1 | RF | RP | RL | RT | RD |
|
||||
* |-----------------------------------------------------|
|
||||
* | LSD | LK | LW | LR | ST2 | RR | RB | RG | RS | RZ |
|
||||
* '-----------------------------------------------------'
|
||||
*/
|
||||
|
||||
// Function prefixes
|
||||
#define MEDIA (LSD | LK | LW | LR)
|
||||
#define FUNCT (LSD | LK | LP | LH)
|
||||
#define MOVE (LSU | LFT | LP | LH)
|
||||
#define SYMB (RD | RZ)
|
||||
#define NUMA (LW | LR)
|
||||
#define NUMB (RR | RB)
|
||||
|
||||
// QMK Layer Numbers
|
||||
#define BASE 0
|
||||
#define GAME 1
|
||||
|
||||
// Do not change QMK Layer 0! This is your main keyboard.
|
||||
// Make your QMK modifications to the later layers, to add
|
||||
// keys/customize on the first layer modify processQwerty():
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[BASE] = LAYOUT_butter(
|
||||
STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
|
||||
STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR
|
||||
),
|
||||
// I don't game don't roast me thanks
|
||||
[GAME] = LAYOUT_butter(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_ENT,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TO(BASE)
|
||||
)
|
||||
};
|
||||
|
||||
// Note: You can only use basic keycodes here!
|
||||
// P() is just a wrapper to make your life easier, any C code can be executed.
|
||||
// Only the longest matched chord is run!
|
||||
//
|
||||
// http://docs.gboards.ca
|
||||
uint32_t processQwerty(bool lookup) {
|
||||
// SECRET AGENT CHORDS
|
||||
P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__));
|
||||
P( LSD | RZ, SEND(KC_SPC));
|
||||
|
||||
// Dual chords
|
||||
P( LP | LH, CLICK_MOUSE(KC_MS_BTN2));
|
||||
P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1));
|
||||
P( LSU | LFT, SEND(KC_ESC));
|
||||
P( LSD | LK, SEND(KC_LSFT));
|
||||
P( RZ | RS, SEND(KC_LSFT));
|
||||
P( ST2 | RR, SEND(KC_SPC));
|
||||
P( RP | RL, SEND(KC_LGUI));
|
||||
P( RT | RD, SEND(KC_LCTL));
|
||||
P( RL | RT, SEND(KC_LALT));
|
||||
P( LSU | LSD | LFT | LK, SEND(KC_LCTL));
|
||||
P( RS | RT | RD | RZ, SEND(KC_ENT));
|
||||
|
||||
// Function Layer
|
||||
P( FUNCT | RF, SEND(KC_F1));
|
||||
P( FUNCT | RP, SEND(KC_F2));
|
||||
P( FUNCT | RL, SEND(KC_F3));
|
||||
P( FUNCT | RT, SEND(KC_F4));
|
||||
P( FUNCT | RF | RR, SEND(KC_F5));
|
||||
P( FUNCT | RP | RB, SEND(KC_F6));
|
||||
P( FUNCT | RL | RG, SEND(KC_F7));
|
||||
P( FUNCT | RT | RS, SEND(KC_F8));
|
||||
P( FUNCT | RR, SEND(KC_F9));
|
||||
P( FUNCT | RB, SEND(KC_F10));
|
||||
P( FUNCT | RG, SEND(KC_F11));
|
||||
P( FUNCT | RS, SEND(KC_F12));
|
||||
|
||||
// Movement Layer
|
||||
P( MOVE | RF, SEND(KC_LEFT));
|
||||
P( MOVE | RP, SEND(KC_DOWN));
|
||||
P( MOVE | RL, SEND(KC_UP));
|
||||
P( MOVE | RT, SEND(KC_RIGHT));
|
||||
P( MOVE | ST1, SEND(KC_PGUP));
|
||||
P( MOVE | ST2, SEND(KC_PGDN));
|
||||
|
||||
// Media Layer
|
||||
P( MEDIA | RF, SEND(KC_MPRV));
|
||||
P( MEDIA | RP, SEND(KC_MPLY));
|
||||
P( MEDIA | RL, SEND(KC_MPLY));
|
||||
P( MEDIA | RT, SEND(KC_MNXT));
|
||||
P( MEDIA | RG, SEND(KC_VOLU));
|
||||
P( MEDIA | RB, SEND(KC_VOLD));
|
||||
P( MEDIA | RS, SEND(KC_MUTE));
|
||||
|
||||
// Number Row, Right
|
||||
P( NUMB | LSU, SEND(KC_1));
|
||||
P( NUMB | LFT, SEND(KC_2));
|
||||
P( NUMB | LP, SEND(KC_3));
|
||||
P( NUMB | LH, SEND(KC_4));
|
||||
P( NUMB | ST1, SEND(KC_5));
|
||||
P( NUMB | RF, SEND(KC_6));
|
||||
P( NUMB | RP, SEND(KC_7));
|
||||
P( NUMB | RL, SEND(KC_8));
|
||||
P( NUMB | RT, SEND(KC_9));
|
||||
P( NUMB | RD, SEND(KC_0));
|
||||
|
||||
// Number Row, Left
|
||||
P( NUMA | LSU, SEND(KC_1));
|
||||
P( NUMA | LFT, SEND(KC_2));
|
||||
P( NUMA | LP, SEND(KC_3));
|
||||
P( NUMA | LH, SEND(KC_4));
|
||||
P( NUMA | ST1, SEND(KC_5));
|
||||
P( NUMA | RF, SEND(KC_6));
|
||||
P( NUMA | RP, SEND(KC_7));
|
||||
P( NUMA | RL, SEND(KC_8));
|
||||
P( NUMA | RT, SEND(KC_9));
|
||||
P( NUMA | RD, SEND(KC_0));
|
||||
|
||||
|
||||
// Symbols and Numbers
|
||||
P( SYMB | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
|
||||
P( SYMB | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
|
||||
P( SYMB | ST1 | ST2, SEND(KC_GRV)); // `
|
||||
P( SYMB | RR | RF, SEND(KC_LSFT); SEND(KC_3)); // #
|
||||
P( SYMB | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
|
||||
P( SYMB | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
|
||||
P( SYMB | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
|
||||
P( SYMB | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
|
||||
P( SYMB | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
|
||||
P( SYMB | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
|
||||
P( SYMB | LW, SEND(KC_LBRC));
|
||||
P( SYMB | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
|
||||
P( SYMB | LR, SEND(KC_RBRC));
|
||||
P( SYMB | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
|
||||
P( SYMB | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
|
||||
P( SYMB | RP | RB, SEND(KC_QUOT));
|
||||
P( SYMB | RP | RG, SEND(KC_LSFT); SEND(KC_QUOT)); // "
|
||||
P( SYMB | RF, SEND(KC_KP_PLUS));
|
||||
P( SYMB | RR, SEND(KC_LSFT); SEND(KC_7)); // &
|
||||
P( SYMB | RP, SEND(KC_MINS));
|
||||
P( SYMB | RB, SEND(KC_EQL));
|
||||
P( SYMB | RL, SEND(KC_SLSH));
|
||||
P( SYMB | RG, SEND(KC_COMM));
|
||||
P( SYMB | RT, SEND(KC_PAST));
|
||||
P( SYMB | RS, SEND(KC_DOT));
|
||||
|
||||
// Letters
|
||||
P( LSU | LSD, SEND(KC_A));
|
||||
P( LFT | LK, SEND(KC_S));
|
||||
P( LP | LW, SEND(KC_D));
|
||||
P( LH | LR, SEND(KC_F));
|
||||
P( ST1 | ST2, SEND(KC_G));
|
||||
P( RF | RR, SEND(KC_H));
|
||||
P( RT | RS, SEND(KC_L));
|
||||
P( RD | RZ, SEND(KC_SCLN));
|
||||
P( RG | RL, SEND(KC_K));
|
||||
P( RP | RB, SEND(KC_J));
|
||||
P( LSU, SEND(KC_Q));
|
||||
P( LSD, SEND(KC_Z));
|
||||
P( LFT, SEND(KC_W));
|
||||
P( LK, SEND(KC_X));
|
||||
P( LP, SEND(KC_E));
|
||||
P( LW, SEND(KC_C));
|
||||
P( LH, SEND(KC_R));
|
||||
P( LR, SEND(KC_V));
|
||||
P( ST1, SEND(KC_T));
|
||||
P( ST2, SEND(KC_B));
|
||||
P( RF, SEND(KC_Y));
|
||||
P( RR, SEND(KC_N));
|
||||
P( RP, SEND(KC_U));
|
||||
P( RB, SEND(KC_M));
|
||||
P( RL, SEND(KC_I));
|
||||
P( RG, SEND(KC_COMM));
|
||||
P( RT, SEND(KC_O));
|
||||
P( RS, SEND(KC_DOT));
|
||||
P( RD, SEND(KC_P));
|
||||
P( RZ, SEND(KC_SLSH));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// Don't fuck with this, thanks.
|
||||
size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
|
14
keyboards/butterstick/readme.md
Normal file
14
keyboards/butterstick/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Butter Stick
|
||||
|
||||

|
||||
|
||||
A chorded 20% keyboard packing full sized useage into your pocket. More info on [gboards.ca](http://docs.gboards.ca/Meet-Butter-Stick)!
|
||||
|
||||
Keyboard Maintainer: [Germ](https://github.com/germ)
|
||||
Hardware Availability: [g Heavy Industries](https://www.gboards.ca/product/butter-stick-limited-edition)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make butterstick:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
19
keyboards/butterstick/rules.mk
Normal file
19
keyboards/butterstick/rules.mk
Normal file
@@ -0,0 +1,19 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -DONLYQWERTY -DDEBUG_MATRIX
|
||||
SRC += sten.c
|
||||
EXTRAFLAGS += -flto
|
||||
|
||||
|
||||
BOOTLOADER = atmel-dfu
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
STENO_ENABLE = yes # Needed for chording
|
||||
|
367
keyboards/butterstick/sten.c
Normal file
367
keyboards/butterstick/sten.c
Normal file
@@ -0,0 +1,367 @@
|
||||
#include "sten.h"
|
||||
|
||||
// Chord state
|
||||
uint32_t cChord = 0; // Current Chord
|
||||
int chordIndex = 0; // Keys in previousachord
|
||||
int32_t chordState[32]; // Full Chord history
|
||||
#define QWERBUF 24 // Size of chords to buffer for output
|
||||
|
||||
bool repeatFlag = false; // Should we repeat?
|
||||
uint32_t pChord = 0; // Previous Chord
|
||||
int pChordIndex = 0; // Keys in previousachord
|
||||
uint32_t pChordState[32]; // Previous chord sate
|
||||
uint32_t stickyBits = 0; // Or'd with every incoming press
|
||||
|
||||
// Mode state
|
||||
enum MODE { STENO = 0, QWERTY, COMMAND };
|
||||
enum MODE pMode;
|
||||
bool QWERSTENO = false;
|
||||
#ifdef ONLYQWERTY
|
||||
enum MODE cMode = QWERTY;
|
||||
#else
|
||||
enum MODE cMode = STENO;
|
||||
#endif
|
||||
|
||||
// Command State
|
||||
#define MAX_CMD_BUF 20
|
||||
uint8_t CMDLEN = 0;
|
||||
uint8_t CMDBUF[MAX_CMD_BUF];
|
||||
|
||||
// Key Repeat state
|
||||
bool inChord = false;
|
||||
bool repEngaged = false;
|
||||
uint16_t repTimer = 0;
|
||||
#define REP_INIT_DELAY 750
|
||||
#define REP_DELAY 25
|
||||
|
||||
// Mousekeys state
|
||||
bool inMouse = false;
|
||||
int8_t mousePress;
|
||||
|
||||
// All processing done at chordUp goes through here
|
||||
// Note, this is a gutted version of the Georgi sten.h
|
||||
bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
|
||||
// Check for mousekeys, this is release
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
if (inMouse) {
|
||||
inMouse = false;
|
||||
mousekey_off(mousePress);
|
||||
mousekey_send();
|
||||
}
|
||||
#endif
|
||||
|
||||
// handle command mode
|
||||
if (cChord == (LSU | LSD | RD | RZ)) {
|
||||
if (cMode != COMMAND) { // Entering Command Mode
|
||||
CMDLEN = 0;
|
||||
pMode = cMode;
|
||||
cMode = COMMAND;
|
||||
} else { // Exiting Command Mode
|
||||
cMode = pMode;
|
||||
|
||||
// Press all and release all
|
||||
for (int i = 0; i < CMDLEN; i++) {
|
||||
register_code(CMDBUF[i]);
|
||||
}
|
||||
clear_keyboard();
|
||||
}
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
// Handle Gaming Toggle,
|
||||
if (cChord == (LSU | LSD | LFT | LK | RT | RS | RD | RZ) && keymapsCount > 1) {
|
||||
#ifndef NO_DEBUG
|
||||
uprintf("Switching to QMK\n");
|
||||
#endif
|
||||
layer_on(1);
|
||||
goto out;
|
||||
}
|
||||
|
||||
// Do QWERTY and Momentary QWERTY
|
||||
if (cMode == QWERTY || (cMode == COMMAND)) {
|
||||
processChord(false);
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
cChord = 0;
|
||||
inChord = false;
|
||||
chordIndex = 0;
|
||||
clear_keyboard();
|
||||
repEngaged = false;
|
||||
for (int i = 0; i < 32; i++)
|
||||
chordState[i] = 0xFFFF;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Update Chord State
|
||||
bool process_steno_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// Everything happens in here when steno keys come in.
|
||||
// Bail on keyup
|
||||
if (!record->event.pressed) return true;
|
||||
|
||||
// Update key repeat timers
|
||||
repTimer = timer_read();
|
||||
inChord = true;
|
||||
|
||||
// Switch on the press adding to chord
|
||||
bool pr = record->event.pressed;
|
||||
switch (keycode) {
|
||||
// Mods and stuff
|
||||
case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break;
|
||||
case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break;
|
||||
case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break;
|
||||
case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break;
|
||||
case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break;
|
||||
case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break;
|
||||
case STN_N1...STN_N6: pr ? (cChord |= (LNO)): (cChord &= ~(LNO)); break;
|
||||
case STN_N7...STN_NC: pr ? (cChord |= (RNO)): (cChord &= ~(RNO)); break;
|
||||
|
||||
// All the letter keys
|
||||
case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break;
|
||||
case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break;
|
||||
case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break;
|
||||
case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break;
|
||||
case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break;
|
||||
case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break;
|
||||
case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break;
|
||||
case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break;
|
||||
case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break;
|
||||
case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break;
|
||||
case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break;
|
||||
case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break;
|
||||
case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break;
|
||||
case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break;
|
||||
case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break;
|
||||
case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break;
|
||||
case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break;
|
||||
case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break;
|
||||
case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break;
|
||||
case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break;
|
||||
case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break;
|
||||
case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break;
|
||||
}
|
||||
|
||||
// Store previous state for fastQWER
|
||||
if (pr) {
|
||||
chordState[chordIndex] = cChord;
|
||||
chordIndex++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
void matrix_scan_user(void) {
|
||||
// We abuse this for early sending of key
|
||||
// Key repeat only on QWER/SYMB layers
|
||||
if (cMode != QWERTY || !inChord) return;
|
||||
|
||||
// Check timers
|
||||
#ifndef NO_REPEAT
|
||||
if (repEngaged && timer_elapsed(repTimer) > REP_DELAY) {
|
||||
// Process Key for report
|
||||
processChord(false);
|
||||
|
||||
// Send report to host
|
||||
send_keyboard_report();
|
||||
clear_keyboard();
|
||||
repTimer = timer_read();
|
||||
}
|
||||
|
||||
if (!repEngaged && timer_elapsed(repTimer) > REP_INIT_DELAY) {
|
||||
repEngaged = true;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
// For Plover NKRO
|
||||
uint32_t processFakeSteno(bool lookup) {
|
||||
P( LSU, SEND(KC_Q););
|
||||
P( LSD, SEND(KC_A););
|
||||
P( LFT, SEND(KC_W););
|
||||
P( LP, SEND(KC_E););
|
||||
P( LH, SEND(KC_R););
|
||||
P( LK, SEND(KC_S););
|
||||
P( LW, SEND(KC_D););
|
||||
P( LR, SEND(KC_F););
|
||||
P( ST1, SEND(KC_T););
|
||||
P( ST2, SEND(KC_G););
|
||||
P( LA, SEND(KC_C););
|
||||
P( LO, SEND(KC_V););
|
||||
P( RE, SEND(KC_N););
|
||||
P( RU, SEND(KC_M););
|
||||
P( ST3, SEND(KC_Y););
|
||||
P( ST4, SEND(KC_H););
|
||||
P( RF, SEND(KC_U););
|
||||
P( RP, SEND(KC_I););
|
||||
P( RL, SEND(KC_O););
|
||||
P( RT, SEND(KC_P););
|
||||
P( RD, SEND(KC_LBRC););
|
||||
P( RR, SEND(KC_J););
|
||||
P( RB, SEND(KC_K););
|
||||
P( RG, SEND(KC_L););
|
||||
P( RS, SEND(KC_SCLN););
|
||||
P( RZ, SEND(KC_COMM););
|
||||
P( LNO, SEND(KC_1););
|
||||
P( RNO, SEND(KC_1););
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Traverse the chord history to a given point
|
||||
// Returns the mask to use
|
||||
void processChord(bool useFakeSteno) {
|
||||
// Save the clean chord state
|
||||
uint32_t savedChord = cChord;
|
||||
|
||||
// Apply Stick Bits if needed
|
||||
if (stickyBits != 0) {
|
||||
cChord |= stickyBits;
|
||||
for (int i = 0; i <= chordIndex; i++)
|
||||
chordState[i] |= stickyBits;
|
||||
}
|
||||
|
||||
// Strip FN
|
||||
if (cChord & FN) cChord ^= FN;
|
||||
|
||||
// First we test if a whole chord was passsed
|
||||
// If so we just run it handling repeat logic
|
||||
if (useFakeSteno && processFakeSteno(true) == cChord) {
|
||||
processFakeSteno(false);
|
||||
return;
|
||||
} else if (processQwerty(true) == cChord) {
|
||||
processQwerty(false);
|
||||
// Repeat logic
|
||||
if (repeatFlag) {
|
||||
restoreState();
|
||||
repeatFlag = false;
|
||||
processChord(false);
|
||||
} else {
|
||||
saveState(cChord);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Iterate through chord picking out the individual
|
||||
// and longest chords
|
||||
uint32_t bufChords[QWERBUF];
|
||||
int bufLen = 0;
|
||||
uint32_t mask = 0;
|
||||
|
||||
// We iterate over it multiple times to catch the longest
|
||||
// chord. Then that gets addded to the mask and re run.
|
||||
while (savedChord != mask) {
|
||||
uint32_t test = 0;
|
||||
uint32_t longestChord = 0;
|
||||
|
||||
for (int i = 0; i <= chordIndex; i++) {
|
||||
cChord = chordState[i] & ~mask;
|
||||
if (cChord == 0)
|
||||
continue;
|
||||
|
||||
// Assume mid parse Sym is new chord
|
||||
if (i != 0 && test != 0 && (cChord ^ test) == PWR) {
|
||||
longestChord = test;
|
||||
break;
|
||||
}
|
||||
|
||||
// Lock SYM layer in once detected
|
||||
if (mask & PWR)
|
||||
cChord |= PWR;
|
||||
|
||||
|
||||
// Testing for keycodes
|
||||
if (useFakeSteno) {
|
||||
test = processFakeSteno(true);
|
||||
} else {
|
||||
test = processQwerty(true);
|
||||
}
|
||||
|
||||
if (test != 0) {
|
||||
longestChord = test;
|
||||
}
|
||||
}
|
||||
|
||||
mask |= longestChord;
|
||||
bufChords[bufLen] = longestChord;
|
||||
bufLen++;
|
||||
|
||||
// That's a loop of sorts, halt processing
|
||||
if (bufLen >= QWERBUF) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Now that the buffer is populated, we run it
|
||||
for (int i = 0; i < bufLen ; i++) {
|
||||
cChord = bufChords[i];
|
||||
if (useFakeSteno) {
|
||||
processFakeSteno(false);
|
||||
} else {
|
||||
processQwerty(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Save state in case of repeat
|
||||
if (!repeatFlag) {
|
||||
saveState(savedChord);
|
||||
}
|
||||
|
||||
// Restore cChord for held repeat
|
||||
cChord = savedChord;
|
||||
|
||||
return;
|
||||
}
|
||||
void saveState(uint32_t cleanChord) {
|
||||
pChord = cleanChord;
|
||||
pChordIndex = chordIndex;
|
||||
for (int i = 0; i < 32; i++)
|
||||
pChordState[i] = chordState[i];
|
||||
}
|
||||
void restoreState() {
|
||||
cChord = pChord;
|
||||
chordIndex = pChordIndex;
|
||||
for (int i = 0; i < 32; i++)
|
||||
chordState[i] = pChordState[i];
|
||||
}
|
||||
|
||||
// Macros for calling from keymap.c
|
||||
void SEND(uint8_t kc) {
|
||||
// Send Keycode, Does not work for Quantum Codes
|
||||
if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) {
|
||||
#ifndef NO_DEBUG
|
||||
uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF);
|
||||
#endif
|
||||
CMDBUF[CMDLEN] = kc;
|
||||
CMDLEN++;
|
||||
}
|
||||
|
||||
if (cMode != COMMAND) register_code(kc);
|
||||
return;
|
||||
}
|
||||
void REPEAT(void) {
|
||||
if (cMode != QWERTY)
|
||||
return;
|
||||
|
||||
repeatFlag = true;
|
||||
return;
|
||||
}
|
||||
void SET_STICKY(uint32_t stick) {
|
||||
stickyBits = stick;
|
||||
return;
|
||||
}
|
||||
void SWITCH_LAYER(int layer) {
|
||||
if (keymapsCount >= layer)
|
||||
layer_on(layer);
|
||||
}
|
||||
void CLICK_MOUSE(uint8_t kc) {
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
mousekey_on(kc);
|
||||
mousekey_send();
|
||||
|
||||
// Store state for later use
|
||||
inMouse = true;
|
||||
mousePress = kc;
|
||||
#endif
|
||||
}
|
77
keyboards/butterstick/sten.h
Normal file
77
keyboards/butterstick/sten.h
Normal file
@@ -0,0 +1,77 @@
|
||||
// 2019, g Heavy Industries
|
||||
// Blessed mother of Christ, please keep this readable
|
||||
// and protect us from segfaults. For thine is the clock,
|
||||
// the slave and the master. Until we return from main.
|
||||
//
|
||||
// Amen.
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "mousekey.h"
|
||||
#include "keymap.h"
|
||||
#include "keymap_steno.h"
|
||||
#include "wait.h"
|
||||
|
||||
extern size_t keymapsCount; // Total keymaps
|
||||
extern uint32_t cChord; // Current Chord
|
||||
|
||||
// Function defs
|
||||
void processChord(bool useFakeSteno);
|
||||
uint32_t processQwerty(bool lookup);
|
||||
uint32_t processFakeSteno(bool lookup);
|
||||
void saveState(uint32_t cChord);
|
||||
void restoreState(void);
|
||||
|
||||
// Macros for use in keymap.c
|
||||
void SEND(uint8_t kc);
|
||||
void REPEAT(void);
|
||||
void SET_STICKY(uint32_t);
|
||||
void SWITCH_LAYER(int);
|
||||
void CLICK_MOUSE(uint8_t);
|
||||
|
||||
// Keymap helper
|
||||
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
|
||||
|
||||
// Shift to internal representation
|
||||
// i.e) S(teno)R(ight)F
|
||||
#define STN(n) (1L<<n)
|
||||
enum ORDER {
|
||||
SFN = 0, SPWR, SST1, SST2, SST3, SST4, SNUML, SNUMR,
|
||||
SLSU, SLSD, SLT, SLK, SLP, SLW, SLH, SLR, SLA, SLO,
|
||||
SRE, SRU, SRF, SRR, SRP, SRB, SRL, SRG, SRT, SRS, SRD, SRZ, SRES1, SRES2
|
||||
};
|
||||
|
||||
// Break it all out
|
||||
#define FN STN(SFN)
|
||||
#define PWR STN(SPWR)
|
||||
#define ST1 STN(SST1)
|
||||
#define ST2 STN(SST2)
|
||||
#define ST3 STN(SST3)
|
||||
#define ST4 STN(SST4)
|
||||
#define LNO STN(SNUML) // STN1-6
|
||||
#define RNO STN(SNUMR) // STN7-C
|
||||
#define RES1 STN(SRES1) // Use reserved for sticky state
|
||||
#define RES2 STN(SRES2)
|
||||
|
||||
#define LSU STN(SLSU)
|
||||
#define LSD STN(SLSD)
|
||||
#define LFT STN(SLT) // (L)e(F)t (T), preprocessor conflict
|
||||
#define LK STN(SLK)
|
||||
#define LP STN(SLP)
|
||||
#define LW STN(SLW)
|
||||
#define LH STN(SLH)
|
||||
#define LR STN(SLR)
|
||||
#define LA STN(SLA)
|
||||
#define LO STN(SLO)
|
||||
|
||||
#define RE STN(SRE)
|
||||
#define RU STN(SRU)
|
||||
#define RF STN(SRF)
|
||||
#define RR STN(SRR)
|
||||
#define RP STN(SRP)
|
||||
#define RB STN(SRB)
|
||||
#define RL STN(SRL)
|
||||
#define RG STN(SRG)
|
||||
#define RT STN(SRT)
|
||||
#define RS STN(SRS)
|
||||
#define RD STN(SRD)
|
||||
#define RZ STN(SRZ)
|
@@ -31,6 +31,7 @@ OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
// Value to place in RTC backup register 10 for persistent bootloader mode
|
||||
#define RTC_BOOTLOADER_FLAG 0x424C
|
||||
|
||||
/**
|
||||
* @brief PAL setup.
|
||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||
* This variable is used by the HAL when initializing the PAL driver.
|
||||
*/
|
||||
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||
const PALConfig pal_default_config =
|
||||
{
|
||||
{VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH},
|
||||
{VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH},
|
||||
{VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH},
|
||||
{VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH},
|
||||
{VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH},
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Early initialization code.
|
||||
* This initialization must be performed just after stack setup and before
|
||||
* any other initialization.
|
||||
*/
|
||||
void __early_init(void) {
|
||||
|
||||
stm32_clock_init();
|
||||
}
|
||||
|
||||
/*
|
||||
* Board-specific initialization code.
|
||||
*/
|
||||
void boardInit(void) {
|
||||
//JTAG-DP Disabled and SW-DP Enabled
|
||||
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
|
||||
//Set backup register DR10 to enter bootloader on reset
|
||||
BKP->DR10 = RTC_BOOTLOADER_FLAG;
|
||||
}
|
@@ -0,0 +1,166 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
/*
|
||||
* Setup for a Generic STM32F103 board.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Board identifier.
|
||||
*/
|
||||
#define BOARD_GENERIC_STM32_F103
|
||||
#define BOARD_NAME "Generic STM32F103x board"
|
||||
|
||||
/*
|
||||
* Board frequencies.
|
||||
*/
|
||||
#define STM32_LSECLK 32768
|
||||
#define STM32_HSECLK 8000000
|
||||
|
||||
/*
|
||||
* MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
|
||||
*/
|
||||
#define STM32F103xB
|
||||
|
||||
/*
|
||||
* IO pins assignments
|
||||
*/
|
||||
|
||||
/* on-board */
|
||||
|
||||
#define GPIOA_LED 8
|
||||
#define GPIOD_OSC_IN 0
|
||||
#define GPIOD_OSC_OUT 1
|
||||
|
||||
/* In case your board has a "USB enable" hardware
|
||||
controlled by a pin, define it here. (It could be just
|
||||
a 1.5k resistor connected to D+ line.)
|
||||
*/
|
||||
/*
|
||||
#define GPIOB_USB_DISC 10
|
||||
*/
|
||||
|
||||
/*
|
||||
* I/O ports initial setup, this configuration is established soon after reset
|
||||
* in the initialization code.
|
||||
*
|
||||
* The digits have the following meaning:
|
||||
* 0 - Analog input.
|
||||
* 1 - Push Pull output 10MHz.
|
||||
* 2 - Push Pull output 2MHz.
|
||||
* 3 - Push Pull output 50MHz.
|
||||
* 4 - Digital input.
|
||||
* 5 - Open Drain output 10MHz.
|
||||
* 6 - Open Drain output 2MHz.
|
||||
* 7 - Open Drain output 50MHz.
|
||||
* 8 - Digital input with PullUp or PullDown resistor depending on ODR.
|
||||
* 9 - Alternate Push Pull output 10MHz.
|
||||
* A - Alternate Push Pull output 2MHz.
|
||||
* B - Alternate Push Pull output 50MHz.
|
||||
* C - Reserved.
|
||||
* D - Alternate Open Drain output 10MHz.
|
||||
* E - Alternate Open Drain output 2MHz.
|
||||
* F - Alternate Open Drain output 50MHz.
|
||||
* Please refer to the STM32 Reference Manual for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Port A setup.
|
||||
* Everything input with pull-up except:
|
||||
* PA2 - Alternate output (USART2 TX).
|
||||
* PA3 - Normal input (USART2 RX).
|
||||
* PA9 - Alternate output (USART1 TX).
|
||||
* PA10 - Normal input (USART1 RX).
|
||||
*/
|
||||
#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */
|
||||
#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */
|
||||
#define VAL_GPIOAODR 0xFFFFFFFF
|
||||
|
||||
/*
|
||||
* Port B setup.
|
||||
* Everything input with pull-up except:
|
||||
* PB10 - Push Pull output (USB switch).
|
||||
*/
|
||||
#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
|
||||
#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */
|
||||
#define VAL_GPIOBODR 0xFFFFFFFF
|
||||
|
||||
/*
|
||||
* Port C setup.
|
||||
* Everything input with pull-up except:
|
||||
* PC13 - Push Pull output (LED).
|
||||
*/
|
||||
#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */
|
||||
#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */
|
||||
#define VAL_GPIOCODR 0xFFFFFFFF
|
||||
|
||||
/*
|
||||
* Port D setup.
|
||||
* Everything input with pull-up except:
|
||||
* PD0 - Normal input (XTAL).
|
||||
* PD1 - Normal input (XTAL).
|
||||
*/
|
||||
#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */
|
||||
#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */
|
||||
#define VAL_GPIODODR 0xFFFFFFFF
|
||||
|
||||
/*
|
||||
* Port E setup.
|
||||
* Everything input with pull-up except:
|
||||
*/
|
||||
#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */
|
||||
#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
|
||||
#define VAL_GPIOEODR 0xFFFFFFFF
|
||||
|
||||
/*
|
||||
* USB bus activation macro, required by the USB driver.
|
||||
*/
|
||||
/* The point is that most of the generic STM32F103* boards
|
||||
have a 1.5k resistor connected on one end to the D+ line
|
||||
and on the other end to some pin. Or even a slightly more
|
||||
complicated "USB enable" circuit, controlled by a pin.
|
||||
That should go here.
|
||||
|
||||
However on some boards (e.g. one that I have), there's no
|
||||
such hardware. In which case it's better to not do anything.
|
||||
*/
|
||||
/*
|
||||
#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC)
|
||||
*/
|
||||
#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT);
|
||||
|
||||
/*
|
||||
* USB bus de-activation macro, required by the USB driver.
|
||||
*/
|
||||
/*
|
||||
#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC)
|
||||
*/
|
||||
#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12);
|
||||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void boardInit(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _FROM_ASM_ */
|
||||
|
||||
#endif /* _BOARD_H_ */
|
@@ -0,0 +1,5 @@
|
||||
# List of all the board related files.
|
||||
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c
|
||||
|
||||
# Required include directories
|
||||
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103
|
@@ -1,7 +1,10 @@
|
||||
/* Address for jumping to bootloader on STM32 chips. */
|
||||
/* It is chip dependent, the correct number can be looked up here:
|
||||
/* It is chip dependent, the correct number can be looked up here (page 175):
|
||||
* http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
* This also requires a patch to chibios:
|
||||
* <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
*/
|
||||
#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800
|
||||
|
||||
// STM32F103* does NOT have an USB bootloader in ROM (only serial),
|
||||
// so setting anything here does not make much sense
|
||||
#define STM32_BOOTLOADER_ADDRESS 0x80000000
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -58,7 +58,7 @@
|
||||
* The value one is not valid, timeouts are rounded up to
|
||||
* this value.
|
||||
*/
|
||||
#define CH_CFG_ST_TIMEDELTA 2
|
||||
#define CH_CFG_ST_TIMEDELTA 0
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -105,6 +105,10 @@
|
||||
*/
|
||||
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||
|
||||
/* Use __WFI in the idle thread for waiting. Does lower the power
|
||||
* consumption. */
|
||||
#define CORTEX_ENABLE_WFI_IDLE TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
@@ -140,7 +144,7 @@
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_TM TRUE
|
||||
#define CH_CFG_USE_TM FALSE
|
||||
|
||||
/**
|
||||
* @brief Threads registry APIs.
|
||||
@@ -214,7 +218,7 @@
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs.
|
||||
@@ -252,7 +256,7 @@
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
|
||||
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||
|
||||
/**
|
||||
* @brief Mailboxes APIs.
|
||||
@@ -292,7 +296,7 @@
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||
#define CH_CFG_USE_MEMPOOLS FALSE
|
||||
|
||||
/**
|
||||
* @brief Dynamic Threads APIs.
|
||||
@@ -303,7 +307,7 @@
|
||||
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||
*/
|
||||
#define CH_CFG_USE_DYNAMIC TRUE
|
||||
#define CH_CFG_USE_DYNAMIC FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -374,7 +378,7 @@
|
||||
* @note The default failure mode is to halt the system with the global
|
||||
* @p panic_msg variable set to @p NULL.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_STACK_CHECK TRUE
|
||||
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, stacks initialization.
|
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2015 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -16,57 +15,49 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef REV2_CONFIG_H
|
||||
#define REV2_CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
#pragma once
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0100
|
||||
#define MANUFACTURER Omkbd
|
||||
#define PRODUCT ErgoDash
|
||||
#define DESCRIPTION Power
|
||||
#define VENDOR_ID 0xCA04
|
||||
#define PRODUCT_ID 0x6565
|
||||
#define DEVICE_VER 0x0001
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER CannonKeys
|
||||
#define PRODUCT Practice 65
|
||||
#define DESCRIPTION Practice 65
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 7
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
|
||||
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
|
||||
#define MATRIX_COL_PINS { B8, B0, A0, B5, B10, B9, A6, B12, A7, A5, A4, A3, A2, A1, B13, B14 }
|
||||
#define MATRIX_ROW_PINS { B4, B11, B1, B7, B6 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define tapping term */
|
||||
#define TAPPING_TERM 120
|
||||
#define BACKLIGHT_LEVELS 6
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
#define C6_AUDIO
|
||||
|
||||
/* number of backlight levels */
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#define BACKLIGHT_PIN B6
|
||||
#define BACKLIGHT_LEVELS 7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
// #define BREATHING_PERIOD 4
|
||||
#endif
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#define WS2812_LED_N 20
|
||||
#define RGBLED_NUM WS2812_LED_N
|
||||
#define PORT_WS2812 GPIOB
|
||||
#define PIN_WS2812 15
|
||||
#define WS2812_SPI SPID2
|
||||
|
||||
#define RGBLED_NUM 24 // Number of LEDs
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
@@ -74,10 +65,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
// #define NO_DEBUG
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
// #define NO_PRINT
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
@@ -85,5 +76,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -25,8 +25,8 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef HALCONF_H
|
||||
#define HALCONF_H
|
||||
#ifndef _HALCONF_H_
|
||||
#define _HALCONF_H_
|
||||
|
||||
#include "mcuconf.h"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
* @brief Enables the DAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_DAC TRUE
|
||||
#define HAL_USE_DAC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -69,14 +69,14 @@
|
||||
* @brief Enables the GPT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_GPT TRUE
|
||||
#define HAL_USE_GPT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_I2C FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -111,14 +111,7 @@
|
||||
* @brief Enables the PWM subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PWM FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the QSPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_QSPI FALSE
|
||||
#define HAL_USE_PWM TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -153,7 +146,7 @@
|
||||
* @brief Enables the SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SPI FALSE
|
||||
#define HAL_USE_SPI TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -301,7 +294,7 @@
|
||||
* @brief Serial buffers size.
|
||||
* @details Configuration parameter, you can change the depth of the queue
|
||||
* buffers depending on the requirements of your application.
|
||||
* @note The default is 16 bytes for both the transmission and receive
|
||||
* @note The default is 64 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
@@ -316,21 +309,13 @@
|
||||
* @brief Serial over USB buffers size.
|
||||
* @details Configuration parameter, the buffer size must be a multiple of
|
||||
* the USB data endpoint maximum packet size.
|
||||
* @note The default is 256 bytes for both the transmission and receive
|
||||
* @note The default is 64 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial over USB number of buffers.
|
||||
* @note The default is 2 buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
@@ -351,26 +336,6 @@
|
||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* UART driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define UART_USE_WAIT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* USB driver related settings. */
|
||||
/*===========================================================================*/
|
||||
@@ -383,6 +348,6 @@
|
||||
#define USB_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
#endif /* HALCONF_H */
|
||||
#endif /* _HALCONF_H_ */
|
||||
|
||||
/** @} */
|
48
keyboards/cannonkeys/practice65/keymaps/default/keymap.c
Normal file
48
keyboards/cannonkeys/practice65/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Copyright 2012,2013 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _BASE 0
|
||||
#define _FN1 1
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_default(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_INS,\
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,\
|
||||
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_PGUP, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \
|
||||
),
|
||||
|
||||
[_FN1] = LAYOUT_default(
|
||||
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, _______,\
|
||||
RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
|
||||
BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, RESET \
|
||||
)
|
||||
};
|
105
keyboards/cannonkeys/practice65/ld/MKL26Z64.ld
Normal file
105
keyboards/cannonkeys/practice65/ld/MKL26Z64.ld
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com
|
||||
* (C) 2016 flabbergast <s3+flabbergast@sdfeu.org>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* KL26Z64 memory setup.
|
||||
*/
|
||||
MEMORY
|
||||
{
|
||||
flash0 : org = 0x00000000, len = 0x100
|
||||
flash1 : org = 0x00000400, len = 0x10
|
||||
flash2 : org = 0x00000410, len = 62k - 0x410
|
||||
flash3 : org = 0x0000F800, len = 2k
|
||||
flash4 : org = 0x00000000, len = 0
|
||||
flash5 : org = 0x00000000, len = 0
|
||||
flash6 : org = 0x00000000, len = 0
|
||||
flash7 : org = 0x00000000, len = 0
|
||||
ram0 : org = 0x1FFFF800, len = 8k
|
||||
ram1 : org = 0x00000000, len = 0
|
||||
ram2 : org = 0x00000000, len = 0
|
||||
ram3 : org = 0x00000000, len = 0
|
||||
ram4 : org = 0x00000000, len = 0
|
||||
ram5 : org = 0x00000000, len = 0
|
||||
ram6 : org = 0x00000000, len = 0
|
||||
ram7 : org = 0x00000000, len = 0
|
||||
}
|
||||
|
||||
/* Flash region for the configuration bytes.*/
|
||||
SECTIONS
|
||||
{
|
||||
.cfmprotect : ALIGN(4) SUBALIGN(4)
|
||||
{
|
||||
KEEP(*(.cfmconfig))
|
||||
} > flash1
|
||||
}
|
||||
|
||||
/* For each data/text section two region are defined, a virtual region
|
||||
and a load region (_LMA suffix).*/
|
||||
|
||||
/* Flash region to be used for exception vectors.*/
|
||||
REGION_ALIAS("VECTORS_FLASH", flash0);
|
||||
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
|
||||
|
||||
/* Flash region to be used for constructors and destructors.*/
|
||||
REGION_ALIAS("XTORS_FLASH", flash2);
|
||||
REGION_ALIAS("XTORS_FLASH_LMA", flash2);
|
||||
|
||||
/* Flash region to be used for code text.*/
|
||||
REGION_ALIAS("TEXT_FLASH", flash2);
|
||||
REGION_ALIAS("TEXT_FLASH_LMA", flash2);
|
||||
|
||||
/* Flash region to be used for read only data.*/
|
||||
REGION_ALIAS("RODATA_FLASH", flash2);
|
||||
REGION_ALIAS("RODATA_FLASH_LMA", flash2);
|
||||
|
||||
/* Flash region to be used for various.*/
|
||||
REGION_ALIAS("VARIOUS_FLASH", flash2);
|
||||
REGION_ALIAS("VARIOUS_FLASH_LMA", flash2);
|
||||
|
||||
/* Flash region to be used for RAM(n) initialization data.*/
|
||||
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2);
|
||||
|
||||
/* RAM region to be used for Main stack. This stack accommodates the processing
|
||||
of all exceptions and interrupts.*/
|
||||
REGION_ALIAS("MAIN_STACK_RAM", ram0);
|
||||
|
||||
/* RAM region to be used for the process stack. This is the stack used by
|
||||
the main() function.*/
|
||||
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
|
||||
|
||||
/* RAM region to be used for data segment.*/
|
||||
REGION_ALIAS("DATA_RAM", ram0);
|
||||
REGION_ALIAS("DATA_RAM_LMA", flash2);
|
||||
|
||||
/* RAM region to be used for BSS segment.*/
|
||||
REGION_ALIAS("BSS_RAM", ram0);
|
||||
|
||||
/* RAM region to be used for the default heap.*/
|
||||
REGION_ALIAS("HEAP_RAM", ram0);
|
||||
|
||||
__eeprom_workarea_start__ = ORIGIN(flash3);
|
||||
__eeprom_workarea_size__ = LENGTH(flash3);
|
||||
__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__;
|
||||
|
||||
/* Generic rules inclusion.*/
|
||||
INCLUDE rules.ld
|
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ST32F103xB memory setup for use with the maplemini bootloader.
|
||||
* You will have to
|
||||
* #define CORTEX_VTOR_INIT 0x5000
|
||||
* in your projects chconf.h
|
||||
*/
|
||||
MEMORY
|
||||
{
|
||||
flash0 : org = 0x08002000, len = 64k - 0x2000
|
||||
flash1 : org = 0x00000000, len = 0
|
||||
flash2 : org = 0x00000000, len = 0
|
||||
flash3 : org = 0x00000000, len = 0
|
||||
flash4 : org = 0x00000000, len = 0
|
||||
flash5 : org = 0x00000000, len = 0
|
||||
flash6 : org = 0x00000000, len = 0
|
||||
flash7 : org = 0x00000000, len = 0
|
||||
ram0 : org = 0x20000000, len = 20k
|
||||
ram1 : org = 0x00000000, len = 0
|
||||
ram2 : org = 0x00000000, len = 0
|
||||
ram3 : org = 0x00000000, len = 0
|
||||
ram4 : org = 0x00000000, len = 0
|
||||
ram5 : org = 0x00000000, len = 0
|
||||
ram6 : org = 0x00000000, len = 0
|
||||
ram7 : org = 0x00000000, len = 0
|
||||
}
|
||||
|
||||
/* For each data/text section two region are defined, a virtual region
|
||||
and a load region (_LMA suffix).*/
|
||||
|
||||
/* Flash region to be used for exception vectors.*/
|
||||
REGION_ALIAS("VECTORS_FLASH", flash0);
|
||||
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
|
||||
|
||||
/* Flash region to be used for constructors and destructors.*/
|
||||
REGION_ALIAS("XTORS_FLASH", flash0);
|
||||
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
|
||||
|
||||
/* Flash region to be used for code text.*/
|
||||
REGION_ALIAS("TEXT_FLASH", flash0);
|
||||
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
|
||||
|
||||
/* Flash region to be used for read only data.*/
|
||||
REGION_ALIAS("RODATA_FLASH", flash0);
|
||||
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
|
||||
|
||||
/* Flash region to be used for various.*/
|
||||
REGION_ALIAS("VARIOUS_FLASH", flash0);
|
||||
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
|
||||
|
||||
/* Flash region to be used for RAM(n) initialization data.*/
|
||||
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
|
||||
|
||||
/* RAM region to be used for Main stack. This stack accommodates the processing
|
||||
of all exceptions and interrupts.*/
|
||||
REGION_ALIAS("MAIN_STACK_RAM", ram0);
|
||||
|
||||
/* RAM region to be used for the process stack. This is the stack used by
|
||||
the main() function.*/
|
||||
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
|
||||
|
||||
/* RAM region to be used for data segment.*/
|
||||
REGION_ALIAS("DATA_RAM", ram0);
|
||||
REGION_ALIAS("DATA_RAM_LMA", flash0);
|
||||
|
||||
/* RAM region to be used for BSS segment.*/
|
||||
REGION_ALIAS("BSS_RAM", ram0);
|
||||
|
||||
/* RAM region to be used for the default heap.*/
|
||||
REGION_ALIAS("HEAP_RAM", ram0);
|
||||
|
||||
/* Generic rules inclusion.*/
|
||||
INCLUDE rules.ld
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,11 +14,13 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef MCUCONF_H
|
||||
#define MCUCONF_H
|
||||
#ifndef _MCUCONF_H_
|
||||
#define _MCUCONF_H_
|
||||
|
||||
#define STM32F103_MCUCONF
|
||||
|
||||
/*
|
||||
* STM32F3xx drivers configuration.
|
||||
* STM32F103 drivers configuration.
|
||||
* The following settings override the default settings present in
|
||||
* the various device driver implementation headers.
|
||||
* Note that the settings for each driver only have effect if the whole
|
||||
@@ -31,71 +33,35 @@
|
||||
* 0...3 Lowest...Highest.
|
||||
*/
|
||||
|
||||
#define STM32F3xx_MCUCONF
|
||||
|
||||
/*
|
||||
* HAL driver system settings.
|
||||
*/
|
||||
#define STM32_NO_INIT FALSE
|
||||
#define STM32_PVD_ENABLE FALSE
|
||||
#define STM32_PLS STM32_PLS_LEV0
|
||||
#define STM32_HSI_ENABLED TRUE
|
||||
#define STM32_LSI_ENABLED TRUE
|
||||
#define STM32_LSI_ENABLED FALSE
|
||||
#define STM32_HSE_ENABLED TRUE
|
||||
#define STM32_LSE_ENABLED FALSE
|
||||
#define STM32_SW STM32_SW_PLL
|
||||
#define STM32_PLLSRC STM32_PLLSRC_HSE
|
||||
#define STM32_PREDIV_VALUE 1
|
||||
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
|
||||
#define STM32_PLLMUL_VALUE 9
|
||||
#define STM32_HPRE STM32_HPRE_DIV1
|
||||
#define STM32_PPRE1 STM32_PPRE1_DIV2
|
||||
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
||||
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||
#define STM32_ADC12PRES STM32_ADC12PRES_DIV1
|
||||
#define STM32_ADC34PRES STM32_ADC34PRES_DIV1
|
||||
#define STM32_USART1SW STM32_USART1SW_PCLK
|
||||
#define STM32_USART2SW STM32_USART2SW_PCLK
|
||||
#define STM32_USART3SW STM32_USART3SW_PCLK
|
||||
#define STM32_UART4SW STM32_UART4SW_PCLK
|
||||
#define STM32_UART5SW STM32_UART5SW_PCLK
|
||||
#define STM32_I2C1SW STM32_I2C1SW_SYSCLK
|
||||
#define STM32_I2C2SW STM32_I2C2SW_SYSCLK
|
||||
#define STM32_TIM1SW STM32_TIM1SW_PCLK2
|
||||
#define STM32_TIM8SW STM32_TIM8SW_PCLK2
|
||||
#define STM32_RTCSEL STM32_RTCSEL_LSI
|
||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||
#define STM32_USB_CLOCK_REQUIRED TRUE
|
||||
#define STM32_USBPRE STM32_USBPRE_DIV1P5
|
||||
|
||||
#undef STM32_HSE_BYPASS
|
||||
// #error "oh no"
|
||||
// #endif
|
||||
#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
|
||||
#define STM32_RTCSEL STM32_RTCSEL_HSEDIV
|
||||
#define STM32_PVD_ENABLE FALSE
|
||||
#define STM32_PLS STM32_PLS_LEV0
|
||||
|
||||
/*
|
||||
* ADC driver system settings.
|
||||
*/
|
||||
#define STM32_ADC_DUAL_MODE FALSE
|
||||
#define STM32_ADC_COMPACT_SAMPLES FALSE
|
||||
#define STM32_ADC_USE_ADC1 FALSE
|
||||
#define STM32_ADC_USE_ADC2 FALSE
|
||||
#define STM32_ADC_USE_ADC3 FALSE
|
||||
#define STM32_ADC_USE_ADC4 FALSE
|
||||
#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1)
|
||||
#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1)
|
||||
#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)
|
||||
#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
|
||||
#define STM32_ADC_ADC1_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC2_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC3_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC4_DMA_PRIORITY 2
|
||||
#define STM32_ADC_ADC12_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5
|
||||
#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1
|
||||
#define STM32_ADC_ADC1_IRQ_PRIORITY 6
|
||||
|
||||
/*
|
||||
* CAN driver system settings.
|
||||
@@ -103,17 +69,6 @@
|
||||
#define STM32_CAN_USE_CAN1 FALSE
|
||||
#define STM32_CAN_CAN1_IRQ_PRIORITY 11
|
||||
|
||||
/*
|
||||
* DAC driver system settings.
|
||||
*/
|
||||
#define STM32_DAC_DUAL_MODE FALSE
|
||||
#define STM32_DAC_USE_DAC1_CH1 TRUE
|
||||
#define STM32_DAC_USE_DAC1_CH2 TRUE
|
||||
#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10
|
||||
#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2
|
||||
#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
|
||||
|
||||
/*
|
||||
* EXT driver system settings.
|
||||
*/
|
||||
@@ -128,10 +83,6 @@
|
||||
#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
|
||||
#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
|
||||
|
||||
/*
|
||||
* GPT driver system settings.
|
||||
@@ -140,28 +91,25 @@
|
||||
#define STM32_GPT_USE_TIM2 FALSE
|
||||
#define STM32_GPT_USE_TIM3 FALSE
|
||||
#define STM32_GPT_USE_TIM4 FALSE
|
||||
#define STM32_GPT_USE_TIM6 TRUE
|
||||
#define STM32_GPT_USE_TIM7 TRUE
|
||||
#define STM32_GPT_USE_TIM8 TRUE
|
||||
#define STM32_GPT_USE_TIM5 FALSE
|
||||
#define STM32_GPT_USE_TIM8 FALSE
|
||||
#define STM32_GPT_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM6_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM7_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM5_IRQ_PRIORITY 7
|
||||
#define STM32_GPT_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* I2C driver system settings.
|
||||
*/
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
#define STM32_I2C_USE_I2C1 FALSE
|
||||
#define STM32_I2C_USE_I2C2 FALSE
|
||||
#define STM32_I2C_BUSY_TIMEOUT 50
|
||||
#define STM32_I2C_I2C1_IRQ_PRIORITY 10
|
||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 10
|
||||
#define STM32_I2C_USE_DMA TRUE
|
||||
#define STM32_I2C_I2C1_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C2_DMA_PRIORITY 1
|
||||
#define STM32_I2C_I2C1_IRQ_PRIORITY 5
|
||||
#define STM32_I2C_I2C2_IRQ_PRIORITY 5
|
||||
#define STM32_I2C_I2C1_DMA_PRIORITY 3
|
||||
#define STM32_I2C_I2C2_DMA_PRIORITY 3
|
||||
#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
@@ -171,28 +119,37 @@
|
||||
#define STM32_ICU_USE_TIM2 FALSE
|
||||
#define STM32_ICU_USE_TIM3 FALSE
|
||||
#define STM32_ICU_USE_TIM4 FALSE
|
||||
#define STM32_ICU_USE_TIM5 FALSE
|
||||
#define STM32_ICU_USE_TIM8 FALSE
|
||||
#define STM32_ICU_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM5_IRQ_PRIORITY 7
|
||||
#define STM32_ICU_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* PWM driver system settings.
|
||||
*/
|
||||
#define STM32_PWM_USE_ADVANCED FALSE
|
||||
#define STM32_PWM_USE_TIM1 FALSE
|
||||
#define STM32_PWM_USE_TIM1 TRUE
|
||||
#define STM32_PWM_USE_TIM2 FALSE
|
||||
#define STM32_PWM_USE_TIM3 FALSE
|
||||
#define STM32_PWM_USE_TIM4 FALSE
|
||||
#define STM32_PWM_USE_TIM5 FALSE
|
||||
#define STM32_PWM_USE_TIM8 FALSE
|
||||
#define STM32_PWM_TIM1_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM2_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM3_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM4_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM5_IRQ_PRIORITY 7
|
||||
#define STM32_PWM_TIM8_IRQ_PRIORITY 7
|
||||
|
||||
/*
|
||||
* RTC driver system settings.
|
||||
*/
|
||||
#define STM32_RTC_IRQ_PRIORITY 15
|
||||
|
||||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
@@ -211,7 +168,7 @@
|
||||
* SPI driver system settings.
|
||||
*/
|
||||
#define STM32_SPI_USE_SPI1 FALSE
|
||||
#define STM32_SPI_USE_SPI2 FALSE
|
||||
#define STM32_SPI_USE_SPI2 TRUE
|
||||
#define STM32_SPI_USE_SPI3 FALSE
|
||||
#define STM32_SPI_SPI1_DMA_PRIORITY 1
|
||||
#define STM32_SPI_SPI2_DMA_PRIORITY 1
|
||||
@@ -249,9 +206,4 @@
|
||||
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
|
||||
#define STM32_USB_USB1_LP_IRQ_PRIORITY 14
|
||||
|
||||
/*
|
||||
* WDG driver system settings.
|
||||
*/
|
||||
#define STM32_WDG_USE_IWDG FALSE
|
||||
|
||||
#endif /* MCUCONF_H */
|
||||
#endif /* _MCUCONF_H_ */
|
2
keyboards/cannonkeys/practice65/practice65.c
Normal file
2
keyboards/cannonkeys/practice65/practice65.c
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
#include "practice65.h"
|
19
keyboards/cannonkeys/practice65/practice65.h
Normal file
19
keyboards/cannonkeys/practice65/practice65.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KNO KC_NO
|
||||
|
||||
#define LAYOUT_default( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \
|
||||
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \
|
||||
K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4F \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO , K1F }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \
|
||||
{ K30, KNO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \
|
||||
{ K40, K41, K42, KNO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO, K4F } \
|
||||
}
|
12
keyboards/cannonkeys/practice65/readme.md
Normal file
12
keyboards/cannonkeys/practice65/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Practice 65
|
||||
|
||||
A Blue Pill STM32F103C8T6-based 65% ANSI board.
|
||||
|
||||
Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1)
|
||||
Hardware Supported: Blue Pill STM32F103C8T6
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make cannonkeys/practice65:default
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
53
keyboards/cannonkeys/practice65/rules.mk
Normal file
53
keyboards/cannonkeys/practice65/rules.mk
Normal file
@@ -0,0 +1,53 @@
|
||||
# project specific files
|
||||
VPATH += keyboards/cannonkeys/bluepill
|
||||
SRC = led.c \
|
||||
keyboard.c
|
||||
|
||||
# GENERIC STM32F103C8T6 board - stm32duino bootloader
|
||||
OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000
|
||||
MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader
|
||||
BOARD = GENERIC_STM32_F103
|
||||
|
||||
# OPT_DEFS =
|
||||
# MCU_LDSCRIPT = STM32F103x8
|
||||
# BOARD = GENERIC_STM32_F103
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F1xx
|
||||
# linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
# startup code to use
|
||||
# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f1xx
|
||||
# it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m3
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
|
||||
# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
|
||||
# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have
|
||||
# a custom board definition that you plan to reuse).
|
||||
# If you're not setting it here, leave it commented out.
|
||||
# It is chip dependent, the correct number can be looked up here (page 175):
|
||||
# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
|
||||
# This also requires a patch to chibios:
|
||||
# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch
|
||||
#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
|
||||
|
||||
|
||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
@@ -35,6 +35,7 @@ OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
@@ -13,6 +13,7 @@ OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
@@ -37,6 +37,7 @@ OPT_DEFS =
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
|
||||
# LED Configuration
|
||||
LED_MATRIX_ENABLE = IS31FL3731
|
||||
|
@@ -27,7 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
#define EE_HANDS
|
||||
|
||||
// #define SSD1306OLED
|
||||
#undef USE_I2C
|
||||
#undef SSD1306OLED
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
@@ -35,17 +36,42 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define TAPPING_TERM 100
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 27
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 27
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 100
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
# define RGBLIGHT_LIMIT_VAL 100
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
|
||||
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
// #define DISABLE_RGB_MATRIX_RAINDROPS
|
||||
// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define B6_AUDIO
|
||||
# define B6_AUDIO
|
||||
// #define NO_MUSIC_MODE
|
||||
#endif
|
||||
|
||||
|
@@ -1,15 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "drashna.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
#ifdef SSD1306OLED
|
||||
#include "ssd1306.h"
|
||||
#endif
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
#include "oled_driver.h"
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
extern uint8_t is_master;
|
||||
@@ -20,7 +10,7 @@ extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
enum crkbd_keycodes {
|
||||
RGBRST = NEW_SAFE_RANGE
|
||||
RGBRST = NEW_SAFE_RANGE
|
||||
};
|
||||
|
||||
#define LAYOUT_crkbd_base( \
|
||||
@@ -31,7 +21,7 @@ enum crkbd_keycodes {
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||
)
|
||||
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||
@@ -115,35 +105,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
|
||||
setPinOutput(B0);
|
||||
writePinHigh(B0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
||||
// When add source files to SRC in rules.mk, you can use functions.
|
||||
const char *read_logo(void);
|
||||
char layer_state_str[24];
|
||||
char modifier_state_str[24];
|
||||
char host_led_state_str[24];
|
||||
char keylog_str[24] = {};
|
||||
char keylogs_str[21] = {};
|
||||
int keylogs_str_idx = 0;
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_master) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return rotation;
|
||||
}
|
||||
}
|
||||
|
||||
// const char *read_mode_icon(bool swap);
|
||||
// void set_timelog(void);
|
||||
// const char *read_timelog(void);
|
||||
void render_crkbd_logo(void) {
|
||||
static const char PROGMEM crkbd_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||
0};
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
#define KEYLOG_LEN (int)(32 / OLED_FONT_WIDTH)
|
||||
char keylog_str[KEYLOG_LEN] = {};
|
||||
uint8_t keylogs_str_idx = 0;
|
||||
uint16_t log_timer = 0;
|
||||
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
@@ -153,261 +146,124 @@ const char code_to_name[60] = {
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
char name = ' ';
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||
if (keycode < 60) {
|
||||
name = code_to_name[keycode];
|
||||
}
|
||||
// update keylog
|
||||
snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
|
||||
record->event.key.row, record->event.key.col,
|
||||
keycode, name);
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
|
||||
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||
|
||||
// update keylogs
|
||||
if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
|
||||
keylogs_str_idx = 0;
|
||||
for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
|
||||
keylogs_str[i] = ' ';
|
||||
for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
}
|
||||
}
|
||||
|
||||
keylogs_str[keylogs_str_idx] = name;
|
||||
keylogs_str_idx++;
|
||||
if (keycode < 60) {
|
||||
keylog_str[0] = code_to_name[keycode];
|
||||
}
|
||||
log_timer = timer_read();
|
||||
}
|
||||
|
||||
const char *read_keylog(void) {
|
||||
return keylog_str;
|
||||
void update_log(void) {
|
||||
if (timer_elapsed(log_timer) > 750) {
|
||||
add_keylog(0);
|
||||
}
|
||||
}
|
||||
|
||||
const char *read_keylogs(void) {
|
||||
return keylogs_str;
|
||||
}
|
||||
|
||||
|
||||
const char* read_modifier_state(void) {
|
||||
uint8_t modifiers = get_mods();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
|
||||
snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%s %s %s %s",
|
||||
(modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) ? "CTL" : " ",
|
||||
(modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI) ? "GUI" : " ",
|
||||
(modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT) ? "ALT" : " ",
|
||||
(modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? "SFT" : " "
|
||||
);
|
||||
|
||||
return modifier_state_str;
|
||||
}
|
||||
|
||||
const char *read_host_led_state(void) {
|
||||
uint8_t leds = host_keyboard_leds();
|
||||
|
||||
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
|
||||
(leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
|
||||
(leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
|
||||
(leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "
|
||||
);
|
||||
|
||||
return host_led_state_str;
|
||||
}
|
||||
|
||||
const char* read_layer_state(void) {
|
||||
switch (biton32(layer_state)) {
|
||||
case _RAISE:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise ");
|
||||
break;
|
||||
case _LOWER:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower ");
|
||||
break;
|
||||
case _ADJUST:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust ");
|
||||
break;
|
||||
default:
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Qwerty ");
|
||||
break;
|
||||
case _COLEMAK:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
|
||||
break;
|
||||
case _DVORAK:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak ");
|
||||
break;
|
||||
case _WORKMAN:
|
||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Workman");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return layer_state_str;
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) {
|
||||
iota_gfx_task();
|
||||
}
|
||||
|
||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||
if (is_master) {
|
||||
//If you want to change the display of OLED, you need to change here
|
||||
matrix_write_ln(matrix, read_layer_state());
|
||||
matrix_write_ln(matrix, read_modifier_state());
|
||||
// matrix_write_ln(matrix, read_keylog());
|
||||
matrix_write_ln(matrix, read_keylogs());
|
||||
// matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
||||
// matrix_write(matrix, read_host_led_state());
|
||||
//matrix_write_ln(matrix, read_timelog());
|
||||
} else {
|
||||
matrix_write(matrix, read_logo());
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
matrix_clear(&matrix);
|
||||
matrix_render_user(&matrix);
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_SLASH:
|
||||
case KC_F1 ... KC_F12:
|
||||
case KC_INSERT ... KC_UP:
|
||||
case KC_KP_SLASH ... KC_KP_DOT:
|
||||
case KC_F13 ... KC_F24:
|
||||
if (record->event.pressed) { set_keylog(keycode, record); }
|
||||
break;
|
||||
// set_timelog();
|
||||
}
|
||||
return true;
|
||||
if (record->event.pressed) { add_keylog(keycode); }
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_master) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return rotation;
|
||||
}
|
||||
}
|
||||
|
||||
void render_crkbd_logo(void) {
|
||||
static const char PROGMEM crkbd_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||
0};
|
||||
oled_write_P(crkbd_logo, false);
|
||||
}
|
||||
|
||||
|
||||
void render_status(void) {
|
||||
|
||||
oled_write_P(PSTR("Layer"), false);
|
||||
switch (biton32(layer_state)) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("Base "), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("Adjst"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Unkn "), false);
|
||||
break;
|
||||
}
|
||||
oled_write_P(PSTR("Lyout"), false);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("QWRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("COLMK"), false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write_P(PSTR("DVRAK"), false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write_P(PSTR("WRKMN"), false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write_P(PSTR("NORMN"), false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write_P(PSTR("MLTRN"), false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write_P(PSTR("ECLYN"), false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write_P(PSTR("CRPLX"), false);
|
||||
break;
|
||||
}
|
||||
oled_write_P(PSTR("Layer"), false);
|
||||
switch (biton32(layer_state)) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("Base "), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("Adjst"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Unkn "), false);
|
||||
break;
|
||||
}
|
||||
oled_write_P(PSTR("Lyout"), false);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("QWRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("COLMK"), false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write_P(PSTR("DVRAK"), false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write_P(PSTR("WRKMN"), false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write_P(PSTR("NORMN"), false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write_P(PSTR("MLTRN"), false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write_P(PSTR("ECLYN"), false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write_P(PSTR("CRPLX"), false);
|
||||
break;
|
||||
}
|
||||
|
||||
uint8_t modifiers = get_mods();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
uint8_t modifiers = get_mods();
|
||||
uint8_t one_shot = get_oneshot_mods();
|
||||
|
||||
oled_write_P(PSTR("Mods:"), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false);
|
||||
oled_write_P(PSTR("Mods:"), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false);
|
||||
oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false);
|
||||
|
||||
|
||||
oled_write_P(PSTR("BTMGK"), false);
|
||||
static const char PROGMEM mode_logo[4][4] = {
|
||||
{0x95,0x96,0x0a,0},
|
||||
{0xb5,0xb6,0x0a,0},
|
||||
{0x97,0x98,0x0a,0},
|
||||
{0xb7,0xb8,0x0a,0} };
|
||||
oled_write_P(PSTR("BTMGK"), false);
|
||||
|
||||
if (keymap_config.swap_lalt_lgui != false) {
|
||||
oled_write_P(mode_logo[0], false);
|
||||
oled_write_P(mode_logo[1], false);
|
||||
} else {
|
||||
oled_write_P(mode_logo[2], false);
|
||||
oled_write_P(mode_logo[3], false);
|
||||
}
|
||||
if (keymap_config.swap_lalt_lgui) {
|
||||
oled_write_P(PSTR(" Mac "), false);
|
||||
} else {
|
||||
oled_write_P(PSTR(" Win "), false);
|
||||
}
|
||||
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
oled_write_P(PSTR("Lock:"), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
oled_write_P(PSTR("Lock:"), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false);
|
||||
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
||||
|
||||
oled_write(keylog_str, false);
|
||||
}
|
||||
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (is_master) {
|
||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_crkbd_logo();
|
||||
oled_scroll_left(); // Turns on scrolling
|
||||
}
|
||||
if (is_master) {
|
||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_crkbd_logo();
|
||||
oled_scroll_left(); // Turns on scrolling
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) { update_log(); }
|
||||
#endif
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case ALT_T(KC_A):
|
||||
return TAPPING_TERM + 100;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
switch (keycode) {
|
||||
case ALT_T(KC_A):
|
||||
return TAPPING_TERM + 100;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
|
@@ -14,9 +14,10 @@ MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
@@ -24,3 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
BOOTLOADER = qmk-dfu
|
||||
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
|
||||
ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
||||
RGB_MATRIX_SPLIT_RIGHT=yes
|
||||
endif
|
||||
|
@@ -11,11 +11,6 @@
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
//Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
@@ -241,6 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
void matrix_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
UPDATE_KEYMAP_STATUS();
|
||||
#endif
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
|
@@ -20,12 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#pragma once
|
||||
|
||||
// place overrides here
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
//#define USE_MATRIX_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
@@ -33,10 +28,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#define SSD1306OLED
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 300
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLED_NUM 27
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
39
keyboards/crkbd/keymaps/rs/keymap.c
Normal file
39
keyboards/crkbd/keymaps/rs/keymap.c
Normal file
@@ -0,0 +1,39 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "rs.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
LALT,LGUI,SPC , BSPC,CODE,FN
|
||||
// `----+----+----' `+---+----+----'c
|
||||
),
|
||||
[_CODE] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
, 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
, 6 , 7 , 8 , 9 , 0 , AMPR,LEFT,DOWN,RGHT, ,PIPE,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, ,DOT , , ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
[_FN] = LAYOUT_kc(
|
||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
|
||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||
LTOG,LHUI,LSAI,LVAI,LRST,BRMU, VOLU, ,PGUP, , , ,
|
||||
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||
LMOD,LHUD,LSAD,LVAD,RST ,BRMD, VOLD,CTRA,PGDN,CTRE, , ,
|
||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||
, , , MUTE, ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
};
|
||||
|
104
keyboards/crkbd/keymaps/rs/oled.c
Normal file
104
keyboards/crkbd/keymaps/rs/oled.c
Normal file
@@ -0,0 +1,104 @@
|
||||
#ifdef SSD1306OLED
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "ssd1306.h"
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#include "lufa.h"
|
||||
#include "split_util.h"
|
||||
#endif
|
||||
|
||||
extern uint8_t is_master;
|
||||
|
||||
// When add source files to SRC in rules.mk, you can use functions.
|
||||
const char *read_logo(void);
|
||||
const char *read_keylog(void);
|
||||
const char *read_keylogs(void);
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
void matrix_scan_user(void) { iota_gfx_task(); }
|
||||
|
||||
typedef struct {
|
||||
uint8_t state;
|
||||
char name[8];
|
||||
} LAYER_DISPLAY_NAME;
|
||||
|
||||
#define LAYER_DISPLAY_MAX 5
|
||||
const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
|
||||
{0, "Base"},
|
||||
{2, "Code"},
|
||||
{4, "Fn"},
|
||||
{6, "Fn+Code"},
|
||||
{__UINT8_MAX__, "?"},
|
||||
};
|
||||
static uint8_t layer_name_idx;
|
||||
static char layer_status_buf[24] = "Layer: Base\n";
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
void update_keymap_status(void) {
|
||||
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s RGB: %d\n",
|
||||
layer_display_name[layer_name_idx].name, rgblight_config.mode);
|
||||
}
|
||||
#else
|
||||
void update_keymap_status(void) {
|
||||
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s\n",
|
||||
layer_display_name[layer_name_idx].name);
|
||||
}
|
||||
#endif
|
||||
|
||||
void matrix_init_user(void) {
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
update_keymap_status();
|
||||
}
|
||||
|
||||
// declared in users/rs/rs.c
|
||||
void rgb_mod_changed_keymap(void) {
|
||||
update_keymap_status();
|
||||
}
|
||||
|
||||
// declared in users/rs/rs.c
|
||||
void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
set_keylog(keycode, record);
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
for (layer_name_idx = 0; layer_name_idx < LAYER_DISPLAY_MAX; ++layer_name_idx) {
|
||||
if (state == 0 && layer_display_name[layer_name_idx].state == default_layer_state) {
|
||||
break;
|
||||
} else if (state != 0 && layer_display_name[layer_name_idx].state == state) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
update_keymap_status();
|
||||
return state;
|
||||
}
|
||||
|
||||
static inline void render_keymap_status(struct CharacterMatrix *matrix) {
|
||||
matrix_write(matrix, layer_status_buf);
|
||||
}
|
||||
|
||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||
if (is_master) {
|
||||
render_keymap_status(matrix);
|
||||
matrix_write_ln(matrix, read_keylog());
|
||||
matrix_write_ln(matrix, read_keylogs());
|
||||
} else {
|
||||
matrix_write(matrix, read_logo());
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||
dest->dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void iota_gfx_task_user(void) {
|
||||
struct CharacterMatrix matrix;
|
||||
matrix_clear(&matrix);
|
||||
matrix_render_user(&matrix);
|
||||
matrix_update(&display, &matrix);
|
||||
}
|
||||
|
||||
#endif
|
19
keyboards/crkbd/keymaps/rs/readme.md
Normal file
19
keyboards/crkbd/keymaps/rs/readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# RS40: Code Friendly 40% Keymap
|
||||
|
||||
This keymap is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one.
|
||||
|
||||
Because I sometime have to use my internal keyboard I my macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc.
|
||||
|
||||
See [rs readme](../../../../users/rs/readme.md) for a list of other keyboards supported by this keymap.
|
||||
|
||||
## Base Layer
|
||||
|
||||
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=E&_x:8%3B&=I%3B&@_y:-0.87&x:2%3B&=W&_x:1%3B&=R&_x:6%3B&=U&_x:1%3B&=O%3B&@_y:-0.8799999999999999&x:5%3B&=T&_x:4%3B&=Y%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=Q&_x:12%3B&=P&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=D&_x:8%3B&=K%3B&@_y:-0.8700000000000001&x:2%3B&=S&_x:1%3B&=F&_x:6%3B&=J&_x:1%3B&=L%3B&@_y:-0.8799999999999999&x:5%3B&=G&_x:4%3B&=H%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465&a:5%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=A&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%22%0A'%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=C&_x:8&a:5%3B&=%3C%0A,%3B&@_y:-0.8700000000000001&x:2&a:7%3B&=X&_x:1%3B&=V&_x:6%3B&=M&_x:1&a:5%3B&=%3E%0A.%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=B&_x:4%3B&=N%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=Z&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=Space%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||
|
||||
## Code Layer
|
||||
|
||||
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=%23&_x:8%3B&=*%3B&@_y:-0.87&x:2%3B&=%2F@&_x:1%3B&=$&_x:6&a:5%3B&=%3C%0A(&_x:1%3B&=%3E%0A)%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=%25&_x:4%3B&=%5E%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=!&_x:12%3B&=!%2F=&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=3&_x:8%3B&=↑%3B&@_y:-0.8700000000000001&x:2%3B&=2&_x:1%3B&=4&_x:6&a:5%3B&=%7B%0A%5B&_x:1%3B&=%7D%0A%5D%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=5&_x:4&a:5%3B&=%2F_%0A-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=1&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%7C%0A%5C%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=8&_x:8%3B&=↓%3B&@_y:-0.8700000000000001&x:2%3B&=7&_x:1%3B&=9&_x:6%3B&=←&_x:1%3B&=→%3B&@_y:-0.8799999999999999&x:5%3B&=0&_x:4%3B&=%2F&%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=6&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=.%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||
|
||||
## Fn Layer
|
||||
|
||||
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=F3&_x:8%3B&=F8%3B&@_y:-0.87&x:2%3B&=F2&_x:1%3B&=F4&_x:6%3B&=F7&_x:1%3B&=F9%3B&@_y:-0.8799999999999999&x:5%3B&=F5&_x:4%3B&=F6%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=&_c=%236750f2&t=%2344b8b8%3B&=F1&_x:12%3B&=F10&_c=%233a1ee6&t=%23b84465%3B&=F11%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value+&_x:8%3B&=Page%20Up%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat+&_x:1%3B&=RGB%20Reset&_x:6%3B&=&_x:1%3B&=%3B&@_y:-0.8799999999999999&x:5%3B&=Bright+&_x:4%3B&=Vol+%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Toggle&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue+&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value-&_x:8%3B&=Page%20Down%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat-&_x:1%3B&=Reset&_x:6%3B&=Ctrl+A&_x:1%3B&=Ctrl+E%3B&@_y:-0.8799999999999999&x:5%3B&=Bright-&_x:4%3B&=Vol-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Mode&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue-&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Mute%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
32
keyboards/crkbd/keymaps/rs/rules.mk
Normal file
32
keyboards/crkbd/keymaps/rs/rules.mk
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
TAP_DANCE_ENABLE = no
|
||||
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
# If you want to change the display of OLED, you need to change here
|
||||
SRC += oled.c \
|
||||
./lib/glcdfont.c \
|
||||
./lib/rgb_state_reader.c \
|
||||
./lib/layer_state_reader.c \
|
||||
./lib/logo_reader.c \
|
||||
./lib/keylogger.c \
|
@@ -51,78 +51,65 @@ void led_set_kb(uint8_t usb_led) {
|
||||
// 05 06 06 05
|
||||
// 15 14 07 07 14 15 3
|
||||
|
||||
/* {row | col << 4} logical layout rows/cols
|
||||
* | {x=0..224, y=0..64} physical layout
|
||||
* | | | modifier
|
||||
* | | | */
|
||||
#define RGB_MATRIX_LEFT_LEDS \
|
||||
{ { 0xFF }, { 85, 16 }, 2 }, /* 1 */ \
|
||||
{ { 0xFF }, { 50, 13 }, 2 }, /* 2 */ \
|
||||
{ { 0xFF }, { 16, 20 }, 2 }, /* 3 */ \
|
||||
{ { 0xFF }, { 16, 38 }, 2 }, /* 4 */ \
|
||||
{ { 0xFF }, { 50, 48 }, 2 }, /* 5 */ \
|
||||
{ { 0xFF }, { 85, 52 }, 2 }, /* 6 */ \
|
||||
{ { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \
|
||||
{ { 2 | ( 5 << 4 ) }, { 85, 39 }, 4 }, /* 8 */ \
|
||||
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 4 }, /* 9 */ \
|
||||
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 4 }, /* 10 */ \
|
||||
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 4 }, /* 11 */ \
|
||||
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 4 }, /* 12 */ \
|
||||
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 4 }, /* 13 */ \
|
||||
{ { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \
|
||||
{ { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \
|
||||
{ { 2 | ( 3 << 4 ) }, { 50, 35 }, 4 }, /* 16 */ \
|
||||
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 4 }, /* 17 */ \
|
||||
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 4 }, /* 18 */ \
|
||||
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 4 }, /* 19 */ \
|
||||
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 4 }, /* 20 */ \
|
||||
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 4 }, /* 21 */ \
|
||||
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 4 }, /* 22 */ \
|
||||
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 4 }, /* 23 */ \
|
||||
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 4 }, /* 24 */ \
|
||||
{ { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \
|
||||
{ { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \
|
||||
{ { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */
|
||||
|
||||
#define RGB_MATRIX_RIGHT_LEDS \
|
||||
{ { 0xFF }, { 139, 16 }, 2 }, /* 1 */ \
|
||||
{ { 0xFF }, { 174, 13 }, 2 }, /* 2 */ \
|
||||
{ { 0xFF }, { 208, 20 }, 2 }, /* 3 */ \
|
||||
{ { 0xFF }, { 208, 38 }, 2 }, /* 4 */ \
|
||||
{ { 0xFF }, { 174, 48 }, 2 }, /* 5 */ \
|
||||
{ { 0xFF }, { 139, 52 }, 2 }, /* 6 */ \
|
||||
{ { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \
|
||||
{ { 6 | ( 5 << 4 ) }, { 139, 39 }, 4 }, /* 8 */ \
|
||||
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 4 }, /* 9 */ \
|
||||
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 4 }, /* 10 */ \
|
||||
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 4 }, /* 11 */ \
|
||||
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 4 }, /* 12 */ \
|
||||
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 4 }, /* 13 */ \
|
||||
{ { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \
|
||||
{ { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \
|
||||
{ { 6 | ( 3 << 4 ) }, { 174, 35 }, 4 }, /* 16 */ \
|
||||
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 4 }, /* 17 */ \
|
||||
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 4 }, /* 18 */ \
|
||||
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 4 }, /* 19 */ \
|
||||
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 4 }, /* 20 */ \
|
||||
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 4 }, /* 21 */ \
|
||||
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 4 }, /* 22 */ \
|
||||
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 4 }, /* 23 */ \
|
||||
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 4 }, /* 24 */ \
|
||||
{ { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \
|
||||
{ { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \
|
||||
{ { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */
|
||||
|
||||
#ifdef RGB_MATRIX_SPLIT_RIGHT
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
RGB_MATRIX_RIGHT_LEDS
|
||||
RGB_MATRIX_LEFT_LEDS
|
||||
};
|
||||
led_config_t g_led_config = { {
|
||||
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
||||
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
||||
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED },
|
||||
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
||||
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
||||
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED }
|
||||
}, {
|
||||
{ 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
|
||||
{ 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
|
||||
{ 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 },
|
||||
{ 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 },
|
||||
{ 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 },
|
||||
{ 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 },
|
||||
{ 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 },
|
||||
{ 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }
|
||||
}, {
|
||||
2, 2, 2, 2, 2, 2, 1,
|
||||
4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 2,
|
||||
2, 2, 2, 2, 2, 1, 4,
|
||||
4, 4, 4, 4, 4, 1, 1,
|
||||
4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 1, 1, 1
|
||||
} };
|
||||
#else
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
RGB_MATRIX_LEFT_LEDS
|
||||
RGB_MATRIX_RIGHT_LEDS
|
||||
};
|
||||
led_config_t g_led_config = { {
|
||||
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
||||
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
||||
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED },
|
||||
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
||||
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
||||
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
||||
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED }
|
||||
}, {
|
||||
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
|
||||
{ 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
|
||||
{ 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 },
|
||||
{ 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 },
|
||||
{ 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 },
|
||||
{ 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 },
|
||||
{ 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 },
|
||||
{ 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }
|
||||
}, {
|
||||
2, 2, 2, 2, 2, 2, 1,
|
||||
4, 4, 4, 4, 4, 4, 1,
|
||||
1, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 2,
|
||||
2, 2, 2, 2, 2, 1, 4,
|
||||
4, 4, 4, 4, 4, 1, 1,
|
||||
4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 1, 1, 1
|
||||
} };
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,5 +1,12 @@
|
||||
# Default Doro67 ANSI layout.
|
||||
|
||||
**THIS IS THE DEFAULT ANSI KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
|
||||
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
|
||||
|
||||
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||
If you purchased an RGB PCB, please see the 'rgb' directory.
|
||||
|
||||
This is the default ANSI layout that comes flashed on the Doro67 multi PCB with
|
||||
the exception of adding backtick as it was not mapped.
|
||||
|
||||
|
@@ -1,5 +1,12 @@
|
||||
# Default Doro67 ISO layout.
|
||||
|
||||
**THIS IS THE DEFAULT ISO KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
|
||||
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
|
||||
|
||||
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||
If you purchased an RGB PCB, please see the 'rgb' directory.
|
||||
|
||||
This is the default ISO layout that comes flashed on the Doro67 multi PCB with
|
||||
the exception of adding backtick and UK ISO specific keycodes as they were not mapped.
|
||||
|
||||
|
@@ -1,5 +1,12 @@
|
||||
# Default Doro67 Multi layout.
|
||||
|
||||
**THIS IS THE DEFAULT MULTI-LAYOUT (SPLIT BACKSPACE) KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
|
||||
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
|
||||
|
||||
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||
If you purchased an RGB PCB, please see the 'rgb' directory.
|
||||
|
||||
This is the default Multi layout that comes flashed on the Doro67 multi PCB with
|
||||
the exception of adding backtick as it was not mapped.
|
||||
|
||||
|
@@ -2,6 +2,13 @@
|
||||
|
||||
65% custom keyboard made by 80ultraman/Alf/Backprop Studios with multiple layout support. Despite the layout options available, layout is dictated by the selected integrated plate.
|
||||
|
||||
**MULTI-LAYOUT PCB (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||
The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker).
|
||||
The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose.
|
||||
|
||||
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||
If you purchased an RGB PCB, please see the 'rgb' directory.
|
||||
|
||||
Keyboard Maintainer: [ShadeDream](https://github.com/shadedream)
|
||||
Hardware Supported: Doro67 Multi PCB
|
||||
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)
|
||||
|
@@ -1 +1,5 @@
|
||||
# The default keymap for doro67
|
||||
|
||||
**THIS IS THE DEFAULT KEYMAP DIRECTORY (AVAILABILITY: CHINA GB ONLY)**
|
||||
If you are a non-china buyer, you probably have the multi PCB or rgb PCB.
|
||||
Please look at the "multi" and "rgb" readme files.
|
@@ -4,6 +4,10 @@
|
||||
|
||||
This is not the PCB with RGB support. Do not flash RGB firmware for this board.
|
||||
|
||||
**REGULAR PCB (AVAILABILITY: CHINA GB ONLY)*
|
||||
If you are a non-china buyer, you probably have the multi PCB or rgb PCB.
|
||||
Please look at the "multi" and "rgb" readme files.
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
Hardware Supported: Doro67 Regular PCB
|
||||
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)
|
||||
|
@@ -1 +1,7 @@
|
||||
# The default keymap for rgb
|
||||
|
||||
**RGB PCB (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||
The "rgb" directory includes the keymap for the RGB PCB.
|
||||
|
||||
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||
If you purchased a non-rgb PCB, please see the 'multi' directory.
|
@@ -4,6 +4,12 @@
|
||||
|
||||
Flashing the regular PCB firmware on this board will work, but will disable RGB lighting.
|
||||
|
||||
**THIS IS THE RGB PCB DIRECTORY (AVAILABILITY: CHINA + INTERNATIONAL GB)**
|
||||
The "rgb" directory includes the keymap for the RGB PCB.
|
||||
|
||||
The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers.
|
||||
If you purchased a non-rgb PCB, please see the 'multi' directory.
|
||||
|
||||
Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
|
||||
Hardware Supported: Doro 67 RGB PCB
|
||||
Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0)
|
||||
|
@@ -14,6 +14,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "rgb.h"
|
||||
#include "rgb_matrix_types.h"
|
||||
|
||||
// Optional override functions below.
|
||||
// You can leave any or all of these undefined.
|
||||
@@ -52,76 +53,32 @@ void led_set_kb(uint8_t usb_led) {
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
{{0|(0<<4)}, {15*0, 0}, 4}, // Esc
|
||||
{{0|(1<<4)}, {15*1, 0}, 4}, // 1
|
||||
{{0|(2<<4)}, {15*2, 0}, 4}, // 2
|
||||
{{0|(3<<4)}, {15*3, 0}, 4}, // 3
|
||||
{{0|(4<<4)}, {15*4, 0}, 4}, // 4
|
||||
{{0|(5<<4)}, {15*5, 0}, 4}, // 5
|
||||
{{0|(6<<4)}, {15*6, 0}, 4}, // 6
|
||||
{{0|(7<<4)}, {15*7, 0}, 4}, // 7
|
||||
{{0|(8<<4)}, {15*8, 0}, 4}, // 8
|
||||
{{0|(9<<4)}, {15*9, 0}, 4}, // 9
|
||||
{{0|(10<<4)}, {15*10, 0}, 4}, // 0
|
||||
{{0|(11<<4)}, {15*11, 0}, 4}, // -
|
||||
{{0|(12<<4)}, {15*12, 0}, 4}, // =
|
||||
{{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace
|
||||
{{0|(14<<4)}, {15*15, 0}, 1}, // Ins
|
||||
|
||||
{{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab
|
||||
{{1|(1<<4)}, {15*1.5, 16}, 4}, // Q
|
||||
{{1|(2<<4)}, {15*2.5, 16}, 4}, // W
|
||||
{{1|(3<<4)}, {15*3.5, 16}, 4}, // E
|
||||
{{1|(4<<4)}, {15*4.5, 16}, 4}, // R
|
||||
{{1|(5<<4)}, {15*5.5, 16}, 4}, // T
|
||||
{{1|(6<<4)}, {15*6.5, 16}, 4}, // Y
|
||||
{{1|(7<<4)}, {15*7.5, 16}, 4}, // U
|
||||
{{1|(8<<4)}, {15*8.5, 16}, 4}, // I
|
||||
{{1|(9<<4)}, {15*9.5, 16}, 4}, // O
|
||||
{{1|(10<<4)}, {15*10.5, 16}, 4}, // P
|
||||
{{1|(11<<4)}, {15*11.5, 16}, 4}, // [
|
||||
{{1|(12<<4)}, {15*12.5, 16}, 4}, // ]
|
||||
{{1|(13<<4)}, {15*13.75, 16}, 1}, //
|
||||
{{1|(14<<4)}, {15*15, 16}, 1}, // Del
|
||||
|
||||
{{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock
|
||||
{{2|(1<<4)}, {15*1.75, 32}, 4}, // A
|
||||
{{2|(2<<4)}, {15*2.75, 32}, 4}, // S
|
||||
{{2|(3<<4)}, {15*3.75, 32}, 4}, // D
|
||||
{{2|(4<<4)}, {15*4.75, 32}, 4}, // F
|
||||
{{2|(5<<4)}, {15*5.75, 32}, 4}, // G
|
||||
{{2|(6<<4)}, {15*6.75, 32}, 4}, // H
|
||||
{{2|(7<<4)}, {15*7.75, 32}, 4}, // J
|
||||
{{2|(8<<4)}, {15*8.75, 32}, 4}, // K
|
||||
{{2|(9<<4)}, {15*9.75, 32}, 4}, // L
|
||||
{{2|(10<<4)}, {15*10.75, 32}, 4}, // ;
|
||||
{{2|(11<<4)}, {15*11.75, 32}, 4}, // '
|
||||
{{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter
|
||||
{{2|(14<<4)}, {15*15, 32}, 1}, // Pgup
|
||||
|
||||
{{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift
|
||||
{{3|(2<<4)}, {15*2, 48}, 4}, // Z
|
||||
{{3|(3<<4)}, {15*3, 48}, 4}, // X
|
||||
{{3|(4<<4)}, {15*4, 48}, 4}, // C
|
||||
{{3|(5<<4)}, {15*5, 48}, 4}, // V
|
||||
{{3|(6<<4)}, {15*6, 48}, 4}, // B
|
||||
{{3|(7<<4)}, {15*7, 48}, 4}, // N
|
||||
{{3|(8<<4)}, {15*8, 48}, 4}, // M
|
||||
{{3|(9<<4)}, {15*9, 48}, 4}, // ,
|
||||
{{3|(10<<4)}, {15*10, 48}, 4}, // .
|
||||
{{3|(11<<4)}, {15*11, 48}, 4}, // /
|
||||
{{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift
|
||||
{{3|(13<<4)}, {15*14, 48}, 1}, // Up
|
||||
{{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn
|
||||
|
||||
{{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl
|
||||
{{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI
|
||||
{{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt
|
||||
{{4|(3<<4)}, {15*6.75, 64}, 4}, // Space
|
||||
{{4|(9<<4)}, {15*9, 64}, 1}, // RAlt
|
||||
{{4|(10<<4)}, {15*10.25, 64}, 1}, // FN
|
||||
{{4|(12<<4)}, {15*13, 64}, 1}, // Left
|
||||
{{4|(13<<4)}, {15*14, 64}, 1}, // Down
|
||||
{{4|(14<<4)}, {15*15, 64}, 1}, // Right
|
||||
};
|
||||
led_config_t g_led_config = { {
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
|
||||
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
|
||||
{ 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
|
||||
{ 58, 59, 60, 61, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66 }
|
||||
}, {
|
||||
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
|
||||
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, { 225, 0 },
|
||||
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
|
||||
{ 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, { 225, 16 },
|
||||
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
|
||||
{ 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 225, 32 },
|
||||
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
|
||||
{ 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, { 225, 48 },
|
||||
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||
{ 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }
|
||||
}, {
|
||||
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
|
||||
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||
1, 1, 1, 4, 1, 1, 1, 1, 1
|
||||
} };
|
||||
|
@@ -386,4 +386,31 @@
|
||||
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, KC_NO, k4d, k4e } \
|
||||
}
|
||||
|
||||
/* LAYOUT_60_iso_split_space_bs_rshift
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐
|
||||
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
|
||||
* │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │
|
||||
* │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤
|
||||
* │30 |31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤
|
||||
* │40 │41 │43 │44 │46 │48 │4a │4b │4d │4e │
|
||||
* └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
#define LAYOUT_60_iso_split_space_bs_rshift( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
|
||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
||||
k40, k41, k43, k44, k46, k48, k4a, k4b, k4c, k4d, k4e \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \
|
||||
{ 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, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -60,6 +60,10 @@
|
||||
"LAYOUT_60_tsangan_hhkb": {
|
||||
"key_count": 62,
|
||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "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":"Backspace", "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":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
|
||||
},
|
||||
"LAYOUT_60_iso_split_space_bs_rshift": {
|
||||
"key_count": 66,
|
||||
"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":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"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":"CapsLock", "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":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "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}, {"label":"Print screen", "x":14, "y":3, "w":1}, {"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}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "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}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R |
|
||||
* | Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
@@ -21,16 +21,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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,
|
||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
|
||||
/* FN Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ |
|
||||
* | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | Mute | Prev | Next |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | Prev | Next | Play/Pause |
|
||||
* | | | | | | | | | | | Vol- | Vol+ | Play/Pause |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
@@ -40,8 +40,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT_directional(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MRWD, KC_MFFD,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, KC_MRWD, KC_MFFD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC__VOLDOWN, KC__VOLUP,
|
||||
KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END
|
||||
),
|
||||
|
@@ -10,9 +10,7 @@ Settings:
|
||||
* Del is available as `Fn` + `Backspace`
|
||||
* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down
|
||||
* RESET is available as `Fn`+ ` ESC`
|
||||
* Underglow toggle and mode selection are available as `Fn` + `Q` and `Fn` + `S`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
|
||||
* Media play/pause doesn't seem to work with anything but iTunes at the moment. FML
|
||||
|
||||
* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus!
|
||||
|
||||
### Initial Installation
|
||||
|
||||
@@ -51,7 +49,7 @@ Hope this helps!
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Ctrl | Alt | Cmd | Space | Cmd | Fn | L | D | R |
|
||||
| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
@@ -61,9 +59,9 @@ FN Layer
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Vol- | Vol+ |
|
||||
| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| | | MUTE | Prev | Next |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | | Prev | Next | Play/Pause |
|
||||
| | | | | | | | | | | Vol- | Vol+ | Play/Pause |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET|
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
|
9
keyboards/dz60/keymaps/macos_64/config.h
Normal file
9
keyboards/dz60/keymaps/macos_64/config.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef CONFIG_KEYMAP_H
|
||||
#define CONFIG_KEYMAP_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// Fix KC_GESC conflict with Cmd+Alt+Esc on macos
|
||||
#define GRAVE_ESC_GUI_OVERRIDE
|
||||
|
||||
#endif
|
42
keyboards/dz60/keymaps/macos_64/keymap.c
Normal file
42
keyboards/dz60/keymaps/macos_64/keymap.c
Normal file
@@ -0,0 +1,42 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / |Shift| Up |Delete|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Cmd | Space | Fn | Alt | Left| Down|Right|
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
LAYOUT_all(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, 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_UP, KC_DELETE,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, MO(1), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | ` ~ | BR- | BR+ | | | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Delete |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | Up | | | | | 0 | 1 | 2 | 3 | | RESET |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | Left| Down|Right| | | | | 4 | 5 | 6 | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | 7 | 8 | 9 | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
LAYOUT_all(
|
||||
KC_GRV , KC_SCROLLLOCK, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, KC_DEL,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_TRNS, RESET,
|
||||
KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, 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),
|
||||
};
|
45
keyboards/dz60/keymaps/macos_64/readme.md
Normal file
45
keyboards/dz60/keymaps/macos_64/readme.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# MacOS 64 keymap
|
||||
|
||||
This is a keymap of DZ60 configured with 64 keys for MacOS. It refers the keymap of [macos_arrow](../macos_arrow/readme.md).
|
||||
|
||||
## How to use
|
||||
|
||||
1. Follow the [introduction](https://docs.qmk.fm/#/) to compile the keymap
|
||||
2. Download QMK Toolbox from [here](https://github.com/qmk/qmk_toolbox/releases)
|
||||
3. Insert the dz60 keyboard while pressing ```Space+b``` (default)
|
||||
4. Flash the firmware
|
||||
|
||||
More details about flashing firmware please check the [documentation](https://docs.qmk.fm/#/) of QMK.
|
||||
|
||||
## Base Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / |Shift| Up |Delete|
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| Ctrl | Alt | Cmd | Space | Fn | Alt | Left| Down|Right|
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
## Fn Layer
|
||||
|
||||
```
|
||||
,-----------------------------------------------------------------------------------------.
|
||||
| ` ~ | BR- | BR+ | | | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Delete |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | Up | | | | | 0 | 1 | 2 | 3 | | RESET |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | Left| Down|Right| | | | | 4 | 5 | 6 | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | | 7 | 8 | 9 | | |
|
||||
|-----------------------------------------------------------------------------------------+
|
||||
| | | | | | | | | |
|
||||
`-----------------------------------------------------------------------------------------'
|
||||
|
||||
```
|
@@ -1,2 +1,2 @@
|
||||
BACKLIGHT_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right|
|
||||
* | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right|
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_all(
|
||||
@@ -30,25 +30,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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,
|
||||
LT(_FL, KC_ESC), 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_A, KC_UP, KC_RSFT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, LT(_NL, KC_SPC), KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | |PgUp | | | | | | |
|
||||
* | | | | PgUp| | | | | Up | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | Left| Down| Up |Right| | | |
|
||||
* | | |Home |PgDwn| End | | | Left| Down|Right| | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | |PgDwn| | | | | | |
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL] = LAYOUT_all(
|
||||
_______, 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_NO, KC_DEL,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, KC_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
@@ -64,30 +64,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ML] = LAYOUT_all(
|
||||
KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
|
||||
KC_MEDIA_EJECT, BR_DOWN, BR_UP, BL_TOGG, RGB_TOG, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
/* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | % | ( | ) | < | > | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | * | 0 | 1 | 2 | 3 | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | . | - | 4 | 5 | 6 | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | , | = | 7 | 8 | 9 | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NL] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______,
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_COMMA, KC_EQL, KC_7, KC_8, KC_9, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_INC, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE, BL_DEC, RGB_MODE_FORWARD),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
@@ -1,2 +1,2 @@
|
||||
BACKLIGHT_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
38
keyboards/dz60/keymaps/olligranlund_iso/keymap.c
Normal file
38
keyboards/dz60/keymaps/olligranlund_iso/keymap.c
Normal file
@@ -0,0 +1,38 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/* ISO 60 layout by olligranlund
|
||||
*
|
||||
* This layout starts from a standard ISO 60% layout, and adds one function layer.
|
||||
* If you wish to only have one wide spacebar, you can easily do that by dismissing the "side" spacebar switches.
|
||||
*
|
||||
* Default Layer
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 ! | 2 " | 3 § | 4 $ | 5 % | 6 & | 7 / | 8 ( | 9 ) | 0 = | ß ? | ´ ` | Del | BSPC|
|
||||
* |-----------------------------------------------------------------------------------------|
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Ä | + * | Enter |
|
||||
* |---------------------------------------------------------------------------------- |
|
||||
* | FN | A | S | D | F | G | H | J | K | L | Ö | Ü | # ' | |
|
||||
* |-----------------------------------------------------------------------------------------|
|
||||
* | Shift | < > | Z | X | C | V | B | N | M | , ; | . : | - _ | Shift |Shift|
|
||||
* |-----------------------------------------------------------------------------------------|
|
||||
* | LCtl | LGUI | LAlt | Space | Space | Space | RAlt | FN | App | RCtl |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT_60_iso_split_space_bs_rshift(
|
||||
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_DEL, 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,
|
||||
MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_PSCR,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
|
||||
|
||||
LAYOUT_60_iso_split_space_bs_rshift(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
|
||||
KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGDOWN,KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_CAPS,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL),
|
||||
|
||||
};
|
6
keyboards/dz60/keymaps/olligranlund_iso/readme.md
Normal file
6
keyboards/dz60/keymaps/olligranlund_iso/readme.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# DZ60 with splitted parts
|
||||
### by Oliver Granlund
|
||||
|
||||

|
||||
|
||||
This is still under progress, but currently works on Windows as a daily driver.
|
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
# List of all the board related files.
|
||||
BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c
|
||||
|
||||
# Required include directories
|
||||
BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC
|
@@ -21,7 +21,7 @@
|
||||
|
||||
#define DEBOUNCE 3
|
||||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
#define RGB_MATRIX_KEYPRESSES
|
||||
#define DISABLE_RGB_MATRIX_SPLASH
|
||||
#define DISABLE_RGB_MATRIX_MULTISPLASH
|
||||
|
@@ -52,7 +52,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
{0, E_3, D_3, F_3},
|
||||
{0, E_2, D_2, F_2},
|
||||
{0, E_1, D_1, F_1},
|
||||
|
||||
|
||||
{0, E_13, D_13, F_13},
|
||||
{0, E_14, D_14, F_14},
|
||||
|
||||
@@ -71,70 +71,25 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
};
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
led_config_t g_led_config = { {
|
||||
{ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||
{ 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
|
||||
{ 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 }
|
||||
}, {
|
||||
{ 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
|
||||
{ 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
|
||||
{ 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
|
||||
{ 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 },
|
||||
{ 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1
|
||||
} };
|
||||
|
||||
{{0|(11<<4)}, {20.36*11, 0}, 1},
|
||||
{{0|(10<<4)}, {20.36*10, 0}, 1},
|
||||
{{0|(9<<4)}, {20.36*9, 0}, 1},
|
||||
{{0|(8<<4)}, {20.36*8, 0}, 1},
|
||||
{{0|(7<<4)}, {20.36*7, 0}, 1},
|
||||
{{0|(6<<4)}, { 20.36*6, 0}, 1},
|
||||
{{0|(5<<4)}, { 20.36*5, 0}, 1},
|
||||
{{0|(4<<4)}, { 20.36*4, 0}, 1},
|
||||
{{0|(3<<4)}, { 20.36*3, 0}, 1},
|
||||
{{0|(2<<4)}, { 20.36*2, 0}, 1},
|
||||
{{0|(1<<4)}, { 20.36*1, 0}, 1},
|
||||
{{0|(0<<4)}, { 20.36*0, 0}, 1},
|
||||
|
||||
{{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
|
||||
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
|
||||
|
||||
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
|
||||
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
|
||||
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
|
||||
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
|
||||
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
|
||||
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
|
||||
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
|
||||
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
|
||||
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
|
||||
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
|
||||
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
|
||||
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
|
||||
|
||||
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
|
||||
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
|
||||
|
||||
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
|
||||
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
|
||||
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
|
||||
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
|
||||
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
|
||||
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
|
||||
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
|
||||
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
|
||||
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
|
||||
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
|
||||
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
|
||||
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
|
||||
|
||||
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
|
||||
{{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
|
||||
|
||||
{{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
|
||||
{{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
|
||||
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
|
||||
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
|
||||
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
|
||||
{{3|(6<<4)}, { 20.36*6, 21.33*3}, 1},
|
||||
{{3|(5<<4)}, { 20.36*5, 21.33*3}, 1},
|
||||
{{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
|
||||
{{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
|
||||
{{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
|
||||
{{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
|
||||
{{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
|
||||
|
||||
};
|
||||
#else
|
||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
@@ -205,93 +160,44 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||
|
||||
};
|
||||
|
||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
||||
led_config_t g_led_config = { {
|
||||
{ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||
{ 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||
{ 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
|
||||
{ 52, 51, 50, 49, 48, NO_LED, 47, 46, 45, 44, 43, 42 }
|
||||
}, {
|
||||
{ 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
|
||||
{ 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
|
||||
{ 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
|
||||
{ 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 111, 63 },
|
||||
{ 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
|
||||
}, {
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1
|
||||
} };
|
||||
|
||||
{{0|(11<<4)}, {20.36*11, 0}, 1},
|
||||
{{0|(10<<4)}, {20.36*10, 0}, 1},
|
||||
{{0|(9<<4)}, {20.36*9, 0}, 1},
|
||||
{{0|(8<<4)}, {20.36*8, 0}, 1},
|
||||
{{0|(7<<4)}, {20.36*7, 0}, 1},
|
||||
{{0|(6<<4)}, { 20.36*6, 0}, 1},
|
||||
{{0|(5<<4)}, { 20.36*5, 0}, 1},
|
||||
{{0|(4<<4)}, { 20.36*4, 0}, 1},
|
||||
{{0|(3<<4)}, { 20.36*3, 0}, 1},
|
||||
{{0|(2<<4)}, { 20.36*2, 0}, 1},
|
||||
{{0|(1<<4)}, { 20.36*1, 0}, 1},
|
||||
{{0|(0<<4)}, { 20.36*0, 0}, 1},
|
||||
|
||||
{{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
|
||||
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
|
||||
|
||||
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
|
||||
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
|
||||
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
|
||||
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
|
||||
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
|
||||
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
|
||||
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
|
||||
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
|
||||
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
|
||||
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
|
||||
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
|
||||
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
|
||||
|
||||
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
|
||||
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
|
||||
|
||||
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
|
||||
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
|
||||
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
|
||||
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
|
||||
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
|
||||
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
|
||||
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
|
||||
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
|
||||
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
|
||||
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
|
||||
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
|
||||
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
|
||||
|
||||
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
|
||||
{{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
|
||||
|
||||
{{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
|
||||
{{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
|
||||
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
|
||||
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
|
||||
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
|
||||
{{3|(6<<4)}, { 20.36*5.5, 21.33*3}, 1},
|
||||
{{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
|
||||
{{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
|
||||
{{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
|
||||
{{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
|
||||
{{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
|
||||
void suspend_power_down_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void)
|
||||
{
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
|
@@ -31,11 +31,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
extern led_config_t g_led_config;
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -53,12 +53,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
|
||||
extern led_config_t g_led_config;
|
||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
led = g_rgb_leds[i];
|
||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
||||
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||
rgb_matrix_set_color( i, red, green, blue );
|
||||
}
|
||||
}
|
||||
|
@@ -1,49 +1,6 @@
|
||||
# project specific files
|
||||
|
||||
## chip/board settings
|
||||
# the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
MCU_FAMILY = STM32
|
||||
MCU_SERIES = STM32F3xx
|
||||
|
||||
# Linker script to use
|
||||
# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
MCU_LDSCRIPT = STM32F303xC
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
|
||||
MCU_STARTUP = stm32f3xx
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
BOARD = GENERIC_STM32_F303XC
|
||||
|
||||
# Cortex version
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
ARMV = 7
|
||||
|
||||
USE_FPU = yes
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
|
||||
OPT_DEFS =
|
||||
|
||||
# Do not put the microcontroller into power saving mode
|
||||
# when we get USB suspend event. We want it to keep updating
|
||||
# backlight effects.
|
||||
OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
|
||||
|
||||
# Options to pass to dfu-util when flashing
|
||||
MCU = STM32F303
|
||||
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
DFU_SUFFIX_ARGS = -p DF11 -v 0483
|
||||
BACKLIGHT_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
|
@@ -32,5 +32,11 @@
|
||||
#define DRIVER_ADDR_1 0b1010000
|
||||
#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons.
|
||||
#define DRIVER_COUNT 2
|
||||
#if defined (dzrgb60_ansi) || defined (dzrgb60_iso)
|
||||
#define DRIVER_1_LED_TOTAL 61
|
||||
#elif defined (dzrgb60_hhkb) || defined (dzrgb60_hhkb_iso)
|
||||
#define DRIVER_1_LED_TOTAL 62
|
||||
#else
|
||||
#define DRIVER_1_LED_TOTAL 63
|
||||
#endif
|
||||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user