Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44ff14f290 | ||
|
|
741c7d5eec | ||
|
|
f3c30e80cc | ||
|
|
d846660e00 | ||
|
|
774384ce31 | ||
|
|
361ac2f32a | ||
|
|
d15a60d2d3 | ||
|
|
73992c68d5 | ||
|
|
8ca4ed9a98 | ||
|
|
640d12d070 | ||
|
|
3beda5c16e | ||
|
|
fb7fc54923 | ||
|
|
179c868059 | ||
|
|
7b11dcce10 | ||
|
|
e2fa05c6d2 | ||
|
|
4c4009c0fd | ||
|
|
e7860d673b | ||
|
|
2fe7e221ec | ||
|
|
e0f548085c | ||
|
|
94fc32f431 | ||
|
|
1f7bbf279c | ||
|
|
803610a284 | ||
|
|
cd0edbb1fb | ||
|
|
6919772fb9 | ||
|
|
fedd8e81d1 |
No files matched your search
@@ -191,7 +191,9 @@ If you define these options you will enable the associated feature, which may in
|
|||||||
* `#define RGBLIGHT_ANIMATIONS`
|
* `#define RGBLIGHT_ANIMATIONS`
|
||||||
* run RGB animations
|
* run RGB animations
|
||||||
* `#define RGBLIGHT_LAYERS`
|
* `#define RGBLIGHT_LAYERS`
|
||||||
* Lets you define [lighting layers](feature_rgblight.md) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
* Lets you define [lighting layers](feature_rgblight.md?id=lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||||
|
* `#define RGBLIGHT_LAYER_BLINK`
|
||||||
|
* Adds ability to [blink](feature_rgblight.md?id=lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||||
* `#define RGBLED_NUM 12`
|
* `#define RGBLED_NUM 12`
|
||||||
* number of LEDs
|
* number of LEDs
|
||||||
* `#define RGBLIGHT_SPLIT`
|
* `#define RGBLIGHT_SPLIT`
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# HD44780 LCD Displays
|
# HD44780 LCD Displays
|
||||||
|
|
||||||
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||||
|
|
||||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes.
|
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes.
|
||||||
|
|
||||||
@@ -50,8 +50,8 @@ LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
|||||||
````
|
````
|
||||||
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
||||||
It is advised to clear the display before use.
|
It is advised to clear the display before use.
|
||||||
To do so call `lcd_clrsrc()`.
|
To do so call `lcd_clrscr()`.
|
||||||
|
|
||||||
To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`.
|
To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`.
|
||||||
|
|
||||||
There are more methods available to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
There are more methods available to control the display. [For in depth documentation please visit the linked page.](http://www.peterfleury.epizy.com/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||||
@@ -94,6 +94,7 @@ if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a n
|
|||||||
|`RGBLIGHT_MODE_STATIC_GRADIENT`| 0,1,..,9 |Static gradient |
|
|`RGBLIGHT_MODE_STATIC_GRADIENT`| 0,1,..,9 |Static gradient |
|
||||||
|`RGBLIGHT_MODE_RGB_TEST` | *None* |RGB Test |
|
|`RGBLIGHT_MODE_RGB_TEST` | *None* |RGB Test |
|
||||||
|`RGBLIGHT_MODE_ALTERNATING` | *None* |Alternating |
|
|`RGBLIGHT_MODE_ALTERNATING` | *None* |Alternating |
|
||||||
|
|`RGBLIGHT_MODE_TWINKLE` | 0,1,2,3,4,5 |Twinkle |
|
||||||
|
|
||||||
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
|
Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration.
|
||||||
|
|
||||||
@@ -103,8 +104,8 @@ Note: For versions older than 0.6.117, The mode numbers were written directly. I
|
|||||||
|
|
||||||
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|
Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
|
||||||
|
|
||||||
|Define |Default |Description |
|
|Define |Default |Description |
|
||||||
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
|
|------------------------------------|-------------|-------------------------------------------------------------------------|
|
||||||
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|
|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
|
||||||
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|
|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
|
||||||
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|
|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
|
||||||
@@ -115,6 +116,7 @@ Use these defines to add or remove animations from the firmware. When you are ru
|
|||||||
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|
|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
|
||||||
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|
|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
|
||||||
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
|
|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
|
||||||
|
|`RGBLIGHT_EFFECT_TWINKLE` |*Not defined*|Enable twinkle animation mode. |
|
||||||
|
|
||||||
### Effect and Animation Settings
|
### Effect and Animation Settings
|
||||||
|
|
||||||
@@ -131,6 +133,8 @@ The following options are used to tweak the various animations:
|
|||||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||||
|
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`75` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||||
|
|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
|
||||||
|
|
||||||
### Example Usage to Reduce Memory Footprint
|
### Example Usage to Reduce Memory Footprint
|
||||||
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
|
1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
|
||||||
@@ -168,6 +172,9 @@ const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
|
|||||||
// How long (in milliseconds) to wait between animation steps for each of the "Knight" animations
|
// How long (in milliseconds) to wait between animation steps for each of the "Knight" animations
|
||||||
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
|
||||||
|
|
||||||
|
// How long (in milliseconds) to wait between animation steps for each of the "Twinkle" animations
|
||||||
|
const uint8_t RGBLED_TWINKLE_INTERVALS[] PROGMEM = {50, 25, 10};
|
||||||
|
|
||||||
// These control which hues are selected for each of the "Static gradient" modes
|
// These control which hues are selected for each of the "Static gradient" modes
|
||||||
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
||||||
```
|
```
|
||||||
@@ -177,6 +184,8 @@ const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
|
|||||||
By including `#define RGBLIGHT_LAYERS` in your `config.h` file you can enable lighting layers. These make
|
By including `#define RGBLIGHT_LAYERS` in your `config.h` file you can enable lighting layers. These make
|
||||||
it easy to use your underglow LEDs as status indicators to show which keyboard layer is currently active, or the state of caps lock, all without disrupting any animations. [Here's a video](https://youtu.be/uLGE1epbmdY) showing an example of what you can do.
|
it easy to use your underglow LEDs as status indicators to show which keyboard layer is currently active, or the state of caps lock, all without disrupting any animations. [Here's a video](https://youtu.be/uLGE1epbmdY) showing an example of what you can do.
|
||||||
|
|
||||||
|
### Defining Lighting Layers :id=defining-lighting-layers
|
||||||
|
|
||||||
To define a layer, we modify `keymap.c` to list out LED ranges and the colors we want to overlay on them using an array of `rgblight_segment_t` using the `RGBLIGHT_LAYER_SEGMENTS` macro. We can define multiple layers and enable/disable them independently:
|
To define a layer, we modify `keymap.c` to list out LED ranges and the colors we want to overlay on them using an array of `rgblight_segment_t` using the `RGBLIGHT_LAYER_SEGMENTS` macro. We can define multiple layers and enable/disable them independently:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
@@ -211,8 +220,12 @@ void keyboard_post_init_user(void) {
|
|||||||
rgblight_layers = my_rgb_layers;
|
rgblight_layers = my_rgb_layers;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Note: For split keyboards with two controllers, both sides need to be flashed when updating the contents of rgblight_layers.
|
||||||
|
|
||||||
Finally, we enable and disable the lighting layers whenever the state of the keyboard changes:
|
### Enabling and disabling lighting layers :id=enabling-lighting-layers
|
||||||
|
|
||||||
|
Everything above just configured the definition of each lighting layer.
|
||||||
|
We can now enable and disable the lighting layers whenever the state of the keyboard changes:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
@@ -228,7 +241,40 @@ bool led_update_user(led_t led_state) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: For split keyboards with two controllers, both sides need to be flashed when updating the contents of rgblight_layers.
|
### Lighting layer blink :id=lighting-layer-blink
|
||||||
|
|
||||||
|
By including `#define RGBLIGHT_LAYER_BLINK` in your `config.h` file you can turn a lighting
|
||||||
|
layer on for a specified duration. Once the specified number of milliseconds has elapsed
|
||||||
|
the layer will be turned off. This is useful, e.g., if you want to acknowledge some
|
||||||
|
action (e.g. toggling some setting):
|
||||||
|
|
||||||
|
```c
|
||||||
|
const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS( {9, 6, HSV_GREEN} );
|
||||||
|
const rgblight_segment_t PROGMEM _no_layer[] = RGBLIGHT_LAYER_SEGMENTS( {9, 6, HSV_RED} );
|
||||||
|
|
||||||
|
const rgblight_segment_t* const PROGMEM _rgb_layers[] =
|
||||||
|
RGBLIGHT_LAYERS_LIST( _yes_layer, _no_layer );
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
rgblight_layers = _rgb_layers;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note we user post_process_record_user because we want the state
|
||||||
|
// after the flag has been flipped...
|
||||||
|
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case DEBUG:
|
||||||
|
rgblight_blink_layer(debug_enable ? 0 : 1, 500);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case NK_TOGG:
|
||||||
|
case NK_ON:
|
||||||
|
case NK_OFF:
|
||||||
|
rgblight_blink_layer(keymap_config.nkro ? 0 : 1, 500);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ LCD_DISP_ON_CURSOR_BLINK : ディスプレイオン、点滅カーソル
|
|||||||
````
|
````
|
||||||
これはキーボードの `matrix_init_kb` またはキーマップの `matrix_init_user` で行うのが最適です。
|
これはキーボードの `matrix_init_kb` またはキーマップの `matrix_init_user` で行うのが最適です。
|
||||||
使用前にディスプレイをクリアすることをお勧めします。
|
使用前にディスプレイをクリアすることをお勧めします。
|
||||||
そのためには、`lcd_clrsrc()` を呼びます。
|
そのためには、`lcd_clrscr()` を呼びます。
|
||||||
|
|
||||||
ディスプレイに何かを表示するには、最初に `lcd_gotoxy(column, line)` を呼びます。最初の行の先頭に移動するには、`lcd_gotoxy(0, 0)` を呼び出し、その後 `lcd_puts("example string")` を使って文字列を出力します。
|
ディスプレイに何かを表示するには、最初に `lcd_gotoxy(column, line)` を呼びます。最初の行の先頭に移動するには、`lcd_gotoxy(0, 0)` を呼び出し、その後 `lcd_puts("example string")` を使って文字列を出力します。
|
||||||
|
|
||||||
|
|||||||
@@ -479,7 +479,7 @@ void oled_write_ln_P(const char *data, bool invert) {
|
|||||||
void oled_write_raw_P(const char *data, uint16_t size) {
|
void oled_write_raw_P(const char *data, uint16_t size) {
|
||||||
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
||||||
for (uint16_t i = 0; i < size; i++) {
|
for (uint16_t i = 0; i < size; i++) {
|
||||||
uint8_t c = pgm_read_byte(++data);
|
uint8_t c = pgm_read_byte(data++);
|
||||||
if (oled_buffer[i] == c) continue;
|
if (oled_buffer[i] == c) continue;
|
||||||
oled_buffer[i] = c;
|
oled_buffer[i] = c;
|
||||||
oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));
|
oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Time out one shot layers after 3 seconds
|
||||||
|
#define ONESHOT_TIMEOUT 3000
|
||||||
|
|
||||||
|
#define RGBLED_NUM 16
|
||||||
|
|
||||||
|
|
||||||
|
// Undef and redefine default brightness to half of 255
|
||||||
|
#undef RGBLIGHT_LIMIT_VAL
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 128
|
||||||
|
|
||||||
|
#define TAPPING_TERM 200
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
uint16_t copy_paste_timer;
|
||||||
|
uint16_t enter_timer;
|
||||||
|
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
|
||||||
|
// Define custom keycodes
|
||||||
|
enum my_keycodes {
|
||||||
|
KC_CCCV = SAFE_RANGE,
|
||||||
|
KC_2ENTER
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
//Layer 0 - Base Layer (F13 to F24, and One Shot Layer 1,2,3,4)
|
||||||
|
[0] = LAYOUT_ortho_4x4(
|
||||||
|
KC_F13, KC_F14, KC_F15, KC_F16,
|
||||||
|
KC_F17, KC_CCCV, KC_F19, KC_F20,
|
||||||
|
KC_F21, KC_F22, KC_F23, KC_2ENTER,
|
||||||
|
OSL(1), OSL(2), OSL(3), TG(4) //Transparent to let you go between layers
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_ortho_4x4(
|
||||||
|
LALT(KC_F13), LALT(KC_F14), LALT(KC_F15), LALT(KC_F16),
|
||||||
|
LALT(KC_F17), LALT(KC_F18), LALT(KC_F19), LALT(KC_F20),
|
||||||
|
LALT(KC_F21), LALT(KC_F22), LALT(KC_F23), LALT(KC_F24),
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers
|
||||||
|
),
|
||||||
|
|
||||||
|
//Layer 2 - Shift + Function Key Layer
|
||||||
|
[2] = LAYOUT_ortho_4x4(
|
||||||
|
LSFT(KC_F13), LSFT(KC_F14), LSFT(KC_F15), LSFT(KC_F16),
|
||||||
|
LSFT(KC_F17), LSFT(KC_F18), LSFT(KC_F19), LSFT(KC_F20),
|
||||||
|
LSFT(KC_F21), LSFT(KC_F22), LSFT(KC_F23), LSFT(KC_F24),
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers
|
||||||
|
),
|
||||||
|
|
||||||
|
//Layer 3 - Control + Function Key
|
||||||
|
[3] = LAYOUT_ortho_4x4(
|
||||||
|
LCTL(KC_F13), LCTL(KC_F14), LCTL(KC_F15), LCTL(KC_F16),
|
||||||
|
LCTL(KC_F17), LCTL(KC_F18), LCTL(KC_F19), LCTL(KC_F20),
|
||||||
|
LCTL(KC_F21), LCTL(KC_F22), LCTL(KC_F23), LCTL(KC_F24),
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers
|
||||||
|
),
|
||||||
|
|
||||||
|
//Layer 4 - Keyboard Lights. Programming and Special Functions
|
||||||
|
[4] = LAYOUT_ortho_4x4(
|
||||||
|
KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU,
|
||||||
|
RGB_TOG, RGB_MOD, RGB_RMOD, KC_MUTE,
|
||||||
|
TO(0), RESET, EEP_RST, KC_VOLD,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //Transparent to let you go between layers
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case KC_CCCV: // One key copy/paste
|
||||||
|
if (record->event.pressed) {
|
||||||
|
copy_paste_timer = timer_read();
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
|
||||||
|
tap_code16(LCTL(KC_C));
|
||||||
|
} else { // Tap, paste
|
||||||
|
tap_code16(LCTL(KC_V));
|
||||||
|
}
|
||||||
|
} return true;
|
||||||
|
case KC_2ENTER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
enter_timer = timer_read();
|
||||||
|
} else {
|
||||||
|
if (timer_elapsed(enter_timer) > TAPPING_TERM) { // Hold, shift+enter
|
||||||
|
tap_code16(LSFT(KC_ENTER));
|
||||||
|
} else { // Tap, enter
|
||||||
|
tap_code16(KC_F24);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
//Enable the LED layers
|
||||||
|
layer_state_set_user(layer_state);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
rgblight_sethsv_noeeprom(HSV_WHITE);
|
||||||
|
switch(get_highest_layer(state)) {
|
||||||
|
case 1:
|
||||||
|
// Green
|
||||||
|
rgblight_enable_noeeprom();
|
||||||
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
// Red
|
||||||
|
rgblight_enable_noeeprom();
|
||||||
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
// Blue
|
||||||
|
rgblight_enable_noeeprom();
|
||||||
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
// Orange
|
||||||
|
rgblight_enable_noeeprom();
|
||||||
|
// rgblight_sethsv_noeeprom(HSV_PURPLE);
|
||||||
|
rgblight_sethsv_noeeprom(HSV_ORANGE);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// White
|
||||||
|
//Read RGB Light State
|
||||||
|
rgblight_config.raw = eeconfig_read_rgblight();
|
||||||
|
//If enabled, set white
|
||||||
|
if (rgblight_config.enable) {
|
||||||
|
rgblight_sethsv_noeeprom(HSV_WHITE);
|
||||||
|
} else { //Otherwise go back to disabled
|
||||||
|
rgblight_disable_noeeprom();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Nick B's Super16 keymap
|
||||||
|
|
||||||
|
A modification of the default keymap to include layer indicators with RGB
|
||||||
|
* Added a time out of 3 seconds to 1 shot layers
|
||||||
|
* Reduced brightness to half to reduce power draw
|
||||||
|
* Added a one key copy/paste keycode
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
RGB_MATRIX_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#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.
|
// 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.
|
// 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
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
@@ -41,6 +39,7 @@ enum planck_keycodes {
|
|||||||
#define ADJUST MO(_ADJUST)
|
#define ADJUST MO(_ADJUST)
|
||||||
#define LOWER MO(_LOWER)
|
#define LOWER MO(_LOWER)
|
||||||
#define RAISE MO(_RAISE)
|
#define RAISE MO(_RAISE)
|
||||||
|
#define MACLOCK LGUI(LCTL(KC_Q))
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* Dvorak Layer
|
/* Dvorak Layer
|
||||||
@@ -119,13 +118,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||||
| | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | |
|
| | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | |
|
||||||
|------+------+------+------+------| || |------+------+------+------+------|
|
|------+------+------+------+------| || |------+------+------+------+------|
|
||||||
| ~ | | | | Del |------'`------| Ins | | | | |
|
| ~ | | | | Del |------'`------| Ins | | | |MACLCK|
|
||||||
`----------------------------------' `----------------------------------'*/
|
`----------------------------------' `----------------------------------'*/
|
||||||
[_LOWER] = LAYOUT(
|
[_LOWER] = LAYOUT(
|
||||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
|
||||||
KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_PLUS, KC_LCBR, KC_RCBR,
|
KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_PLUS, KC_LCBR, KC_RCBR,
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, _______,
|
||||||
KC_TILD, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______
|
KC_TILD, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, MACLOCK
|
||||||
),
|
),
|
||||||
|
|
||||||
/* RAISE Layer
|
/* RAISE Layer
|
||||||
@@ -136,13 +135,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||||
| | Left | Down | Right| End | || | PgUp | Prev | Play | Next | |
|
| | Left | Down | Right| End | || | PgUp | Prev | Play | Next | |
|
||||||
|------+------+------+------+------| || |------+------+------+------+------|
|
|------+------+------+------+------| || |------+------+------+------+------|
|
||||||
| ` | | | | Del |------'`------| Ins | | | | |
|
| ` | | | | Del |------'`------| Ins | | | |MACLCK|
|
||||||
`----------------------------------' `----------------------------------'*/
|
`----------------------------------' `----------------------------------'*/
|
||||||
[_RAISE] = LAYOUT(
|
[_RAISE] = LAYOUT(
|
||||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
||||||
KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_EQL, KC_LBRC, KC_RBRC,
|
KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, _______, KC_EQL, KC_LBRC, KC_RBRC,
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, _______,
|
||||||
KC_GRV, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, _______
|
KC_GRV, _______, _______, _______, KC_DEL, _______, _______, KC_INS, _______, _______, _______, MACLOCK
|
||||||
),
|
),
|
||||||
|
|
||||||
/* ADJUST Layer
|
/* ADJUST Layer
|
||||||
@@ -190,4 +189,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ Control.
|
|||||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||||
| | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | |
|
| | Left | Down | Right| End | || | PgUp | Mute | Vol- | Vol+ | |
|
||||||
|------+------+------+------+------| || |------+------+------+------+------|
|
|------+------+------+------+------| || |------+------+------+------+------|
|
||||||
| ~ | | | | Del |------'`------| Ins | | | | |
|
| ~ | | | | Del |------'`------| Ins | | | |MACLCK|
|
||||||
`----------------------------------' `----------------------------------'
|
`----------------------------------' `----------------------------------'
|
||||||
|
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ Control.
|
|||||||
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
|------+------+------+------+------|------.,------|------+------+------+------+------|
|
||||||
| | Left | Down | Right| End | || | PgUp | Prev | Play | Next | |
|
| | Left | Down | Right| End | || | PgUp | Prev | Play | Next | |
|
||||||
|------+------+------+------+------| || |------+------+------+------+------|
|
|------+------+------+------+------| || |------+------+------+------+------|
|
||||||
| ` | | | | Del |------'`------| Ins | | | | |
|
| ` | | | | Del |------'`------| Ins | | | |MACLCK|
|
||||||
`----------------------------------' `----------------------------------'
|
`----------------------------------' `----------------------------------'
|
||||||
|
|
||||||
### Layer 6: ADJUST layer
|
### Layer 6: ADJUST layer
|
||||||
|
|||||||
@@ -0,0 +1,217 @@
|
|||||||
|
/* Copyright 2019 ENDO Katsuhiro <[email protected]>
|
||||||
|
* Copyright 2020 Masaya Uno
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
|
||||||
|
enum layer_number {
|
||||||
|
_QWERTY,
|
||||||
|
_COLEMAK,
|
||||||
|
_DVORAK,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Defines the keycodes used by our macros in process_record_user
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
DVORAK,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define ADJUST MO(_ADJUST)
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Qwerty
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
|
||||||
|
* `-----------------------------------------' `-----------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
/* Colemak
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
|
||||||
|
* `-----------------------------------------' `-----------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = LAYOUT(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
|
||||||
|
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | Tab | ' | , | . | P | Y | | F | G | C | R | L | Bksp |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Ctrl | A | O | E | U | I | | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* |ADJUST| Esc | Alt | GUI |LOWER |Space | | Space| RAISE| Left | Down | Up | Right|
|
||||||
|
* `-----------------------------------------' `-----------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = LAYOUT(
|
||||||
|
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
|
||||||
|
KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
|
||||||
|
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT,
|
||||||
|
ADJUST, KC_ESC, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | - | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | Home | End | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------' `-----------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `-----------------------------------------' `-----------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,-----------------------------------------. ,-----------------------------------------.
|
||||||
|
* | | Reset| | | | | | |Qwerty|Colemk|Dvorak| | Ins |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | Caps | | | | | Mac | | Win | - | = |Print |ScLock|Pause |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | KANA | | Home |PageDn|PageUp| End |
|
||||||
|
* `-----------------------------------------' `-----------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
_______, RESET, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS,
|
||||||
|
KC_CAPS, _______, _______, _______, _______, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
|
||||||
|
)
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case DVORAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_DVORAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_user(led_t led_state) {
|
||||||
|
board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock);
|
||||||
|
board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
|
||||||
|
void oled_write_layer_state(void) {
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
switch (get_highest_layer(layer_state | default_layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_ln_P(PSTR("Qwerty"), false);
|
||||||
|
break;
|
||||||
|
case _COLEMAK:
|
||||||
|
oled_write_ln_P(PSTR("Colemak"), false);
|
||||||
|
break;
|
||||||
|
case _DVORAK:
|
||||||
|
oled_write_ln_P(PSTR("Dvorak"), false);
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
oled_write_ln_P(PSTR("Lower"), false);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
oled_write_ln_P(PSTR("Raise"), false);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
oled_write_ln_P(PSTR("Adjust"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_ln_P(PSTR("Undef"), false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
// If you want to change the display of OLED, you need to change here
|
||||||
|
oled_write_layer_state();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# An OLED enabled keymap based on the default keymap for chidori
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Enable SSD1306 OLED
|
||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
@@ -16,7 +16,7 @@ BOOTLOADER = atmel-dfu
|
|||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
LAYOUT(
|
LAYOUT(
|
||||||
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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_UNDS, KC_PLUS,
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS,
|
||||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_LBRC, KC_RBRC,
|
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_LBRC, KC_RBRC,
|
||||||
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT),
|
RESET, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MPLY, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT),
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
# D48
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A Proton C based handwired 48 key keyboard with 2 rotary encoders, I2C OLED, WS2812 strip, buzzer & clock!
|
||||||
|
|
||||||
|
- Keyboard Maintainer: Andrew Dunai
|
||||||
|
- Hardware Supported: Proton C handwired
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/d48:default
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
- Proton C based handwired keyboard
|
||||||
|
- 2x custom 1.25mm stainless steel plates
|
||||||
|
- Kailh Choc White (clicky)
|
||||||
|
- 2x rotary encoders
|
||||||
|
- 0.91" 128x32 I<sup>2</sup>C OLED
|
||||||
|
- Small buzzer mounted inside (still waiting for the AST1109MLTRQ boys)
|
||||||
|
- WS2812 strip (14 LEDs)
|
||||||
|
- DS1307 I<sup>2</sup>C module real-time clock
|
||||||
|
|
||||||
|
Build process: [album](https://imgur.com/gallery/zZZGdDw)
|
||||||
|
|
||||||
|
## Pinout
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Challenges
|
||||||
|
|
||||||
|
I'm very happy with the result, but at some point Proton C was driving me nuts.
|
||||||
|
|
||||||
|
I did a lot of trial and error during assembly & programming.
|
||||||
|
There were a lot of *yet* undocumented caveats,
|
||||||
|
so I'll outline them here so that you guys can avoid the same issues I had.
|
||||||
|
|
||||||
|
## Matrix & encoders
|
||||||
|
|
||||||
|
Although this is a 48-key board with a 12-col & 4-row matrix, I've decided to add an extra row above the first one
|
||||||
|
to make my matrix 12x5 and wire encoders' push buttons as 2 extra keys, thus making it a total of 50 (12x4 + 2 encoders).
|
||||||
|
I used 2 columns (9 & 12) for those buttons.
|
||||||
|
|
||||||
|
So, a first row actually has 2 buttons on columns 9 & 12 (because encoders are located near those columns).
|
||||||
|
Encoders' push buttons are also configured via QMK's keymap.
|
||||||
|
|
||||||
|
Check out the `d48.h` & `config.h` for pins used & keymap macro definition.
|
||||||
|
|
||||||
|
## I<sup>2</sup>C/OLED
|
||||||
|
|
||||||
|
Most of the stuff worked out of the box, except me choosing the right pins for my OLED.
|
||||||
|
|
||||||
|
On the Proton C pinout, there are 3 labels for I<sup>2</sup>C and for some reason
|
||||||
|
there are 2 pairs of SDA/SCL for I<sup>2</sup>C<sup>1</sup> channel: `B8`/`B9` (rear left side) and `B6`/`B7` (rear right side).
|
||||||
|
I'm not sure if this is a mistake or if I was doing something wrong. So initially I picked `B8`/`B9`
|
||||||
|
which were not working. When I switched to B6/B7, things worked like a charm.
|
||||||
|
Later I used B9 for matrix row. No issues so far.
|
||||||
|
|
||||||
|
Oh, and by the way, while using `B8`/`B9`, keyboard was sometimes *swallowing* quick keypresses.
|
||||||
|
I believe this was due to I(2)C timeouts (because incorrect pins were used for OLED).
|
||||||
|
|
||||||
|
## Buzzer
|
||||||
|
|
||||||
|
It turns out once you switch on `AUDIO_ENABLE`, you cannot use A4 & A5 because they interfere with the buzzer.
|
||||||
|
My guess is that buzzer uses DAC channels (not sure why both).
|
||||||
|
|
||||||
|
I couldn't find this in documentation. Honestly, Proton C has almost zero documentation and this was
|
||||||
|
the biggest challenge. Anyway, apart from almost going crazy from those challenges, I really liked it!
|
||||||
|
|
||||||
|
## RGB
|
||||||
|
|
||||||
|
I used pin `A15` for my WS28128 RGB strip.
|
||||||
|
|
||||||
|
## D1307 real-time clock
|
||||||
|
|
||||||
|
Connecting DS1307 RTC was a piece of cake: same I<sup>2</sup> pins as OLED (SDA/SCL), GND to GND and power to Proton C VUSB pin (5v).
|
||||||
|
|
||||||
|
## Other issues
|
||||||
|
|
||||||
|
- `B5` could not be used for matrix.
|
||||||
|
- `TAP_CODE_DELAY` had to be increased to 10 to fix `tap_code(KC_VOLU/KC_VOLD)` calls being swallowed in encoder callback.
|
||||||
|
- Be extremely attentive about the pinout: keep in mind that **the official Proton C pinout displays the rear of the board, not the front.** Being used to front pinouts, I ended up soldering entire matrix to the wrong side, so I had to desolder every wire and connect it to the opposite side.
|
||||||
|
|
||||||
|
## Conclusion
|
||||||
|
|
||||||
|
I had a lot of fun. The layout was inspired by the Planck THK. Feel free to ask any questions!
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Andrew Dunai
|
||||||
|
#define PRODUCT D48
|
||||||
|
|
||||||
|
/* Key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 12
|
||||||
|
|
||||||
|
/* Key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { B8, B9, B1, B2, B4 }
|
||||||
|
|
||||||
|
#define MATRIX_COL_PINS { A2, B0, A7, A8, A13, A14, B12, B11, B10, B15, B14, B13 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
// #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
|
||||||
|
|
||||||
|
/* prevent stuck modifiers */
|
||||||
|
// #define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
/* RGB Underglow */
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#define RGB_DI_PIN A15
|
||||||
|
#define RGBLED_NUM 14
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Audio */
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG_DOOM SONG(E1M1_DOOM)
|
||||||
|
#define STARTUP_SONG SONG( \
|
||||||
|
Q__NOTE(_E6), \
|
||||||
|
Q__NOTE(_A6), \
|
||||||
|
H__NOTE(_E7), \
|
||||||
|
Q__NOTE(_E6), \
|
||||||
|
Q__NOTE(_E7) \
|
||||||
|
)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Encoders */
|
||||||
|
#define ENCODERS_PAD_A { B3, A0 }
|
||||||
|
#define ENCODERS_PAD_B { A6, A1 }
|
||||||
|
/* #define ENCODER_RESOLUTION 4 */
|
||||||
|
|
||||||
|
/* OLED */
|
||||||
|
#define OLED_FONT_H "glcdfont_d48.c"
|
||||||
|
#define OLED_TIMEOUT 0
|
||||||
|
// #define OLED_SCROLL_TIMEOUT 1000
|
||||||
|
|
||||||
|
/* Taps (encoder tap_code) */
|
||||||
|
#define TAP_CODE_DELAY 10
|
||||||
|
|
||||||
|
/* I2C */
|
||||||
|
//#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2
|
||||||
|
//#define PAL_MODE_STM32_ALTERNATE_OPENDRAIN (PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN)
|
||||||
|
|
||||||
|
/* DS1307 */
|
||||||
|
#define DS1307_ADDR (0x68 << 1)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "d48.h"
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K08, K0B, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
|
||||||
|
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
|
||||||
|
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B \
|
||||||
|
) { \
|
||||||
|
{ ___, ___, ___, ___, ___, ___, ___, ___, K08, ___, ___, K0B }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#include "ds1307.h"
|
||||||
|
#include "i2c_master.h"
|
||||||
|
|
||||||
|
void ds1307_set_time(uint8_t h, uint8_t m, uint8_t s) {
|
||||||
|
uint8_t data[] = {
|
||||||
|
((s % 10) | ((s / 10) << 4)) & 0x7F,
|
||||||
|
((m % 10) | ((m / 10) << 4)) & 0x7F,
|
||||||
|
((h % 10) | ((h / 10) << 4)) & 0x3F,
|
||||||
|
0, 0, 0, 0, 0
|
||||||
|
}; // 24-hour mode
|
||||||
|
i2c_writeReg(DS1307_ADDR, 0, data, 8, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ds1307_get_time(uint8_t *h, uint8_t *m, uint8_t *s) {
|
||||||
|
uint8_t data[3];
|
||||||
|
i2c_readReg(DS1307_ADDR, 0, data, 3, 100);
|
||||||
|
i2c_stop();
|
||||||
|
*s = (data[0] & 0b1111) + ((data[0] & 0b1110000) >> 4) * 10;
|
||||||
|
*m = (data[1] & 0b1111) + ((data[1] & 0b1110000) >> 4) * 10;
|
||||||
|
*h = (data[2] & 0b1111) + ((data[2] & 0b0110000) >> 4) * 10;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
void ds1307_set_time(uint8_t h, uint8_t m, uint8_t s);
|
||||||
|
void ds1307_get_time(uint8_t *h, uint8_t *m, uint8_t *s);
|
||||||
@@ -0,0 +1,231 @@
|
|||||||
|
#include "progmem.h"
|
||||||
|
|
||||||
|
// Helidox 8x6 font with QMK Firmware Logo
|
||||||
|
// Online editor: http://teripom.x0.com/
|
||||||
|
|
||||||
|
static const unsigned char font[] PROGMEM = {
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||||
|
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||||
|
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||||
|
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||||
|
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||||
|
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||||
|
0x00, 0x00, 0x08, 0x08, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||||
|
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||||
|
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||||
|
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||||
|
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||||
|
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||||
|
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||||
|
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||||
|
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||||
|
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||||
|
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||||
|
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||||
|
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||||
|
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||||
|
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||||
|
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||||
|
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||||
|
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||||
|
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||||
|
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||||
|
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||||
|
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||||
|
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||||
|
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||||
|
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||||
|
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||||
|
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||||
|
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||||
|
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||||
|
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||||
|
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||||
|
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||||
|
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||||
|
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||||
|
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||||
|
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||||
|
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||||
|
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||||
|
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||||
|
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||||
|
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||||
|
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||||
|
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||||
|
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||||
|
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||||
|
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||||
|
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||||
|
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||||
|
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||||
|
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||||
|
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||||
|
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||||
|
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||||
|
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||||
|
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||||
|
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||||
|
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||||
|
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||||
|
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||||
|
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||||
|
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||||
|
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||||
|
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||||
|
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||||
|
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||||
|
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||||
|
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||||
|
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||||
|
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||||
|
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||||
|
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||||
|
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||||
|
0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00,
|
||||||
|
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||||
|
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||||
|
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||||
|
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||||
|
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||||
|
0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||||
|
0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
|
||||||
|
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||||
|
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||||
|
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||||
|
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||||
|
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||||
|
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||||
|
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||||
|
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||||
|
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||||
|
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||||
|
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||||
|
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x60, 0x70, 0x78, 0x3C,
|
||||||
|
0x1E, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0,
|
||||||
|
0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC,
|
||||||
|
0xE0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x07,
|
||||||
|
0x07, 0x07, 0x07, 0x07, 0x07, 0x0F,
|
||||||
|
0x1F, 0xFE, 0xFE, 0xF8, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xF0, 0xFC, 0xFE, 0xFE, 0x3F,
|
||||||
|
0x1F, 0x0F, 0x0F, 0x0F, 0x0F, 0x9F,
|
||||||
|
0xFF, 0xFE, 0xFE, 0xFC, 0xF0, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x3E, 0x22, 0x22, 0x00, 0x02, 0x3E,
|
||||||
|
0x02, 0x00, 0x3E, 0x20, 0x20, 0x00,
|
||||||
|
0x00, 0x3C, 0x0A, 0x3C, 0x00, 0x3E,
|
||||||
|
0x20, 0x20, 0x02, 0x3E, 0x02, 0x00,
|
||||||
|
0x00, 0x1C, 0x22, 0x32, 0x00, 0x1E,
|
||||||
|
0x20, 0x20, 0x1E, 0x00, 0x3E, 0x00,
|
||||||
|
0x00, 0x2C, 0x2A, 0x1A, 0x00, 0x3E,
|
||||||
|
0x0A, 0x02, 0x00, 0x02, 0x3E, 0x02,
|
||||||
|
0x00, 0x00, 0x08, 0x08, 0x08, 0x08,
|
||||||
|
0x08, 0x08, 0x08, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0xC0, 0xF8, 0xFF, 0xFF,
|
||||||
|
0xFF, 0xE7, 0xE0, 0xE0, 0xE7, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xF8, 0xC0, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x3C,
|
||||||
|
0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x7E,
|
||||||
|
0xFF, 0xE7, 0xE7, 0x81, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
|
||||||
|
0xF0, 0xF8, 0x7C, 0x3E, 0x1F, 0x0F,
|
||||||
|
0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x22, 0x22, 0x00, 0x00,
|
||||||
|
0x0F, 0x0F, 0x2F, 0x2F, 0x0F, 0x0F,
|
||||||
|
0xF0, 0xF0, 0xF2, 0xF2, 0xF0, 0xF0,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0x00, 0x00, 0x22, 0x22, 0x00, 0xFF,
|
||||||
|
0x0F, 0x0F, 0x2F, 0x2F, 0x0F, 0xFF,
|
||||||
|
0xF0, 0xF0, 0xF2, 0xF2, 0xF0, 0xFF,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xF0, 0xFE, 0xFF, 0xFF, 0x0F, 0x01,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x0F, 0xFF, 0xFF, 0xFE, 0xF0,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0,
|
||||||
|
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xF0,
|
||||||
|
0xF8, 0x7F, 0x7F, 0x1F, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x0F, 0x3F, 0x7F, 0x7F, 0xFF,
|
||||||
|
0xF9, 0xF0, 0xF0, 0xF0, 0xF0, 0xF8,
|
||||||
|
0xFC, 0x7F, 0x7F, 0x3F, 0x0F, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F,
|
||||||
|
0xFF, 0xF1, 0xF1, 0xF1, 0xF1, 0xF1,
|
||||||
|
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
0xFF, 0x11, 0x11, 0x11, 0x11, 0x11,
|
||||||
|
};
|
||||||
@@ -0,0 +1,340 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "taphold.h"
|
||||||
|
#include "seq.h"
|
||||||
|
#include "ds1307.h"
|
||||||
|
#include "lightmode.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
/* Note: don't forget there's some more code in qmk_firmware/users/anderson dir */
|
||||||
|
|
||||||
|
#define _MAIN 0
|
||||||
|
#define _ALPHA 1
|
||||||
|
#define _BETA 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
KC_MAIN = SAFE_RANGE,
|
||||||
|
KC_ALPHA,
|
||||||
|
KC_BETA,
|
||||||
|
#ifdef LIGHTMODE_ENABLE
|
||||||
|
KC_LIGHT_MODE,
|
||||||
|
#endif
|
||||||
|
KC_SEQ,
|
||||||
|
KC_SET_TIME,
|
||||||
|
};
|
||||||
|
#ifdef LIGHTMODE_ENABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* TapHold is my own implementation of the `LT` macro. It's processed in `process_record_user()`. */
|
||||||
|
#define TAPHOLD_CONFIG_SIZE 3
|
||||||
|
taphold_t taphold_config[TAPHOLD_CONFIG_SIZE] = {
|
||||||
|
{.key=KC_ALPHA, .mode=TAPHOLD_LAYER, .shortAction=KC_ESC, .longAction=_ALPHA},
|
||||||
|
{.key=KC_BETA, .mode=TAPHOLD_LAYER, .shortAction=KC_EQL, .longAction=_BETA},
|
||||||
|
{.key=KC_RCTRL, .mode=TAPHOLD_MOD, .shortAction=KC_MINS, .longAction=KC_LCTRL},
|
||||||
|
};
|
||||||
|
uint16_t taphold_config_size = TAPHOLD_CONFIG_SIZE;
|
||||||
|
uint32_t taphold_timeout = 90;
|
||||||
|
|
||||||
|
/* Seq is implementation of unicode macros similar to UCIS, but with unicode strings. */
|
||||||
|
#define SEQ_CONFIG_SIZE 3
|
||||||
|
seq_t seq_config[SEQ_CONFIG_SIZE] = {
|
||||||
|
{.sequence="temp", .result="42°C"},
|
||||||
|
{.sequence="table", .result="┳━━┳"},
|
||||||
|
{.sequence="shrug", .result="¯\\_(ツ)_/¯"}
|
||||||
|
};
|
||||||
|
uint16_t seq_config_size = SEQ_CONFIG_SIZE;
|
||||||
|
|
||||||
|
/* Colors */
|
||||||
|
uint32_t layer_colors[3] = {
|
||||||
|
[_MAIN] = 0xFF0010,
|
||||||
|
[_ALPHA] = 0x4020FF,
|
||||||
|
[_BETA] = 0x20FF00,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Main layer
|
||||||
|
│MUTE │ │L_MOD│
|
||||||
|
┏━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┓
|
||||||
|
┃ TAB ┃ Q │ W │ E │ R │ T ┃ Y │ U │ I │ O │ P ┃ BSP ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃𝛼/ESC┃ A │ S │ D │ F │ G ┃ H │ J │ K │ L │ ; ┃ RET ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃SHIFT┃ Z │ X │ C │ V │ B ┃ N │ M │ , │ . │ / ┃CTL/-┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃LCTRL┃ │ │ ALT │ GUI │SPACE┃SPACE│ 𝛽/= │ ' │ │ ┃ \ ┃
|
||||||
|
┗━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┛
|
||||||
|
*/
|
||||||
|
[_MAIN] = LAYOUT( \
|
||||||
|
KC_MUTE, LCTL(KC_D),
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
|
KC_ALPHA,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTRL,\
|
||||||
|
KC_LCTRL,_______, _______, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_BETA, KC_QUOT, _______, _______, KC_BSLS \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Alpha layer (𝛼)
|
||||||
|
│ │ │ │
|
||||||
|
┏━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┓
|
||||||
|
┃ ┃PREV │PLAY │NEXT │ │NUMLK┃ - │ ^^^ │ ^ │ vvv │ ~ ┃ DEL ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │VOL -│VOL +│ │CPSLK┃HOME │ <-- │ v │ --> │ ` ┃ \ ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │ │ │ │SCRLK┃ END │ = │ [ │ ] │ ( ┃ ) ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │ │ │ │ ┃ │ │ │ │ ┃ ┃
|
||||||
|
┗━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┛
|
||||||
|
*/
|
||||||
|
[_ALPHA] = LAYOUT( \
|
||||||
|
_______, _______, \
|
||||||
|
_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NLCK, KC_MINS, KC_PGUP, KC_UP, KC_PGDN, KC_TILD, KC_DEL, \
|
||||||
|
_______, _______, KC_VOLD, KC_VOLU, _______, KC_CAPS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT,KC_GRV, KC_BSLS, \
|
||||||
|
_______, _______, _______, _______, _______, KC_SLCK, KC_END, KC_EQL, KC_LBRC, KC_RBRC, KC_LPRN ,KC_RPRN, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Beta layer (𝛽)
|
||||||
|
│ │ │ │
|
||||||
|
┏━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┓
|
||||||
|
┃ RGB ┃ 1 │ 2 │ 3 │ 4 │ 5 ┃ 6 │ 7 │ 8 │ 9 │ 0 ┃ F12 ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃L_MOD┃ F1 │ F2 │ F3 │ F4 │ F5 ┃ F6 │ F7 │ F8 │ F9 │ F10 ┃ F11 ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃RESET│DEBUG│ │ │TIME ┃SLEEP│ SEQ │ { │ } │PTSCR┃ ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │ │ │ │ ┃ │ │ │ │ ┃ ┃
|
||||||
|
┗━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┛
|
||||||
|
*/
|
||||||
|
[_BETA] = LAYOUT( \
|
||||||
|
_______, _______, \
|
||||||
|
RGB_TOG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
|
||||||
|
#ifdef LIGHTMODE_ENABLE
|
||||||
|
KC_LIGHT_MODE,
|
||||||
|
#else
|
||||||
|
_______,
|
||||||
|
#endif
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||||
|
_______, RESET, DEBUG, _______, _______, KC_SET_TIME,KC_SLEP,KC_SEQ,KC_LCBR, KC_RCBR, KC_PSCR, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
static bool alpha_pressed = false;
|
||||||
|
static bool beta_pressed = false;
|
||||||
|
|
||||||
|
static bool ctrl_pressed = false;
|
||||||
|
static bool alt_pressed = false;
|
||||||
|
static bool shift_pressed = false;
|
||||||
|
static bool gui_pressed = false;
|
||||||
|
|
||||||
|
static bool is_in_seq = false;
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
/* debug_enable = true; */
|
||||||
|
/* debug_matrix = true; */
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeconfig_init_user(void) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
#ifdef LIGHTMODE_ENABLE
|
||||||
|
set_light_mode(SMOOTHLED, layer_colors[_MAIN]);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint32_t last_update = 0;
|
||||||
|
static uint8_t hours, minutes, seconds;
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint32_t now = timer_read32();
|
||||||
|
if (now - last_update > 500) {
|
||||||
|
ds1307_get_time(&hours, &minutes, &seconds);
|
||||||
|
last_update = now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool is_in_set_time = false;
|
||||||
|
static char new_time[6];
|
||||||
|
static uint8_t new_time_index = 0;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (keycode == KC_SEQ && record->event.pressed) {
|
||||||
|
seq_start();
|
||||||
|
layer_off(_BETA);
|
||||||
|
is_in_seq = true;
|
||||||
|
return false;
|
||||||
|
} else if (is_in_seq) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (!seq_feed(keycode)) {
|
||||||
|
is_in_seq = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (keycode == KC_SET_TIME && record->event.pressed) {
|
||||||
|
is_in_set_time = true;
|
||||||
|
new_time_index = 0;
|
||||||
|
} else if (is_in_set_time) {
|
||||||
|
if (!record->event.pressed && keycode >= KC_1 && keycode <= KC_0) {
|
||||||
|
new_time[new_time_index++] = (keycode == KC_0) ? 0 : keycode - KC_1 + 1;
|
||||||
|
if (new_time_index == 6) {
|
||||||
|
is_in_set_time = false;
|
||||||
|
ds1307_set_time(
|
||||||
|
(new_time[0]) * 10 + (new_time[1]),
|
||||||
|
(new_time[2]) * 10 + (new_time[3]),
|
||||||
|
(new_time[4]) * 10 + (new_time[5])
|
||||||
|
);
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
tap_code(KC_BSPACE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keycode == KC_LCTRL || keycode == KC_RCTRL) {
|
||||||
|
ctrl_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_LALT) {
|
||||||
|
alt_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_LSFT) {
|
||||||
|
shift_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_LGUI) {
|
||||||
|
gui_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_ALPHA) {
|
||||||
|
alpha_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_BETA) {
|
||||||
|
beta_pressed = record->event.pressed;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keycode == RESET) {
|
||||||
|
rgblight_setrgb(255, 255, 0);
|
||||||
|
}
|
||||||
|
#ifdef LIGHTMODE_ENABLE
|
||||||
|
if (record->event.pressed && keycode == KC_LIGHT_MODE) {
|
||||||
|
next_light_mode(layer_colors[_MAIN]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (keycode == KC_LCTRL) {
|
||||||
|
/* Some Overlay1_Enable fuckery! */
|
||||||
|
(record->event.pressed ? register_code : unregister_code)(KC_LCTRL);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return taphold_process(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
#ifdef LIGHTMODE_ENABLE
|
||||||
|
uint8_t layer = get_highest_layer(state);
|
||||||
|
update_light_mode(layer_colors[layer]);
|
||||||
|
#endif
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (!alpha_pressed) {
|
||||||
|
tap_code(clockwise ? KC_VOLD : KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(clockwise ? KC_MPRV : KC_MNXT);
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
if (!alpha_pressed) {
|
||||||
|
tap_code(clockwise ? KC_UP : KC_DOWN);
|
||||||
|
} else {
|
||||||
|
tap_code(clockwise ? KC_PGUP : KC_PGDN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
return OLED_ROTATION_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
/* Host Keyboard Layer Status */
|
||||||
|
uint8_t current_layer = get_highest_layer(layer_state);
|
||||||
|
|
||||||
|
/* Layer */
|
||||||
|
static const char PROGMEM icons[4][3][6] = {
|
||||||
|
{
|
||||||
|
{ 0x80, 0x81, 0x82, 0x83, 0x84, 0 },
|
||||||
|
{ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0 },
|
||||||
|
{ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ 0x85, 0x86, 0x87, 0x88, 0x89, 0 },
|
||||||
|
{ 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0 },
|
||||||
|
{ 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0 },
|
||||||
|
{ 0xaa, 0xab, 0xac, 0xad, 0xae, 0 },
|
||||||
|
{ 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ 0x8f, 0x90, 0x91, 0x92, 0x93, 0 },
|
||||||
|
{ 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0 },
|
||||||
|
{ 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t icon_index = current_layer == _MAIN ? 3 : current_layer == _ALPHA ? 1 : 2;
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
oled_set_cursor(0, i + 1);
|
||||||
|
oled_write_P(icons[icon_index][i], false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Time */
|
||||||
|
oled_set_cursor(6, 0);
|
||||||
|
// oled_write_P(PSTR("-D48 Custom-\n"), false);
|
||||||
|
char buf[16];
|
||||||
|
sprintf(
|
||||||
|
buf,
|
||||||
|
"%02d:%02d:%02d", hours, minutes, seconds
|
||||||
|
);
|
||||||
|
oled_write(buf, false);
|
||||||
|
|
||||||
|
/* Modifiers */
|
||||||
|
static const char PROGMEM mods[][2] = {
|
||||||
|
{0x94, 0x95}, // CTL
|
||||||
|
{0x96, 0x97}, // ALT
|
||||||
|
{0x98, 0x99}, // GUI
|
||||||
|
{0x9a, 0x9b}, // SFT
|
||||||
|
/* {0x9c, 0x9d}, // EMPTY */
|
||||||
|
};
|
||||||
|
|
||||||
|
char mod_data[13] = "\x9c\x9d\x9c\x9d\x9c\x9d\x9c\x9d \x07\x07\x07\0";
|
||||||
|
if (ctrl_pressed) strncpy(mod_data, mods[0], 2);
|
||||||
|
if (alt_pressed) strncpy(mod_data + 2, mods[1], 2);
|
||||||
|
if (gui_pressed) strncpy(mod_data + 4, mods[2], 2);
|
||||||
|
if (shift_pressed) strncpy(mod_data + 6, mods[3], 2);
|
||||||
|
led_t led_usb_state = host_keyboard_led_state();
|
||||||
|
if (led_usb_state.num_lock) mod_data[9] = 'N';
|
||||||
|
if (led_usb_state.caps_lock) mod_data[10] = 'C';
|
||||||
|
if (led_usb_state.scroll_lock) mod_data[11] = 'S';
|
||||||
|
|
||||||
|
oled_set_cursor(6, 1);
|
||||||
|
oled_write(mod_data, false);
|
||||||
|
|
||||||
|
/* Matrix */
|
||||||
|
static const char PROGMEM matrix_chars[] = {
|
||||||
|
0xb4, // None
|
||||||
|
0xb5, // Upper
|
||||||
|
0xb6, // Lower
|
||||||
|
0xb7 // Both
|
||||||
|
};
|
||||||
|
|
||||||
|
for (uint8_t row = 1; row < MATRIX_ROWS; row += 2) {
|
||||||
|
// Skip first row because it's used by the encoders.
|
||||||
|
uint16_t bits1 = matrix_get_row(row);
|
||||||
|
uint16_t bits2 = matrix_get_row(row + 1);
|
||||||
|
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
uint8_t matrix_char = matrix_chars[((bits1 & (1 << col)) ? 1 : 0) | ((bits2 & (1 << col)) ? 2 : 0)];
|
||||||
|
oled_set_cursor(6 + col, 2 + (row - 1) / 2);
|
||||||
|
oled_write_char(matrix_char, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
#include "lightmode.h"
|
||||||
|
|
||||||
|
#ifdef LIGHTMODE_ENABLE
|
||||||
|
|
||||||
|
/* Light modes switcher */
|
||||||
|
|
||||||
|
uint8_t light_mode = SMOOTHLED;
|
||||||
|
|
||||||
|
void set_light_mode(light_mode_t value, uint32_t color) {
|
||||||
|
light_mode = value;
|
||||||
|
if (light_mode == SMOOTHLED) {
|
||||||
|
smoothled_set(color);
|
||||||
|
} else {
|
||||||
|
dmc12_start(color, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void process_light_mode(void) {
|
||||||
|
if (light_mode == SMOOTHLED) {
|
||||||
|
smoothled_process();
|
||||||
|
} else {
|
||||||
|
dmc12_process();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void update_light_mode(uint32_t color) {
|
||||||
|
if (light_mode == SMOOTHLED) {
|
||||||
|
smoothled_set(color);
|
||||||
|
} else {
|
||||||
|
dmc12_start(color, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void next_light_mode(uint32_t color) {
|
||||||
|
light_mode = (light_mode + 1) % LIGHT_MODE_SIZE;
|
||||||
|
set_light_mode(light_mode, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
process_light_mode();
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#include "smoothled.h"
|
||||||
|
#include "dmc12.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* Light modes */
|
||||||
|
enum light_mode_enum { SMOOTHLED, DMC12, LIGHT_MODE_SIZE };
|
||||||
|
typedef enum light_mode_enum light_mode_t;
|
||||||
|
|
||||||
|
void set_light_mode(light_mode_t value, uint32_t color);
|
||||||
|
void process_light_mode(void);
|
||||||
|
void update_light_mode(uint32_t color);
|
||||||
|
void next_light_mode(uint32_t color);
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
OPT_DEFS += -DLIGHTMODE_ENABLE
|
||||||
|
SRC += smoothled.c dmc12.c seq.c lightmode.c
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "taphold.h"
|
||||||
|
#include "ds1307.h"
|
||||||
|
|
||||||
|
/* Note: don't forget there's some more code in qmk_firmware/users/anderson dir */
|
||||||
|
|
||||||
|
#define _MAIN 0
|
||||||
|
#define _ALPHA 1
|
||||||
|
#define _BETA 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
KC_MAIN = SAFE_RANGE,
|
||||||
|
KC_ALPHA,
|
||||||
|
KC_BETA,
|
||||||
|
KC_SET_TIME,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* TapHold is my own implementation of the `LT` macro. It's processed in `process_record_user()`. */
|
||||||
|
#define TAPHOLD_CONFIG_SIZE 3
|
||||||
|
taphold_t taphold_config[TAPHOLD_CONFIG_SIZE] = {
|
||||||
|
{.key=KC_ALPHA, .mode=TAPHOLD_LAYER, .shortAction=KC_ESC, .longAction=_ALPHA},
|
||||||
|
{.key=KC_BETA, .mode=TAPHOLD_LAYER, .shortAction=KC_EQL, .longAction=_BETA},
|
||||||
|
{.key=KC_RCTRL, .mode=TAPHOLD_MOD, .shortAction=KC_MINS, .longAction=KC_LCTRL},
|
||||||
|
};
|
||||||
|
uint16_t taphold_config_size = TAPHOLD_CONFIG_SIZE;
|
||||||
|
uint32_t taphold_timeout = 90;
|
||||||
|
|
||||||
|
/* Colors */
|
||||||
|
uint32_t layer_colors[3] = {
|
||||||
|
[_MAIN] = 0xFF0010,
|
||||||
|
[_ALPHA] = 0x4020FF,
|
||||||
|
[_BETA] = 0x20FF00,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Main layer
|
||||||
|
│MUTE │ │L_MOD│
|
||||||
|
┏━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┓
|
||||||
|
┃ TAB ┃ Q │ W │ E │ R │ T ┃ Y │ U │ I │ O │ P ┃ BSP ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃𝛼/ESC┃ A │ S │ D │ F │ G ┃ H │ J │ K │ L │ ; ┃ RET ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃SHIFT┃ Z │ X │ C │ V │ B ┃ N │ M │ , │ . │ / ┃CTL/-┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃LCTRL┃ │ │ ALT │ GUI │SPACE┃SPACE│ 𝛽/= │ ' │ │ ┃ \ ┃
|
||||||
|
┗━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┛
|
||||||
|
*/
|
||||||
|
[_MAIN] = LAYOUT( \
|
||||||
|
KC_MUTE, _______, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
|
KC_ALPHA,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RCTRL,\
|
||||||
|
KC_LCTRL,_______, _______, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_BETA, KC_QUOT, _______, _______, KC_BSLS \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Alpha layer (𝛼)
|
||||||
|
│ │ │ │
|
||||||
|
┏━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┓
|
||||||
|
┃ ┃PREV │PLAY │NEXT │ │NUMLK┃ - │ ^^^ │ ^ │ vvv │ ~ ┃ DEL ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │VOL -│VOL +│ │CPSLK┃HOME │ <-- │ v │ --> │ ` ┃ \ ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │ │ │ │SCRLK┃ END │ = │ [ │ ] │ ( ┃ ) ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │ │ │ │ ┃ │ │ │ │ ┃ ┃
|
||||||
|
┗━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┛
|
||||||
|
*/
|
||||||
|
[_ALPHA] = LAYOUT( \
|
||||||
|
_______, _______, \
|
||||||
|
_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NLCK, KC_MINS, KC_PGUP, KC_UP, KC_PGDN, KC_TILD, KC_DEL, \
|
||||||
|
_______, _______, KC_VOLD, KC_VOLU, _______, KC_CAPS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT,KC_GRV, KC_BSLS, \
|
||||||
|
_______, _______, _______, _______, _______, KC_SLCK, KC_END, KC_EQL, KC_LBRC, KC_RBRC, KC_LPRN ,KC_RPRN, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Beta layer (𝛽)
|
||||||
|
│ │ │ │
|
||||||
|
┏━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┯━━━━━┯━━━━━┯━━━━━┯━━━━━┳━━━━━┓
|
||||||
|
┃ RGB ┃ 1 │ 2 │ 3 │ 4 │ 5 ┃ 6 │ 7 │ 8 │ 9 │ 0 ┃ F12 ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃L_MOD┃ F1 │ F2 │ F3 │ F4 │ F5 ┃ F6 │ F7 │ F8 │ F9 │ F10 ┃ F11 ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃RESET│DEBUG│ │ │TIME ┃SLEEP│ │ { │ } │PTSCR┃ ┃
|
||||||
|
┣━━━━━╉─────┼─────┼─────┼─────┼─────╂─────┼─────┼─────┼─────┼─────╊━━━━━┫
|
||||||
|
┃ ┃ │ │ │ │ ┃ │ │ │ │ ┃ ┃
|
||||||
|
┗━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┷━━━━━┷━━━━━┷━━━━━┷━━━━━┻━━━━━┛
|
||||||
|
*/
|
||||||
|
[_BETA] = LAYOUT( \
|
||||||
|
_______, _______, \
|
||||||
|
RGB_TOG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||||
|
_______, RESET, DEBUG, _______, _______, KC_SET_TIME,KC_SLEP,_______,KC_LCBR,KC_RCBR, KC_PSCR, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
static bool alpha_pressed = false;
|
||||||
|
static bool beta_pressed = false;
|
||||||
|
|
||||||
|
static bool ctrl_pressed = false;
|
||||||
|
static bool alt_pressed = false;
|
||||||
|
static bool shift_pressed = false;
|
||||||
|
static bool gui_pressed = false;
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
/* debug_enable = true; */
|
||||||
|
/* debug_matrix = true; */
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeconfig_init_user(void) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint32_t last_update = 0;
|
||||||
|
static uint8_t hours, minutes, seconds;
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
uint32_t now = timer_read32();
|
||||||
|
if (now - last_update > 500) {
|
||||||
|
ds1307_get_time(&hours, &minutes, &seconds);
|
||||||
|
last_update = now;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool is_in_set_time = false;
|
||||||
|
static char new_time[6];
|
||||||
|
static uint8_t new_time_index = 0;
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (keycode == KC_SET_TIME && record->event.pressed) {
|
||||||
|
is_in_set_time = true;
|
||||||
|
new_time_index = 0;
|
||||||
|
} else if (is_in_set_time) {
|
||||||
|
if (!record->event.pressed && keycode >= KC_1 && keycode <= KC_0) {
|
||||||
|
new_time[new_time_index++] = (keycode == KC_0) ? 0 : keycode - KC_1 + 1;
|
||||||
|
if (new_time_index == 6) {
|
||||||
|
is_in_set_time = false;
|
||||||
|
ds1307_set_time(
|
||||||
|
(new_time[0]) * 10 + (new_time[1]),
|
||||||
|
(new_time[2]) * 10 + (new_time[3]),
|
||||||
|
(new_time[4]) * 10 + (new_time[5])
|
||||||
|
);
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
tap_code(KC_BSPACE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keycode == KC_LCTRL || keycode == KC_RCTRL) {
|
||||||
|
ctrl_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_LALT) {
|
||||||
|
alt_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_LSFT) {
|
||||||
|
shift_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_LGUI) {
|
||||||
|
gui_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_ALPHA) {
|
||||||
|
alpha_pressed = record->event.pressed;
|
||||||
|
} else if (keycode == KC_BETA) {
|
||||||
|
beta_pressed = record->event.pressed;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keycode == RESET) {
|
||||||
|
rgblight_setrgb(255, 255, 0);
|
||||||
|
}
|
||||||
|
if (keycode == KC_LCTRL) {
|
||||||
|
/* Some Overlay1_Enable fuckery! */
|
||||||
|
(record->event.pressed ? register_code : unregister_code)(KC_LCTRL);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return taphold_process(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (!alpha_pressed) {
|
||||||
|
tap_code(clockwise ? KC_VOLD : KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(clockwise ? KC_MPRV : KC_MNXT);
|
||||||
|
}
|
||||||
|
} else if (index == 1) {
|
||||||
|
if (!alpha_pressed) {
|
||||||
|
tap_code(clockwise ? KC_UP : KC_DOWN);
|
||||||
|
} else {
|
||||||
|
tap_code(clockwise ? KC_PGUP : KC_PGDN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
return OLED_ROTATION_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
/* Host Keyboard Layer Status */
|
||||||
|
uint8_t current_layer = get_highest_layer(layer_state);
|
||||||
|
|
||||||
|
/* Layer */
|
||||||
|
static const char PROGMEM icons[4][3][6] = {
|
||||||
|
{
|
||||||
|
{ 0x80, 0x81, 0x82, 0x83, 0x84, 0 },
|
||||||
|
{ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0 },
|
||||||
|
{ 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ 0x85, 0x86, 0x87, 0x88, 0x89, 0 },
|
||||||
|
{ 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0 },
|
||||||
|
{ 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0 },
|
||||||
|
{ 0xaa, 0xab, 0xac, 0xad, 0xae, 0 },
|
||||||
|
{ 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0 }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
{ 0x8f, 0x90, 0x91, 0x92, 0x93, 0 },
|
||||||
|
{ 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0 },
|
||||||
|
{ 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0 }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t icon_index = current_layer == _MAIN ? 3 : current_layer == _ALPHA ? 1 : 2;
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
oled_set_cursor(0, i + 1);
|
||||||
|
oled_write_P(icons[icon_index][i], false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Time */
|
||||||
|
oled_set_cursor(6, 0);
|
||||||
|
// oled_write_P(PSTR("-D48 Custom-\n"), false);
|
||||||
|
char buf[16];
|
||||||
|
sprintf(
|
||||||
|
buf,
|
||||||
|
"%02d:%02d:%02d", hours, minutes, seconds
|
||||||
|
);
|
||||||
|
oled_write(buf, false);
|
||||||
|
|
||||||
|
/* Modifiers */
|
||||||
|
static const char PROGMEM mods[][2] = {
|
||||||
|
{0x94, 0x95}, // CTL
|
||||||
|
{0x96, 0x97}, // ALT
|
||||||
|
{0x98, 0x99}, // GUI
|
||||||
|
{0x9a, 0x9b}, // SFT
|
||||||
|
/* {0x9c, 0x9d}, // EMPTY */
|
||||||
|
};
|
||||||
|
|
||||||
|
char mod_data[13] = "\x9c\x9d\x9c\x9d\x9c\x9d\x9c\x9d \x07\x07\x07\0";
|
||||||
|
if (ctrl_pressed) strncpy(mod_data, mods[0], 2);
|
||||||
|
if (alt_pressed) strncpy(mod_data + 2, mods[1], 2);
|
||||||
|
if (gui_pressed) strncpy(mod_data + 4, mods[2], 2);
|
||||||
|
if (shift_pressed) strncpy(mod_data + 6, mods[3], 2);
|
||||||
|
led_t led_usb_state = host_keyboard_led_state();
|
||||||
|
if (led_usb_state.num_lock) mod_data[9] = 'N';
|
||||||
|
if (led_usb_state.caps_lock) mod_data[10] = 'C';
|
||||||
|
if (led_usb_state.scroll_lock) mod_data[11] = 'S';
|
||||||
|
|
||||||
|
oled_set_cursor(6, 1);
|
||||||
|
oled_write(mod_data, false);
|
||||||
|
|
||||||
|
/* Matrix */
|
||||||
|
static const char PROGMEM matrix_chars[] = {
|
||||||
|
0xb4, // None
|
||||||
|
0xb5, // Upper
|
||||||
|
0xb6, // Lower
|
||||||
|
0xb7 // Both
|
||||||
|
};
|
||||||
|
|
||||||
|
for (uint8_t row = 1; row < MATRIX_ROWS; row += 2) {
|
||||||
|
// Skip first row because it's used by the encoders.
|
||||||
|
uint16_t bits1 = matrix_get_row(row);
|
||||||
|
uint16_t bits2 = matrix_get_row(row + 1);
|
||||||
|
|
||||||
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
|
uint8_t matrix_char = matrix_chars[((bits1 & (1 << col)) ? 1 : 0) | ((bits2 & (1 << col)) ? 2 : 0)];
|
||||||
|
oled_set_cursor(6 + col, 2 + (row - 1) / 2);
|
||||||
|
oled_write_char(matrix_char, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = STM32F303
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = yes # 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 = yes
|
||||||
|
USE_I2C = no
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
|
UNICODE_ENABLE = yes
|
||||||
|
|
||||||
|
SRC += ds1307.c taphold.c
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#include "taphold.h"
|
||||||
|
|
||||||
|
bool taphold_process(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
for (int i = 0; i < taphold_config_size; i++) {
|
||||||
|
taphold_t *config = &taphold_config[i];
|
||||||
|
if (config->key == keycode && record->event.pressed) {
|
||||||
|
if (config->mode == TAPHOLD_LAYER) {
|
||||||
|
layer_on(config->longAction);
|
||||||
|
} else {
|
||||||
|
register_code(config->longAction);
|
||||||
|
}
|
||||||
|
config->time = timer_read32();
|
||||||
|
config->keypos = record->event.key;
|
||||||
|
return false;
|
||||||
|
} else if (KEYEQ(record->event.key, config->keypos) && !record->event.pressed) {
|
||||||
|
if (config->mode == TAPHOLD_LAYER) {
|
||||||
|
layer_off(config->longAction);
|
||||||
|
} else {
|
||||||
|
unregister_code(config->longAction);
|
||||||
|
}
|
||||||
|
if (timer_elapsed32(config->time) < taphold_timeout) {
|
||||||
|
tap_code(config->shortAction);
|
||||||
|
}
|
||||||
|
config->keypos.row = 255;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
typedef enum taphold_mode_t {
|
||||||
|
TAPHOLD_LAYER,
|
||||||
|
TAPHOLD_MOD
|
||||||
|
} taphold_mode_t;
|
||||||
|
|
||||||
|
typedef struct taphold_t {
|
||||||
|
uint16_t key;
|
||||||
|
uint32_t time;
|
||||||
|
taphold_mode_t mode;
|
||||||
|
uint16_t shortAction;
|
||||||
|
uint16_t longAction;
|
||||||
|
keypos_t keypos;
|
||||||
|
// We store key pos to properly release the key
|
||||||
|
// even when a different layer is active and the key has a different action now
|
||||||
|
} taphold_t;
|
||||||
|
|
||||||
|
extern taphold_t taphold_config[];
|
||||||
|
extern uint16_t taphold_config_size;
|
||||||
|
// Dual keys tap/hold timeout.
|
||||||
|
// If key is tapped for less than this value, send key in addition to primary action after completing the action.
|
||||||
|
extern uint32_t taphold_timeout;
|
||||||
|
|
||||||
|
bool taphold_process(uint16_t keycode, keyrecord_t *record);
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Chuck Lauer Vose <[email protected]>
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 3
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
|
||||||
|
#define RGBLIGHT_SLEEP // Put the keyboard to sleep when USB goes dark
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_half_5x7( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, \
|
||||||
|
L10, L11, L12, L13, L14, L15, L16, \
|
||||||
|
L20, L21, L22, L23, L24, L25, L26, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L36, \
|
||||||
|
L40, L41, L42, L43, L44, L45, L46 \
|
||||||
|
) \
|
||||||
|
LAYOUT_ortho_5x14( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
|
||||||
|
L10, L11, L12, L13, L14, L15, L16, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
|
||||||
|
L20, L21, L22, L23, L24, L25, L26, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L36, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
|
||||||
|
L40, L41, L42, L43, L44, L45, L46, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO \
|
||||||
|
)
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "vosechu.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[BASE] = LAYOUT_ortho_half_5x7( // Base layer
|
||||||
|
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_9 ,
|
||||||
|
ALT_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , TT(TT1) ,
|
||||||
|
CTL_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , TT(TT2) ,
|
||||||
|
KC_F13 , KC_Z , KC_X , KC_C , KC_V , KC_B , TT(TT3) ,
|
||||||
|
KC_MEH , CTL_GRV , ALT_TAB , KC_LALT , MO(LWR) , LFT_BK , SFT_SPC
|
||||||
|
),
|
||||||
|
[LWR] = LAYOUT_ortho_half_5x7( // EVE layer
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
A(KC_LEFT), KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F9 ,
|
||||||
|
SFT_SPC , A(KC_F1), A(KC_F2), A(KC_F3), A(KC_F4), _______ , _______ ,
|
||||||
|
A(KC_RGHT), C(KC_F1), C(KC_F2), C(KC_F3), C(KC_F4), _______ , _______ ,
|
||||||
|
_______ , RESET , _______ , _______ , _LAYER_ , KC_DEL , KC_ENT
|
||||||
|
),
|
||||||
|
[LFT] = LAYOUT_ortho_half_5x7( // Media
|
||||||
|
_______ , KC_F10 , KC_F11 , KC_F12 , KC_PSCR , KC_SLCK , KC_PAUS ,
|
||||||
|
_______ , KC_F7 , KC_F8 , KC_F9 , KC_INS , KC_HOME , KC_PGUP ,
|
||||||
|
RGB_TOG , KC_F4 , KC_F5 , KC_F6 , KC_DEL , KC_END , KC_PGDN ,
|
||||||
|
_______ , KC_F1 , KC_F2 , KC_F3 , KC_VOLU , KC_VOLD , KC_MUTE ,
|
||||||
|
_______ , _______ , _______ , _______ , PSWD , _LAYER_ , PSWD_ALT
|
||||||
|
),
|
||||||
|
[TT1] = LAYOUT_ortho_half_5x7( // Override WASD with arrows
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
_______ , _______ , KC_UP , _______ , _______ , _______ , _______ ,
|
||||||
|
_______ , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
[TT2] = LAYOUT_ortho_half_5x7( // Browser layer
|
||||||
|
C(KC_W) , C(KC_1) , C(KC_T) , C(KC_9) , _______ , _______ , _______ ,
|
||||||
|
WBWSRBK , WTABLFT , KC_UP , WTABRGT , WBWSRFW , _______ , _______ ,
|
||||||
|
KC_ESC , KC_LEFT , KC_DOWN , KC_RGHT , C(KC_R) , _______ , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , TT(T23X),
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
[TT3] = LAYOUT_ortho_half_5x7( // OS X override layer
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , TT(T23X),
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
_______ , _______ , _______ , KC_LGUI , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
[T23X] = LAYOUT_ortho_half_5x7( // Browser layer
|
||||||
|
G(KC_W) , G(KC_1) , G(KC_T) , G(KC_9) , _______ , SLACKTB , _______ ,
|
||||||
|
BWSR_BK , TAB_LFT , KC_UP , TAB_RGT , BWSR_FW , SLACKUP , _______ ,
|
||||||
|
KC_ESC , KC_LEFT , KC_DOWN , KC_RGHT , G(KC_R) , SLACKDN , _______ ,
|
||||||
|
_______ , _______ , KC_Q , KC_J , KC_K , _______ , _______ ,
|
||||||
|
_______ , _______ , _______ , KC_LGUI , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
// [_EMPTY] = LAYOUT(
|
||||||
|
// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
|
||||||
|
// _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
// ),
|
||||||
|
};
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Call the post init code.
|
||||||
|
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
||||||
|
rgblight_mode_noeeprom(0);
|
||||||
|
rgblight_sethsv_noeeprom(0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||||
|
switch (get_highest_layer(state)) {
|
||||||
|
case TT1:
|
||||||
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
|
break;
|
||||||
|
case TT2:
|
||||||
|
rgblight_sethsv_noeeprom(HSV_PURPLE);
|
||||||
|
break;
|
||||||
|
case T23X:
|
||||||
|
rgblight_sethsv_noeeprom(HSV_GOLD);
|
||||||
|
break;
|
||||||
|
case TT3:
|
||||||
|
rgblight_sethsv_noeeprom(HSV_GREEN);
|
||||||
|
break;
|
||||||
|
default: // for any other layers, or the default layer
|
||||||
|
rgblight_sethsv_noeeprom(0, 0, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0xD645
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER tominabox1
|
||||||
|
#define PRODUCT Le Chiffre
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 10
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { B3, D4, F1, C6 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, B0, B2, B1, B4, D7, C7, D2, F7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#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
|
||||||
|
|
||||||
|
/* Define encoder pads */
|
||||||
|
#define ENCODERS_PAD_A { D5 }
|
||||||
|
#define ENCODERS_PAD_B { D3 }
|
||||||
|
|
||||||
|
/* #define RGB_DI_PIN F0
|
||||||
|
#define RGBLED_NUM 1 */
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "le_chiffre",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "tominabox1",
|
||||||
|
"width": 11,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Rotary", "x":5, "y":0, "w":1}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0},
|
||||||
|
{"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1},
|
||||||
|
{"label":";", "x":10, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":">", "x":9, "y":2}, {"label":"?", "x":10, "y":2},
|
||||||
|
{"label":"", "x":1.75, "y":3, "w":1.25}, {"label":"", "x":3, "y":3, "w":2}, {"label":"", "x":6, "y":3, "w":2}, {"label":"", "x":8, "y":3, "w":1.25}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layers{
|
||||||
|
_BASE,
|
||||||
|
_NUM_SYM,
|
||||||
|
_NAV
|
||||||
|
};
|
||||||
|
|
||||||
|
#define KC_NUM_SPC LT(_NUM_SYM, KC_SPC)
|
||||||
|
#define KC_GA LGUI_T(KC_A)
|
||||||
|
#define KC_AS LALT_T(KC_S)
|
||||||
|
#define KC_CD LCTL_T(KC_D)
|
||||||
|
#define KC_SF LSFT_T(KC_F)
|
||||||
|
#define KC_SJ RSFT_T(KC_J)
|
||||||
|
#define KC_CK RCTL_T(KC_K)
|
||||||
|
#define KC_AL RALT_T(KC_L)
|
||||||
|
#define KC_GSCLN RGUI_T(KC_SCLN)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MPLY, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
KC_GA, KC_AS, KC_CD, KC_SF, KC_G, KC_H, KC_SJ, KC_CK, KC_AL, KC_GSCLN,
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
|
||||||
|
KC_LCTL, KC_ENT, KC_NUM_SPC, MO(_NAV)
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NUM_SYM] = LAYOUT(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_EQUAL, KC_MINS,
|
||||||
|
KC_BSLS,KC_LCBR, KC_LBRC, KC_LPRN, KC_UNDS, KC_RPRN, KC_RBRC, KC_RCBR, KC_DOT, KC_GRV,
|
||||||
|
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[_NAV] = LAYOUT(
|
||||||
|
RESET, _______, AG_NORM, AG_SWAP, DEBUG, KC_TRNS, KC_GRV, KC_PGDN, KC_UP, KC_PGUP, KC_SCLN,
|
||||||
|
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END,
|
||||||
|
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_BSLS,
|
||||||
|
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MNXT);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MPRV);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
return OLED_ROTATION_90; // flips the display 180 degrees if offhand
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
static const char PROGMEM base_logo[] = {
|
||||||
|
// 'base', 32x128px
|
||||||
|
0x00, 0x00, 0x80, 0x7c, 0x02, 0x01, 0x01, 0x80, 0x00, 0xe0, 0x50, 0x28, 0x98, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, 0x40, 0x41, 0x41, 0x41, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0x40, 0x40, 0x40, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x10, 0x08, 0x08, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0x02, 0x39, 0x27, 0x10, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x13, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfc,
|
||||||
|
0x22, 0x21, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x60, 0x1f, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x90, 0x7e, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40,
|
||||||
|
0x30, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x08, 0xe4, 0x1c, 0x08, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x54, 0x4a, 0x26, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char PROGMEM base_caps_logo[] = {
|
||||||
|
// 'caps', 32x128px
|
||||||
|
0x00, 0x00, 0x80, 0x7c, 0x02, 0x01, 0x01, 0x80, 0x00, 0xe0, 0x50, 0x28, 0x98, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x80, 0x40, 0x41, 0x41, 0x41, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0x40, 0x40, 0x40, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x10, 0x08, 0x08, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0x02, 0x39, 0x27, 0x10, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x10, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, 0x13, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfc,
|
||||||
|
0x22, 0x21, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x60, 0x1f, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x90, 0x7e, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40,
|
||||||
|
0x30, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x08, 0xe4, 0x1c, 0x08, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x54, 0x4a, 0x26, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x10, 0x10, 0x30, 0x00, 0x00, 0x80,
|
||||||
|
0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x1e, 0x11, 0x09, 0x08,
|
||||||
|
0x1e, 0x11, 0x81, 0x7d, 0x13, 0x11, 0x08, 0x17, 0x11, 0x12, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _BASE:
|
||||||
|
if (host_keyboard_led_state().caps_lock) {
|
||||||
|
oled_write_raw_P(base_caps_logo, sizeof(base_caps_logo));
|
||||||
|
} else {
|
||||||
|
oled_write_raw_P(base_logo, sizeof(base_logo));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
oled_write_raw_P(base_logo, sizeof(base_logo));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Default Le Chiffre Keymap
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "le_chiffre.h"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define XXX KC_NO
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, K04, K38, K05, K06, K07, K08, K09, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \
|
||||||
|
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \
|
||||||
|
K32, K34, K35, K37 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19 }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29 }, \
|
||||||
|
{ XXX, XXX, K32, XXX, K34, K35, XXX, K37, K38, XXX } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Le Chiffre
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Le Chiffre (ironically, "the number" in French is a 30% keyboard designed by tominabox1. The purpose of the board is to provide a platform for MX and Choc ergo in one package for when ones wrists need a break. The board supports an RGB LED strip with DI on port F0. The board is also fitted with support for run-of-the-mill .91" OLED and EC11 rotary encoder.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [TJ Campie](https://github.com/tominabox1)
|
||||||
|
* Hardware Supported: Le Chiffre (source not available at this time)
|
||||||
|
* Hardware Availability: Bring your own case.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make le_chiffre: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).
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
OLED_DRIVER_ENABLE = no
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/* Copyright 2020 Team Mechlovin'
|
||||||
|
*
|
||||||
|
* 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 "adelais.h"
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
led_config_t g_led_config = { {
|
||||||
|
//Key Matrix to LED Index
|
||||||
|
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16},
|
||||||
|
{18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0},
|
||||||
|
{33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, NO_LED, 45, 17},
|
||||||
|
{46, NO_LED, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 60, 32},
|
||||||
|
{61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, 65, NO_LED, 66, NO_LED, NO_LED, 57, 67}
|
||||||
|
}, {
|
||||||
|
//LED Index to Physical Positon
|
||||||
|
{0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {223, 0}, {224, 0},
|
||||||
|
{0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16},
|
||||||
|
{0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32},
|
||||||
|
{ 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, {224,48},
|
||||||
|
{ 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64},
|
||||||
|
{100,0}, { 69,0}, { 24, 0}, { 0,3}, { 0,16}, { 0,32}, { 0,51}, { 15,64 }, { 34,64}, { 69,64}, { 103,64}, {110,64}, { 120,64}, { 155,64}, { 189,64}, { 192,64}, { 224,58}, { 224,32}, { 224,16}, { 224,0}, { 207,0}, { 172,0}, { 138,0},
|
||||||
|
}, {
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
} };
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
led_init_ports();
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_init_ports(void) {
|
||||||
|
setPinOutput(B2);
|
||||||
|
writePinLow(B2);
|
||||||
|
setPinOutput(C15);
|
||||||
|
writePinLow(C15);
|
||||||
|
setPinOutput(B9);
|
||||||
|
writePinLow(B9);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool led_update_kb(led_t led_state) {
|
||||||
|
if(led_update_user(led_state)) {
|
||||||
|
writePin(B2, led_state.caps_lock);
|
||||||
|
writePin(B9, led_state.scroll_lock);
|
||||||
|
writePin(C12, led_state.num_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/* Copyright 2020 Team Mechlovin
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\
|
||||||
|
K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\
|
||||||
|
K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\
|
||||||
|
K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\
|
||||||
|
K40, K42, K44, K46, K48, K4A, K4E \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \
|
||||||
|
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
|
||||||
|
{ K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Team Mechlovin
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x4D4C // "ML"
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Team.Mechlovin
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { B1, A0, C13, A1, A2}
|
||||||
|
#define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL*/
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Adelais",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "Team Mechlovin'",
|
||||||
|
"width": 18.5,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"key_count": 66,
|
||||||
|
"layout": [
|
||||||
|
{"label":"K1E", "x":0, "y":0},
|
||||||
|
{"label":"K00", "x":1.5, "y":0},
|
||||||
|
{"label":"K01", "x":2.5, "y":0},
|
||||||
|
{"label":"K02", "x":3.5, "y":0},
|
||||||
|
{"label":"K03", "x":4.5, "y":0},
|
||||||
|
{"label":"K04", "x":5.5, "y":0},
|
||||||
|
{"label":"K05", "x":6.5, "y":0},
|
||||||
|
{"label":"K06", "x":7.5, "y":0},
|
||||||
|
{"label":"K07", "x":10.5, "y":0},
|
||||||
|
{"label":"K08", "x":11.5, "y":0},
|
||||||
|
{"label":"K09", "x":12.5, "y":0},
|
||||||
|
{"label":"K0A", "x":13.5, "y":0},
|
||||||
|
{"label":"K0B", "x":14.5, "y":0},
|
||||||
|
{"label":"K0C", "x":15.5, "y":0},
|
||||||
|
{"label":"K0D", "x":16.5, "y":0},
|
||||||
|
{"label":"K0E", "x":17.5, "y":0},
|
||||||
|
{"label":"K2E", "x":0, "y":1},
|
||||||
|
{"label":"K10", "x":1.5, "y":1, "w":1.5},
|
||||||
|
{"label":"K11", "x":3, "y":1},
|
||||||
|
{"label":"K12", "x":4, "y":1},
|
||||||
|
{"label":"K13", "x":5, "y":1},
|
||||||
|
{"label":"K14", "x":6, "y":1},
|
||||||
|
{"label":"K15", "x":7, "y":1},
|
||||||
|
{"label":"K16", "x":10, "y":1},
|
||||||
|
{"label":"K17", "x":11, "y":1},
|
||||||
|
{"label":"K18", "x":12, "y":1},
|
||||||
|
{"label":"K19", "x":13, "y":1},
|
||||||
|
{"label":"K1A", "x":14, "y":1},
|
||||||
|
{"label":"K1B", "x":15, "y":1},
|
||||||
|
{"label":"K1C", "x":16, "y":1},
|
||||||
|
{"label":"K1D", "x":17, "y":1, "w":1.5},
|
||||||
|
{"label":"K3E", "x":0, "y":2},
|
||||||
|
{"label":"K20", "x":1.5, "y":2, "w":1.75},
|
||||||
|
{"label":"K21", "x":3.25, "y":2},
|
||||||
|
{"label":"K22", "x":4.25, "y":2},
|
||||||
|
{"label":"K23", "x":5.25, "y":2},
|
||||||
|
{"label":"K24", "x":6.25, "y":2},
|
||||||
|
{"label":"K25", "x":7.25, "y":2},
|
||||||
|
{"label":"K26", "x":10.25, "y":2},
|
||||||
|
{"label":"K27", "x":11.25, "y":2},
|
||||||
|
{"label":"K28", "x":12.25, "y":2},
|
||||||
|
{"label":"K29", "x":13.25, "y":2},
|
||||||
|
{"label":"K2A", "x":14.25, "y":2},
|
||||||
|
{"label":"K2B", "x":15.25, "y":2},
|
||||||
|
{"label":"K2D", "x":16.25, "y":2, "w":2.25},
|
||||||
|
{"label":"K30", "x":1.5, "y":3, "w":2.25},
|
||||||
|
{"label":"K32", "x":3.75, "y":3},
|
||||||
|
{"label":"K33", "x":4.75, "y":3},
|
||||||
|
{"label":"K34", "x":5.75, "y":3},
|
||||||
|
{"label":"K35", "x":6.75, "y":3},
|
||||||
|
{"label":"K36", "x":7.75, "y":3},
|
||||||
|
{"label":"K37", "x":9.75, "y":3},
|
||||||
|
{"label":"K38", "x":10.75, "y":3},
|
||||||
|
{"label":"K39", "x":11.75, "y":3},
|
||||||
|
{"label":"K3A", "x":12.75, "y":3},
|
||||||
|
{"label":"K3B", "x":13.75, "y":3},
|
||||||
|
{"label":"K4D", "x":14.75, "y":3},
|
||||||
|
{"label":"K3C", "x":15.75, "y":3, "w":1.75},
|
||||||
|
{"label":"K3D", "x":17.5, "y":3},
|
||||||
|
{"label":"K40", "x":1.5, "y":4, "w":1.5},
|
||||||
|
{"label":"K42", "x":4.5, "y":4, "w":1.25},
|
||||||
|
{"label":"K44", "x":5.75, "y":4, "w":2.25},
|
||||||
|
{"label":"K46", "x":8, "y":4, "w":1.25},
|
||||||
|
{"label":"K48", "x":9.75, "y":4, "w":2.75},
|
||||||
|
{"label":"K4A", "x":12.5, "y":4, "w":1.25},
|
||||||
|
{"label":"K4E", "x":17, "y":4, "w":1.5}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright 2020 Team Mechlovin
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_SPC, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
|
||||||
|
KC_SPC, 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_SLSH,
|
||||||
|
KC_SPC, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, MO(1), KC_RSFT, KC_UP,
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL ),
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for adelais
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/* Copyright 2020 Team Mechlovin
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_all(
|
||||||
|
KC_SPC, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL,
|
||||||
|
KC_SPC, 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_SLSH,
|
||||||
|
KC_SPC, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_BSLS, MO(1), KC_RSFT, KC_UP,
|
||||||
|
KC_LCTL, KC_LALT, KC_SPC, MO(2), KC_SPC, KC_RALT, KC_RCTL ),
|
||||||
|
[1] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The VIA keymap for adelais
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Adelais / Adelais En Ciel
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Compatible with TGR Alice and all clone variants.
|
||||||
|
`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered.
|
||||||
|
`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin)
|
||||||
|
* Hardware Supported: Adelais, Adelais En Ciel
|
||||||
|
* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/fr7smq/gb_team_mechlovin_adelais_tgr_alice_clones/)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make mechlovin/adelais/standard_led:default
|
||||||
|
make mechlovin/adelais/rgb_led: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).
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define PRODUCT_ID 0xAEC1
|
||||||
|
#define PRODUCT Adelais En Ciel
|
||||||
|
#define DESCRIPTION Team.Mechlovin Adelais En Ciel
|
||||||
|
|
||||||
|
#define RGB_DI_PIN A7
|
||||||
|
#define DRIVER_LED_TOTAL 91
|
||||||
|
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
|
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
|
||||||
|
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
#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_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
|
||||||
|
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
|
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
RGB_MATRIX_ENABLE = WS2812
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = STM32F303
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
|
||||||
|
DEFAULT_FOLDER = mechlovin/adelais/standard_led
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define PRODUCT_ID 0xAD01
|
||||||
|
#define PRODUCT Adelais
|
||||||
|
#define DESCRIPTION Team.Mechlovin Adelais
|
||||||
|
|
||||||
|
#define BACKLIGHT_PIN B0
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_PWM_DRIVER PWMD3
|
||||||
|
#define BACKLIGHT_PWM_CHANNEL 3
|
||||||
|
|
||||||
|
#define RGB_DI_PIN A7
|
||||||
|
#define RGBLED_NUM 23
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 255
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
BACKLIGHT_DRIVER = pwm
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x6666
|
||||||
|
#define PRODUCT_ID 0x6668
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Pabile
|
||||||
|
#define PRODUCT P18 Macro Pad
|
||||||
|
#define DESCRIPTION An 18-key DIY macropad kit
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
|
||||||
|
/* pin-out for PROMICRO */
|
||||||
|
#define MATRIX_ROW_PINS { D1, D0, D4, C6 }
|
||||||
|
#define MATRIX_COL_PINS { D2, D7, E6, B4, B5 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Encoder position for PROMICRO */
|
||||||
|
#define ENCODERS_PAD_A { B6, F6 }
|
||||||
|
#define ENCODERS_PAD_B { F4, F5 }
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Pabile 18",
|
||||||
|
"url": "https://pabileonline.blogspot.com/",
|
||||||
|
"maintainer": "Pabile",
|
||||||
|
"width": 5.25,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"x":1.25, "y":0},
|
||||||
|
{"x":2.25, "y":0},
|
||||||
|
{"x":3.25, "y":0},
|
||||||
|
{"x":4.25, "y":0},
|
||||||
|
{"x":1.25, "y":1},
|
||||||
|
{"x":2.25, "y":1},
|
||||||
|
{"x":3.25, "y":1},
|
||||||
|
{"x":4.25, "y":1},
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1.25, "y":2},
|
||||||
|
{"x":2.25, "y":2},
|
||||||
|
{"x":3.25, "y":2},
|
||||||
|
{"x":4.25, "y":2},
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1.25, "y":3},
|
||||||
|
{"x":2.25, "y":3},
|
||||||
|
{"x":3.25, "y":3},
|
||||||
|
{"x":4.25, "y":3}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_MUTE, KC_P1, KC_P2, KC_P3, KC_TAB,
|
||||||
|
KC_ESC, KC_DEL, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) { /* First encoder below the controller */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLD); /*volume down*/
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLU); /*volume up*/
|
||||||
|
}
|
||||||
|
} else if (index == 1) { /* Second encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_WH_U); /*mouse wheel up*/
|
||||||
|
} else {
|
||||||
|
tap_code(KC_WH_D); /*mouse wheel down*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "p18.h"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k01, k02, k03, k04, \
|
||||||
|
k11, k12, k13, k14, \
|
||||||
|
k20, k21, k22, k23, k24, \
|
||||||
|
k30, k31, k32, k33, k34 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{KC_NO, k04, k03, k02, k01}, \
|
||||||
|
{KC_NO, k14, k13, k12, k11}, \
|
||||||
|
{k20, k24, k23, k22, k21}, \
|
||||||
|
{k30, k34, k33, k32, k31} \
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# P18
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 18-key DIY Hotswap Macropad that accepts both Pro Micro and Adafruit Feather 32u4 Bluefruit LE.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [pabile](https://github.com/pabile)
|
||||||
|
* Hardware Supported: Pabile P18 PCB with Pro Micro or Adafruit Feather 32u4 Bluefruit LE
|
||||||
|
* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile18)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make pabile/p18: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).
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # 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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
IOS_DEVICE_ENABLE = no # connect to IOS Device
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x6666
|
||||||
|
#define PRODUCT_ID 0x6667
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Pabile
|
||||||
|
#define PRODUCT P20
|
||||||
|
#define DESCRIPTION 5x4 Macropad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 4
|
||||||
|
|
||||||
|
/* pin-out */
|
||||||
|
#define MATRIX_ROW_PINS { B3, B4, B5, D7, E6 }
|
||||||
|
#define MATRIX_COL_PINS { D0, B2, D4, B6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define ENCODERS_PAD_A { F5, F7 }
|
||||||
|
#define ENCODERS_PAD_B { F6, B1 }
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_ortho_5x4(
|
||||||
|
KC_PSLS, KC_PMNS, KC_PAST, KC_MPLY,
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_TAB,
|
||||||
|
LT(2,KC_P0), KC_PCMM, KC_PDOT, LT(1,KC_PENT)),
|
||||||
|
[1] = LAYOUT_ortho_5x4(
|
||||||
|
KC_NLCK, KC_UNDS, KC_NO, KC_NO,
|
||||||
|
KC_AMPR, KC_ASTR, KC_LPRN, KC_EQL,
|
||||||
|
KC_DLR, KC_PERC, KC_CIRC, KC_NO,
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_NO,
|
||||||
|
KC_RPRN, KC_NO, KC_PSLS, KC_NO),
|
||||||
|
[2] = LAYOUT_ortho_5x4(
|
||||||
|
KC_NLCK, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_BTN1, KC_MS_U, KC_BTN2, KC_NO,
|
||||||
|
KC_MS_L, KC_MS_D, KC_MS_R, KC_TAB,
|
||||||
|
KC_WH_U, KC_NO, KC_WH_D, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_DEL, KC_ESC)
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) { /* First encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_WH_U); /*mouse wheel up*/
|
||||||
|
} else {
|
||||||
|
tap_code(KC_WH_D); /*mouse wheel down */
|
||||||
|
}
|
||||||
|
} else if (index == 1) { /* Second encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLD); /*volume down*/
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLU); /*volume up*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "p20.h"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x4( \
|
||||||
|
k00, k01, k02, k03, \
|
||||||
|
k10, k11, k12, k13, \
|
||||||
|
k20, k21, k22, k23, \
|
||||||
|
k30, k31, k32, k33, \
|
||||||
|
k40, k41, k42, k43 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03}, \
|
||||||
|
{k10, k11, k12, k13}, \
|
||||||
|
{k20, k21, k22, k23}, \
|
||||||
|
{k30, k31, k32, k33}, \
|
||||||
|
{k40, k41, k42, k43} \
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# P20
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
A 5x4 grid keyboard with 2 rotary encoders.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [pabile](https://github.com/pabile)
|
||||||
|
* Hardware Supported: Pabile P20 PCB, Pro Micro
|
||||||
|
* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile20)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make pabile/p20: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).
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # 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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
IOS_DEVICE_ENABLE = no # connect to IOS Device
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
|
||||||
|
LAYOUTS = ortho_5x4
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x6666
|
||||||
|
#define PRODUCT_ID 0x6666
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Pabile
|
||||||
|
#define PRODUCT P40 Keyboard
|
||||||
|
#define DESCRIPTION 4x10 staggered keyboard
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 10
|
||||||
|
|
||||||
|
/* pin-out
|
||||||
|
for PCB ver0.01 452019 */
|
||||||
|
#define MATRIX_ROW_PINS { F6, B3, B2, B6 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, B5, B4, E6, D7, C6, D4, D0, D1 }
|
||||||
|
/*
|
||||||
|
for pro micro facing back of pcb
|
||||||
|
#define MATRIX_ROW_PINS { D4, E6, B4, B5 }
|
||||||
|
#define MATRIX_COL_PINS { D1, D0, B6, B2, B3, B1, F7, F6, F5, F4 }
|
||||||
|
*/
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Pabile 40",
|
||||||
|
"url": "https://pabileonline.blogspot.com/",
|
||||||
|
"maintainer": "Pabile",
|
||||||
|
"width": 10.75,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_4x10": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
{"x":4, "y":0},
|
||||||
|
{"x":5, "y":0},
|
||||||
|
{"x":6, "y":0},
|
||||||
|
{"x":7, "y":0},
|
||||||
|
{"x":8, "y":0},
|
||||||
|
{"x":9, "y":0},
|
||||||
|
{"x":0.25, "y":1},
|
||||||
|
{"x":1.25, "y":1},
|
||||||
|
{"x":2.25, "y":1},
|
||||||
|
{"x":3.25, "y":1},
|
||||||
|
{"x":4.25, "y":1},
|
||||||
|
{"x":5.25, "y":1},
|
||||||
|
{"x":6.25, "y":1},
|
||||||
|
{"x":7.25, "y":1},
|
||||||
|
{"x":8.25, "y":1},
|
||||||
|
{"x":9.25, "y":1},
|
||||||
|
{"x":0.5, "y":2},
|
||||||
|
{"x":1.5, "y":2},
|
||||||
|
{"x":2.5, "y":2},
|
||||||
|
{"x":3.5, "y":2},
|
||||||
|
{"x":4.5, "y":2},
|
||||||
|
{"x":5.5, "y":2},
|
||||||
|
{"x":6.5, "y":2},
|
||||||
|
{"x":7.5, "y":2},
|
||||||
|
{"x":8.5, "y":2},
|
||||||
|
{"x":9.5, "y":2},
|
||||||
|
{"x":0.75, "y":3},
|
||||||
|
{"x":1.75, "y":3},
|
||||||
|
{"x":2.75, "y":3},
|
||||||
|
{"x":3.75, "y":3},
|
||||||
|
{"x":4.75, "y":3},
|
||||||
|
{"x":5.75, "y":3},
|
||||||
|
{"x":6.75, "y":3},
|
||||||
|
{"x":7.75, "y":3},
|
||||||
|
{"x":8.75, "y":3},
|
||||||
|
{"x":9.75, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_ortho_4x10(
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3,KC_MINS),
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(4,KC_SLSH),
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, LT(2,KC_BSPC), LT(1,KC_SPC), KC_ENT, KC_APP, KC_DEL, KC_ESC),
|
||||||
|
[1] = LAYOUT_ortho_4x10(
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||||
|
KC_TAB, KC_NO, KC_NO, KC_GRV, KC_LBRC, KC_RBRC, KC_BSLS, KC_SCLN, KC_QUOT, KC_MINS,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_EQL, KC_MINS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
[2] = LAYOUT_ortho_4x10(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||||
|
KC_TAB, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_CAPS, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NLCK, KC_NO, KC_VOLD, KC_VOLU, KC_MUTE,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||||
|
[3] = LAYOUT_ortho_4x10(
|
||||||
|
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_INS, KC_PGUP, KC_UP, KC_PGDN, KC_DEL,
|
||||||
|
KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||||
|
[4] = LAYOUT_ortho_4x10(
|
||||||
|
KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_DEL,
|
||||||
|
KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "p40.h"
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_4x10( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29}, \
|
||||||
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39} \
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# P40
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A compact 4x10 (40%) staggered DIY keyboard kit.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [pabile](https://github.com/pabile)
|
||||||
|
* Hardware Supported: Pabile P40 PCB, Pro Micro
|
||||||
|
* Hardware Availability: [Info at pabileonline.blogspot.com](https://pabileonline.blogspot.com/search/label/pabile40)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make pabile/p40: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).
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # 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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
UNICODE_ENABLE = yes # Unicode
|
||||||
|
IOS_DEVICE_ENABLE = no # connect to IOS Device
|
||||||
|
|
||||||
|
LAYOUTS = ortho_4x10
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x4F42
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER OsciX
|
||||||
|
#define PRODUCT Shambles TKL
|
||||||
|
#define DESCRIPTION A minimalist keyboard with extra tenkeyless keys.
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 13
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { F5, B3, B1, F7 }
|
||||||
|
#define MATRIX_COL_PINS { D3, D1, D0, D4, C6, D7, E6, B4, B5, B6, B2, F4, F6 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#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
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
# define RGBLIGHT_ANIMATIONS
|
||||||
|
# define RGBLED_NUM 0
|
||||||
|
# define RGBLIGHT_HUE_STEP 8
|
||||||
|
# define RGBLIGHT_SAT_STEP 8
|
||||||
|
# define RGBLIGHT_VAL_STEP 8
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Shambles TKL",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "OsciX",
|
||||||
|
"width": 13.25,
|
||||||
|
"height": 4.5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"key_count": 47,
|
||||||
|
"layout": [{"label":"K00", "x":0, "y":0}, {"label":"K01", "x":1.5, "y":0}, {"label":"K02", "x":2.5, "y":0}, {"label":"K03", "x":3.5, "y":0}, {"label":"K04", "x":4.75, "y":0}, {"label":"K05", "x":5.75, "y":0}, {"label":"K06", "x":6.75, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"K08", "x":9, "y":0}, {"label":"K09", "x":10.25, "y":0}, {"label":"K10", "x":11.25, "y":0}, {"label":"K11", "x":12.25, "y":0}, {"label":"K12", "x":0, "y":1.5}, {"label":"K13", "x":1, "y":1.5}, {"label":"K14", "x":2, "y":1.5}, {"label":"K15", "x":3, "y":1.5}, {"label":"K16", "x":4, "y":1.5}, {"label":"K17", "x":5, "y":1.5}, {"label":"K18", "x":6, "y":1.5}, {"label":"K19", "x":7, "y":1.5}, {"label":"K20", "x":8, "y":1.5}, {"label":"K21", "x":9, "y":1.5}, {"label":"K22", "x":10.25, "y":1.25}, {"label":"K23", "x":11.25, "y":1.25}, {"label":"K24", "x":12.25, "y":1.25}, {"label":"K25", "x":0, "y":2.5}, {"label":"K26", "x":1, "y":2.5}, {"label":"K27", "x":2, "y":2.5}, {"label":"K28", "x":3, "y":2.5}, {"label":"K29", "x":4, "y":2.5}, {"label":"K30", "x":5, "y":2.5}, {"label":"K31", "x":6, "y":2.5}, {"label":"K32", "x":7, "y":2.5}, {"label":"K33", "x":8, "y":2.5}, {"label":"K34", "x":9, "y":2.5}, {"label":"K35", "x":11.25, "y":2.5}, {"label":"K36", "x":0.5, "y":3.5}, {"label":"K37", "x":1.5, "y":3.5}, {"label":"K38", "x":2.5, "y":3.5}, {"label":"K39", "x":3.5, "y":3.5}, {"label":"K40", "x":4.5, "y":3.5, "w":2}, {"label":"K41", "x":6.5, "y":3.5}, {"label":"K42", "x":7.5, "y":3.5}, {"label":"K43", "x":8.5, "y":3.5}, {"label":"K44", "x":10.25, "y":3.5}, {"label":"K45", "x":11.25, "y":3.5}, {"label":"K43", "x":12.25, "y":3.5}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#include "shambles.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, KC_RCTL, KC_RALT,
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RSFT, KC_UP,
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_SPC, KC_B, KC_N, KC_M, KC_LEFT, KC_DOWN, KC_RGHT)
|
||||||
|
};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Shambles
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
An Alpha28, with a numpad and nav cluster
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [OsciX](https://github.com/OsciX)
|
||||||
|
* Hardware Supported: Shambles
|
||||||
|
* Hardware Availability: [OsciX/shambles_qmk](https://github.com/OsciX/shambles_qmk)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make shambles: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).
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # 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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "shambles.h"
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, \
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K211, \
|
||||||
|
K300, K301, K302, K303, K305, K306, K307, K308, K310, K311, K312 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012 }, \
|
||||||
|
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112 }, \
|
||||||
|
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO, K211, KC_NO }, \
|
||||||
|
{ K300, K301, K302, K303, KC_NO, K305, K306, K307, K308, KC_NO, K310, K311, K312 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x5058 // "PX"
|
||||||
|
#define PRODUCT_ID 0x5445 // "TE"
|
||||||
|
#define DEVICE_VER 0x1001
|
||||||
|
#define MANUFACTURER Pixlup
|
||||||
|
#define PRODUCT TENKI
|
||||||
|
#define DESCRIPTION Customizable Mechanical Numpad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 4
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { B1, B4, F6, B6, B2 }
|
||||||
|
#define MATRIX_COL_PINS { F4, F5, D4, D0 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#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 D1
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 3 // Number of LEDs
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 10
|
||||||
|
#define RGBLIGHT_VAL_STEP 10
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "TENKI",
|
||||||
|
"url": "https://tokopedia.com/pixlup",
|
||||||
|
"maintainer": "eriqadams",
|
||||||
|
"width": 4,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_5x4": {
|
||||||
|
"layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"Bspc", "x":3, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"=", "x":3, "y":3}, {"label":"0", "x":0, "y":4}, {"label":"PrtScr", "x":1, "y":4}, {"label":".", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_ortho_5x4(
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_BSPC,\
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PEQL,\
|
||||||
|
KC_P0, KC_PSCR , LT(1,KC_PDOT), KC_PENT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_ortho_5x4(
|
||||||
|
KC_TRNS, RGB_HUI, RGB_HUD, RGB_VAD,\
|
||||||
|
KC_TRNS, KC_VOLU, RGB_TOG, RGB_VAI,\
|
||||||
|
KC_MPRV, KC_MUTE, KC_MNXT, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS,\
|
||||||
|
RESET, KC_TRNS, KC_TRNS, RGB_MOD
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_ortho_5x4(
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PPLS,\
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_BSPC,\
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PEQL,\
|
||||||
|
KC_P0, KC_PSCR, LT(1,KC_PDOT), KC_PENT
|
||||||
|
),
|
||||||
|
|
||||||
|
[1] = LAYOUT_ortho_5x4(
|
||||||
|
KC_TRNS, RGB_HUI, RGB_HUD, RGB_VAD,\
|
||||||
|
KC_TRNS, KC_VOLU, RGB_TOG, RGB_VAI,\
|
||||||
|
KC_MPRV, KC_MUTE, KC_MNXT, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS,\
|
||||||
|
RESET, KC_TRNS, KC_TRNS, RGB_MOD
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_ortho_5x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_ortho_5x4(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# TENKI
|
||||||
|

|
||||||
|
|
||||||
|
TENKI is a customizable hotswap mechanical numpad.
|
||||||
|
Supported layout:
|
||||||
|

|
||||||
|
|
||||||
|
Keyboard Maintainer: [eriqadams](https://github.com/eriqadams)
|
||||||
|
Hardware Supported: TENKI PCB, Pro Micro
|
||||||
|
Hardware Availability: [If you're in Indonesia you can purchase here](https://tokopedia.com/pixlup)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make tenki: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).
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = yes # 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_5x4
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "tenki.h"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_5x4( \
|
||||||
|
K00, K01, K02, K03, \
|
||||||
|
K10, K11, K12, K13, \
|
||||||
|
K20, K21, K22, K23, \
|
||||||
|
K30, K31, K32, K33, \
|
||||||
|
K40, K41, K42, K43 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03}, \
|
||||||
|
{ K10, K11, K12, K13}, \
|
||||||
|
{ K20, K21, K22, K23}, \
|
||||||
|
{ K30, K31, K32, K33}, \
|
||||||
|
{ K40, K41, K42, K43} \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
|
enum layer_names { _QWERTY, _COLEMAK, _DVORAK, _LOWER, _RAISE, _ADJUST };
|
||||||
|
|
||||||
enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LOWER, RAISE, ADJUST };
|
enum custom_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, ADJUST };
|
||||||
|
|
||||||
// Aliases to keep the keymap tidy
|
// Aliases to keep the keymap tidy
|
||||||
#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
|
#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
|
||||||
#define RGB_SWR RGB_M_SW // Swirl Animation alias
|
#define RGB_SWR RGB_M_SW // Swirl Animation alias
|
||||||
#define RGB_SNK RGB_M_SN // Snake Animation alias
|
#define RGB_SNK RGB_M_SN // Snake Animation alias
|
||||||
#define MACLOCK LGUI(LCTL(KC_Q)) // Lock my MacBook!
|
#define MACLOCK LGUI(LCTL(KC_Q)) // Lock my MacBook!
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright 2016 Didier Loiseau
|
/* Copyright 2020
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -13,247 +13,421 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef KEYMAP_CANADIAN_MULTILINGUAL_H
|
|
||||||
#define KEYMAP_CANADIAN_MULTILINGUAL_H
|
#pragma once
|
||||||
|
|
||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
|
|
||||||
#ifndef GR2A
|
// clang-format off
|
||||||
# define GR2A(kc) RCTL(kc)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Normal characters
|
/*
|
||||||
// First row
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
#define CSA_SLASH KC_GRV // /
|
* │ / │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │
|
||||||
#define CSA_SLSH CSA_SLASH
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ^ │ Ç │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ È │ À │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ Ù │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ É │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CA_SLSH KC_GRV // /
|
||||||
|
#define CA_1 KC_1 // 1
|
||||||
|
#define CA_2 KC_2 // 2
|
||||||
|
#define CA_3 KC_3 // 3
|
||||||
|
#define CA_4 KC_4 // 4
|
||||||
|
#define CA_5 KC_5 // 5
|
||||||
|
#define CA_6 KC_6 // 6
|
||||||
|
#define CA_7 KC_7 // 7
|
||||||
|
#define CA_8 KC_8 // 8
|
||||||
|
#define CA_9 KC_9 // 9
|
||||||
|
#define CA_0 KC_0 // 0
|
||||||
|
#define CA_MINS KC_MINS // -
|
||||||
|
#define CA_EQL KC_EQL // =
|
||||||
|
// Row 2
|
||||||
|
#define CA_Q KC_Q // Q
|
||||||
|
#define CA_W KC_W // W
|
||||||
|
#define CA_E KC_E // E
|
||||||
|
#define CA_R KC_R // R
|
||||||
|
#define CA_T KC_T // T
|
||||||
|
#define CA_Y KC_Y // Y
|
||||||
|
#define CA_U KC_U // U
|
||||||
|
#define CA_I KC_I // I
|
||||||
|
#define CA_O KC_O // O
|
||||||
|
#define CA_P KC_P // P
|
||||||
|
#define CA_CIRC KC_LBRC // ^ (dead)
|
||||||
|
#define CA_CCED KC_RBRC // Ç
|
||||||
|
// Row 3
|
||||||
|
#define CA_A KC_A // A
|
||||||
|
#define CA_S KC_S // S
|
||||||
|
#define CA_D KC_D // D
|
||||||
|
#define CA_F KC_F // F
|
||||||
|
#define CA_G KC_G // G
|
||||||
|
#define CA_H KC_H // H
|
||||||
|
#define CA_J KC_J // J
|
||||||
|
#define CA_K KC_K // K
|
||||||
|
#define CA_L KC_L // L
|
||||||
|
#define CA_SCLN KC_SCLN // ;
|
||||||
|
#define CA_EGRV KC_QUOT // É
|
||||||
|
#define CA_AGRV KC_NUHS // À
|
||||||
|
// Row 4
|
||||||
|
#define CA_UGRV KC_NUBS // Ù
|
||||||
|
#define CA_Z KC_Z // Z
|
||||||
|
#define CA_X KC_X // X
|
||||||
|
#define CA_C KC_C // C
|
||||||
|
#define CA_V KC_V // V
|
||||||
|
#define CA_B KC_B // B
|
||||||
|
#define CA_N KC_N // N
|
||||||
|
#define CA_M KC_M // M
|
||||||
|
#define CA_COMM KC_COMM // ,
|
||||||
|
#define CA_DOT KC_DOT // .
|
||||||
|
#define CA_EACU KC_SLSH // É
|
||||||
|
|
||||||
// Second row
|
/* Shifted symbols
|
||||||
#define CSA_DEAD_CIRCUMFLEX KC_LBRACKET // dead ^
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
#define CSA_DCRC CSA_DEAD_CIRCUMFLEX
|
* │ \ │ ! │ @ │ # │ $ │ % │ ? │ & │ * │ ( │ ) │ _ │ + │ │
|
||||||
#define CSA_C_CEDILLA KC_RBRACKET // Ç
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
#define CSA_CCED CSA_C_CEDILLA
|
* │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ : │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ ' │ " │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CA_BSLS S(CA_SLSH) // (backslash)
|
||||||
|
#define CA_EXLM S(CA_1) // !
|
||||||
|
#define CA_AT S(CA_2) // @
|
||||||
|
#define CA_HASH S(CA_3) // #
|
||||||
|
#define CA_DLR S(CA_4) // $
|
||||||
|
#define CA_PERC S(CA_5) // %
|
||||||
|
#define CA_QUES S(CA_6) // ?
|
||||||
|
#define CA_AMPR S(CA_7) // &
|
||||||
|
#define CA_ASTR S(CA_8) // *
|
||||||
|
#define CA_LPRN S(CA_9) // (
|
||||||
|
#define CA_RPRN S(CA_0) // )
|
||||||
|
#define CA_UNDS S(CA_MINS) // _
|
||||||
|
#define CA_PLUS S(CA_EQL) // +
|
||||||
|
// Row 2
|
||||||
|
#define CA_DIAE S(CA_CIRC) // ¨ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define CA_COLN S(CA_SCLN) // :
|
||||||
|
// Row 4
|
||||||
|
#define CA_QUOT S(CA_COMM) // '
|
||||||
|
#define CA_DQUO S(CA_DOT) // "
|
||||||
|
|
||||||
// Third row
|
/* AltGr symbols
|
||||||
#define CSA_E_GRAVE KC_QUOT // è
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
#define CSA_EGRV CSA_E_GRAVE
|
* │ | │ │ │ │ ¤ │ │ │ { │ } │ [ │ ] │ │ ¬ │ │
|
||||||
#define CSA_A_GRAVE KC_BSLASH // à
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
#define CSA_AGRV CSA_A_GRAVE
|
* │ │ │ │ € │ │ │ │ │ │ │ │ ` │ ~ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ │ │ │ │ │ │ │ │ ° │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ │ « │ » │ │ │ │ │ │ < │ > │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CA_PIPE ALGR(CA_SLSH) // |
|
||||||
|
#define CA_CURR ALGR(CA_4) // ¤
|
||||||
|
#define CA_LCBR ALGR(CA_7) // {
|
||||||
|
#define CA_RCBR ALGR(CA_8) // }
|
||||||
|
#define CA_LBRC ALGR(CA_9) // [
|
||||||
|
#define CA_RBRC ALGR(CA_0) // ]
|
||||||
|
#define CA_NOT ALGR(CA_EQL) // ¬
|
||||||
|
// Row 2
|
||||||
|
#define CA_EURO ALGR(CA_E) // €
|
||||||
|
#define CA_GRV ALGR(CA_CIRC) // ` (dead)
|
||||||
|
#define CA_DTIL ALGR(CA_CCED) // ~ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define CA_DEG ALGR(CA_SCLN) // °
|
||||||
|
// Row 4
|
||||||
|
#define CA_LDAQ ALGR(CA_X) // «
|
||||||
|
#define CA_RDAQ ALGR(CA_C) // »
|
||||||
|
#define CA_LABK ALGR(CA_DOT) // <
|
||||||
|
#define CA_RABK ALGR(CA_COMM) // >
|
||||||
|
|
||||||
// Fourth row
|
/* Right Ctrl symbols
|
||||||
#define CSA_U_GRAVE KC_NONUS_BSLASH // ù
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
#define CSA_UGRV CSA_U_GRAVE
|
* │ │ ¹ │ ² │ ³ │ ¼ │ ½ │ ¾ │ │ │ │ │ │ ¸ │ │
|
||||||
#define CSA_E_ACUTE KC_SLSH // é
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
#define CSA_ECUT CSA_E_ACUTE
|
* │ │ Ω │ Ł │ Œ │ ¶ │ Ŧ │ ← │ ↓ │ → │ Ø │ Þ │ │ ~ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ Æ │ ß │ Ð │ │ Ŋ │ Ħ │ IJ │ ĸ │ Ŀ │ ´ │ │ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ │ │ │ ¢ │ “ │ ” │ ʼn │ μ │ ― │ ˙ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CA_SUP1 RCTL(CA_1) // ¹
|
||||||
|
#define CA_SUP2 RCTL(CA_2) // ²
|
||||||
|
#define CA_SUP3 RCTL(CA_3) // ³
|
||||||
|
#define CA_QRTR RCTL(CA_4) // ¼
|
||||||
|
#define CA_HALF RCTL(CA_5) // ½
|
||||||
|
#define CA_TQTR RCTL(CA_6) // ¾
|
||||||
|
#define CA_CEDL RCTL(CA_EQL) // ¸ (dead)
|
||||||
|
// Row 2
|
||||||
|
#define CA_OMEG RCTL(CA_Q) // Ω
|
||||||
|
#define CA_LSTR RCTL(CA_W) // Ł
|
||||||
|
#define CA_OE RCTL(CA_E) // Œ
|
||||||
|
#define CA_PARA RCTL(CA_R) // ¶
|
||||||
|
#define CA_TSTR RCTL(CA_T) // Ŧ
|
||||||
|
#define CA_LARR RCTL(CA_Y) // ←
|
||||||
|
#define CA_DARR RCTL(CA_U) // ↓
|
||||||
|
#define CA_RARR RCTL(CA_I) // →
|
||||||
|
#define CA_OSTR RCTL(CA_O) // Ø
|
||||||
|
#define CA_THRN RCTL(CA_P) // Þ
|
||||||
|
#define CA_TILD RCTL(CA_CCED) // ~
|
||||||
|
// Row 3
|
||||||
|
#define CA_AE RCTL(CA_A) // Æ
|
||||||
|
#define CA_SS RCTL(CA_S) // ß
|
||||||
|
#define CA_ETH RCTL(CA_D) // Ð
|
||||||
|
#define CA_ENG RCTL(CA_G) // Ŋ
|
||||||
|
#define CA_HSTR RCTL(CA_H) // Ħ
|
||||||
|
#define CA_IJ RCTL(CA_J) // IJ
|
||||||
|
#define CA_KRA RCTL(CA_K) // ĸ
|
||||||
|
#define CA_LMDT RCTL(CA_L) // Ŀ
|
||||||
|
#define CA_ACUT RCTL(CA_SCLN) // ´ (dead)
|
||||||
|
// Row 4
|
||||||
|
#define CA_CENT RCTL(CA_C) // ¢
|
||||||
|
#define CA_LDQU RCTL(CA_V) // “
|
||||||
|
#define CA_RDQU RCTL(CA_B) // ”
|
||||||
|
#define CA_APSN RCTL(CA_N) // ʼn
|
||||||
|
#define CA_MICR RCTL(CA_M) // μ
|
||||||
|
#define CA_HRZB RCTL(CA_COMM) // ―
|
||||||
|
#define CA_DOTA ALGR(CA_DOT) // ˙ (dead)
|
||||||
|
|
||||||
// Shifted characters
|
/* Shift+Right Ctrl symbols
|
||||||
// First row
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
#define CSA_BACKSLASH LSFT(CSA_SLASH) /* \ */
|
* │ - │ ¡ │ │ £ │ │ ⅜ │ ⅝ │ ⅞ │ ™ │ ± │ │ ¿ │ ˛ │ │
|
||||||
#define CSA_BSLS CSA_BACKSLASH
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
#define CSA_QUESTION LSFT(KC_6) // ?
|
* │ │ │ │ │ ® │ │ ¥ │ ↑ │ ı │ │ │ ° │ ¯ │ │
|
||||||
#define CSA_QEST CSA_QUESTION
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ │ │ § │ │ ª │ │ │ │ │ │ ˝ │ ˇ │ ˘ │ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │ ¦ │ │ │ © │ ‘ │ ’ │ ♪ │ º │ × │ ÷ │ │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define CA_SHYP RCTL(S(CA_SLSH)) // (soft hyphen)
|
||||||
|
#define CA_IEXL RCTL(S(CA_1)) // ¡
|
||||||
|
#define CA_PND RCTL(S(CA_3)) // £
|
||||||
|
#define CA_TEIG RCTL(S(CA_5)) // ⅜
|
||||||
|
#define CA_FEIG RCTL(S(CA_6)) // ⅝
|
||||||
|
#define CA_SEIG RCTL(S(CA_7)) // ⅞
|
||||||
|
#define CA_TM RCTL(S(CA_8)) // ™
|
||||||
|
#define CA_PLMN RCTL(S(CA_9)) // ±
|
||||||
|
#define CA_IQUE RCTL(S(CA_MINS)) // ¿
|
||||||
|
#define CA_OGON RCTL(S(CA_EQL)) // ˛ (dead)
|
||||||
|
// Row 2
|
||||||
|
#define CA_REGD RCTL(S(CA_R)) // ®
|
||||||
|
#define CA_YEN RCTL(S(CA_Y)) // ¥
|
||||||
|
#define CA_UARR RCTL(S(CA_U)) // ↑
|
||||||
|
#define CA_DLSI RCTL(S(CA_I)) // ı
|
||||||
|
#define CA_RNGA RCTL(S(CA_CIRC)) // ° (dead)
|
||||||
|
#define CA_MACR RCTL(S(CA_CCED)) // ¯ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define CA_SECT RCTL(S(CA_S)) // §
|
||||||
|
#define CA_FORD RCTL(S(CA_F)) // ª
|
||||||
|
#define CA_DACU RCTL(S(CA_SCLN)) // ˝ (dead)
|
||||||
|
#define CA_CARN RCTL(S(CA_EGRV)) // ˇ (dead)
|
||||||
|
#define CA_BREV RCTL(S(CA_AGRV)) // ˘ (dead)
|
||||||
|
// Row 4
|
||||||
|
#define CA_BRKP RCTL(S(CA_UGRV)) // ¦
|
||||||
|
#define CA_COPY RCTL(S(CA_C)) // ©
|
||||||
|
#define CA_LSQU RCTL(S(CA_V)) // ‘
|
||||||
|
#define CA_RSQU RCTL(S(CA_B)) // ’
|
||||||
|
#define CA_ENOT RCTL(S(CA_N)) // ♪
|
||||||
|
#define CA_MORD RCTL(S(CA_M)) // º
|
||||||
|
#define CA_MUL RCTL(S(CA_COMM)) // ×
|
||||||
|
#define CA_DIV RCTL(S(CA_DOT)) // ÷
|
||||||
|
|
||||||
// Second row
|
// DEPRECATED
|
||||||
#define CSA_DEAD_TREMA LSFT(CSA_DEAD_CIRCUMFLEX) // dead trema/umlaut/diaresis for ä ë ï ö ü
|
#define GR2A(kc) RCTL(kc)
|
||||||
#define CSA_DTRM CSA_DEAD_TREMA
|
#define CSA_SLASH CA_SLSH
|
||||||
|
#define CSA_SLSH CA_SLSH
|
||||||
// Third row
|
#define CSA_DEAD_CIRCUMFLEX CA_CIRC
|
||||||
// all same as US-QWERTY, or capitalised character of the non-shifted key
|
#define CSA_DCRC CA_CIRC
|
||||||
|
#define CSA_C_CEDILLA CA_CCED
|
||||||
// Fourth row
|
#define CSA_CCED CA_CCED
|
||||||
#define CSA_APOSTROPHE LSFT(KC_COMMA) // '
|
#define CSA_E_GRAVE CA_EGRV
|
||||||
#define CSA_APOS CSA_APOSTROPHE
|
#define CSA_EGRV CA_EGRV
|
||||||
#define CSA_DOUBLE_QUOTE LSFT(KC_DOT) // "
|
#define CSA_A_GRAVE CA_AGRV
|
||||||
#define CSA_DQOT CSA_DOUBLE_QUOTE
|
#define CSA_AGRV CA_AGRV
|
||||||
|
#define CSA_U_GRAVE CA_UGRV
|
||||||
// Alt Gr-ed characters
|
#define CSA_UGRV CA_UGRV
|
||||||
// First row
|
#define CSA_E_ACUTE CA_EACU
|
||||||
#define CSA_PIPE ALGR(CSA_SLASH) // |
|
#define CSA_ECUT CA_EACU
|
||||||
#define CSA_CURRENCY ALGR(KC_4) // ¤
|
#define CSA_BACKSLASH CA_BSLS
|
||||||
#define CSA_CURR CSA_CURRENCY
|
#define CSA_BSLS CA_BSLS
|
||||||
#define CSA_LEFT_CURLY_BRACE ALGR(KC_7) // {
|
#define CSA_QUESTION CA_QUES
|
||||||
#define CSA_LCBR CSA_LEFT_CURLY_BRACE
|
#define CSA_QEST CA_QUES
|
||||||
#define CSA_RIGHT_CURLY_BRACE ALGR(KC_8) // }
|
#define CSA_DEAD_TREMA CA_DIAE
|
||||||
#define CSA_RCBR CSA_RIGHT_CURLY_BRACE
|
#define CSA_DTRM CA_DIAE
|
||||||
#define CSA_LBRACKET ALGR(KC_9) // [
|
#define CSA_APOSTROPHE CA_QUOT
|
||||||
#define CSA_LBRC CSA_LBRACKET
|
#define CSA_APOS CA_QUOT
|
||||||
#define CSA_RBRACKET ALGR(KC_0) // ]
|
#define CSA_DOUBLE_QUOTE CA_DQUO
|
||||||
#define CSA_RBRC CSA_RBRACKET
|
#define CSA_DQOT CA_DQUO
|
||||||
#define CSA_NEGATION ALGR(KC_EQUAL) // ¬
|
#define CSA_PIPE CA_PIPE
|
||||||
#define CSA_NEGT CSA_NEGATION
|
#define CSA_CURRENCY CA_CURR
|
||||||
|
#define CSA_CURR CA_CURR
|
||||||
// Second row
|
#define CSA_LEFT_CURLY_BRACE CA_LCBR
|
||||||
// euro symbol not available on Linux? (X.org)
|
#define CSA_LCBR CA_LCBR
|
||||||
#define CSA_EURO ALGR(KC_E) // €
|
#define CSA_RIGHT_CURLY_BRACE CA_RCBR
|
||||||
#define CSA_DEAD_GRAVE ALGR(CSA_DEAD_CIRCUMFLEX)
|
#define CSA_RCBR CA_RCBR
|
||||||
#define CSA_DGRV CSA_DEAD_GRAVE // dead `
|
#define CSA_LBRACKET CA_LBRC
|
||||||
#define CSA_DEAD_TILDE ALGR(CSA_C_CEDILLA) // ~
|
#define CSA_LBRC CA_LBRC
|
||||||
#define CSA_DTLD CSA_DEAD_TILDE
|
#define CSA_RBRACKET CA_RBRC
|
||||||
|
#define CSA_RBRC CA_RBRC
|
||||||
// Third row
|
#define CSA_NEGATION CA_NOT
|
||||||
#define CSA_DEGREE ALGR(KC_SCOLON) // °
|
#define CSA_NEGT CA_NOT
|
||||||
#define CSA_DEGR CSA_DEGREE
|
#define CSA_EURO CA_EURO
|
||||||
|
#define CSA_DEAD_GRAVE CA_GRV
|
||||||
// Fourth row
|
#define CSA_DGRV CA_GRV
|
||||||
#define CSA_LEFT_GUILLEMET ALGR(KC_Z) // «
|
#define CSA_DEAD_TILDE CA_DTIL
|
||||||
#define CSA_LGIL CSA_LEFT_GUILLEMET
|
#define CSA_DTLD CA_DTIL
|
||||||
#define CSA_RIGHT_GUILLEMET ALGR(KC_X) // »
|
#define CSA_DEGREE CA_DEG
|
||||||
#define CSA_RGIL CSA_RIGHT_GUILLEMET
|
#define CSA_DEGR CA_DEG
|
||||||
#define CSA_LESS ALGR(KC_COMMA) // <
|
#define CSA_LEFT_GUILLEMET CA_LDAQ
|
||||||
#define CSA_GREATER ALGR(KC_DOT) // >
|
#define CSA_LGIL CA_LDAQ
|
||||||
#define CSA_GRTR CSA_GREATER
|
#define CSA_RIGHT_GUILLEMET CA_RDAQ
|
||||||
|
#define CSA_RGIL CA_RDAQ
|
||||||
// Space bar
|
#define CSA_LESS CA_LABK
|
||||||
#define CSA_NON_BREAKING_SPACE ALGR(KC_SPACE)
|
#define CSA_GREATER CA_RABK
|
||||||
#define CSA_NBSP CSA_NON_BREAKING_SPACE
|
#define CSA_GRTR CA_RABK
|
||||||
|
#define CSA_NON_BREAKING_SPACE ALGR(KC_SPC)
|
||||||
// GR2A-ed characters
|
#define CSA_NBSP ALGR(KC_SPC)
|
||||||
// First row
|
#define CSA_SUPERSCRIPT_ONE CA_SUP1
|
||||||
#define CSA_SUPERSCRIPT_ONE GR2A(KC_1) // ¹
|
#define CSA_SUP1 CA_SUP1
|
||||||
#define CSA_SUP1 CSA_SUPERSCRIPT_ONE
|
#define CSA_SUPERSCRIPT_TWO CA_SUP2
|
||||||
#define CSA_SUPERSCRIPT_TWO GR2A(KC_2) // ²
|
#define CSA_SUP2 CA_SUP2
|
||||||
#define CSA_SUP2 CSA_SUPERSCRIPT_TWO
|
#define CSA_SUPERSCRIPT_THREE CA_SUP3
|
||||||
#define CSA_SUPERSCRIPT_THREE GR2A(KC_3) // ³
|
#define CSA_SUP3 CA_SUP3
|
||||||
#define CSA_SUP3 CSA_SUPERSCRIPT_THREE
|
#define CSA_ONE_QUARTER CA_QRTR
|
||||||
#define CSA_ONE_QUARTER GR2A(KC_4) // ¼
|
#define CSA_1QRT CA_QRTR
|
||||||
#define CSA_1QRT CSA_ONE_QUARTER
|
#define CSA_ONE_HALF CA_HALF
|
||||||
#define CSA_ONE_HALF GR2A(KC_5) // ½
|
#define CSA_1HLF CA_HALF
|
||||||
#define CSA_1HLF CSA_ONE_HALF
|
#define CSA_THREE_QUARTERS CA_TQTR
|
||||||
#define CSA_THREE_QUARTERS GR2A(KC_6) // ¾
|
#define CSA_3QRT CA_TQTR
|
||||||
#define CSA_3QRT CSA_THREE_QUARTERS
|
#define CSA_DEAD_CEDILLA CA_CEDL
|
||||||
// nothing on 7-0 and -
|
#define CSA_DCED CA_CEDL
|
||||||
#define CSA_DEAD_CEDILLA GR2A(KC_EQUAL) // dead ¸
|
#define CSA_OMEGA CA_OMEG
|
||||||
#define CSA_DCED CSA_DEAD_CEDILLA
|
#define CSA_OMEG CA_OMEG
|
||||||
|
#define CSA_L_STROKE CA_LSTR
|
||||||
// Second row
|
#define CSA_LSTK CA_LSTR
|
||||||
#define CSA_OMEGA GR2A(KC_Q) // ω
|
#define CSA_OE_LIGATURE CA_OE
|
||||||
#define CSA_OMEG CSA_OMEGA
|
#define CSA_OE CA_OE
|
||||||
#define CSA_L_STROKE GR2A(KC_W) // ł
|
#define CSA_PARAGRAPH CA_PARA
|
||||||
#define CSA_LSTK CSA_L_STROKE
|
#define CSA_PARG CA_PARA
|
||||||
#define CSA_OE_LIGATURE GR2A(KC_E) // œ
|
#define CSA_T_STROKE CA_TSTR
|
||||||
#define CSA_OE CSA_OE_LIGATURE
|
#define CSA_LEFT_ARROW CA_LARR
|
||||||
#define CSA_PARAGRAPH GR2A(KC_R) // ¶
|
#define CSA_LARW CA_LARR
|
||||||
#define CSA_PARG CSA_PARAGRAPH
|
#define CSA_DOWN_ARROW CA_DARR
|
||||||
#define CSA_T_STROKE GR2A(KC_T) // ŧ
|
#define CSA_DARW CA_DARR
|
||||||
#define CSA_LEFT_ARROW GR2A(KC_Y) // ←
|
#define CSA_RIGHT_ARROW CA_RARR
|
||||||
#define CSA_LARW CSA_LEFT_ARROW
|
#define CSA_RARW CA_RARR
|
||||||
#define CSA_DOWN_ARROW GR2A(KC_U) // ↓
|
#define CSA_O_STROKE CA_OSTR
|
||||||
#define CSA_DARW CSA_DOWN_ARROW
|
#define CSA_OSTK CA_OSTR
|
||||||
#define CSA_RIGHT_ARROW GR2A(KC_I) // →
|
#define CSA_THORN CA_THRN
|
||||||
#define CSA_RARW CSA_RIGHT_ARROW
|
#define CSA_THRN CA_THRN
|
||||||
#define CSA_O_STROKE GR2A(KC_O) // ø
|
#define CSA_TILDE CA_TILD
|
||||||
#define CSA_OSTK CSA_O_STROKE
|
#define CSA_TILD CA_TILD
|
||||||
#define CSA_THORN GR2A(KC_P) // þ
|
#define CSA_AE_LIGATURE CA_AE
|
||||||
#define CSA_THRN CSA_THORN
|
#define CSA_AE CA_AE
|
||||||
// nothing on ^
|
#define CSA_SHARP_S CA_SS
|
||||||
#define CSA_TILDE GR2A(CSA_C_CEDILLA) // dead ~
|
#define CSA_SRPS CA_SS
|
||||||
#define CSA_TILD CSA_TILDE
|
#define CSA_ETH CA_ETH
|
||||||
|
#define CSA_ENG CA_ENG
|
||||||
// Third row
|
#define CSA_H_SRTOKE CA_HSTR
|
||||||
#define CSA_AE_LIGATURE GR2A(KC_A) // æ
|
#define CSA_HSTK CA_HSTR
|
||||||
#define CSA_AE CSA_AE_LIGATURE
|
#define CSA_IJ_LIGATURE CA_IJ
|
||||||
#define CSA_SHARP_S GR2A(KC_S) // ß
|
#define CSA_IJ CA_IJ
|
||||||
#define CSA_SRPS CSA_SHARP_S
|
#define CSA_KRA CA_KRA
|
||||||
#define CSA_ETH GR2A(KC_D) // ð
|
#define CSA_L_FLOWN_DOT CA_LMDT
|
||||||
// nothing on F
|
#define CSA_LFLD CA_LMDT
|
||||||
#define CSA_ENG GR2A(KC_G) // ŋ
|
#define CSA_DEAD_ACUTE CA_ACUT
|
||||||
#define CSA_H_SRTOKE GR2A(KC_H) // ħ
|
#define CSA_DACT CA_ACUT
|
||||||
#define CSA_HSTK CSA_H_SRTOKE
|
#define CSA_CENT CA_CENT
|
||||||
#define CSA_IJ_LIGATURE GR2A(KC_J) // ij
|
#define CSA_LEFT_DOUBLE_QUOTE CA_LDQU
|
||||||
#define CSA_IJ CSA_IJ_LIGATURE
|
#define CSA_LDQT CA_LDQU
|
||||||
#define CSA_KRA GR2A(KC_K) // ĸ
|
#define CSA_RIGHT_DOUBLE_QUOTE CA_RDQU
|
||||||
#define CSA_L_FLOWN_DOT GR2A(KC_L) // ŀ
|
#define CSA_RDQT CA_RDQU
|
||||||
#define CSA_LFLD CSA_L_FLOWN_DOT
|
#define CSA_N_APOSTROPHE CA_APSN
|
||||||
#define CSA_DEAD_ACUTE GR2A(KC_SCLN) // dead acute accent
|
#define CSA_NAPO CA_APSN
|
||||||
#define CSA_DACT CSA_DEAD_ACUTE
|
#define CSA_MU CA_MICR
|
||||||
// nothing on È & À
|
#define CSA_HORIZONTAL_BAR CA_HRZB
|
||||||
|
#define CSA_HZBR CA_HRZB
|
||||||
// Fourth row
|
#define CSA_DEAD_DOT_ABOVE CA_DOTA
|
||||||
#define CSA_CENT GR2A(KC_C) // ¢
|
#define CSA_DDTA CA_DOTA
|
||||||
#define CSA_LEFT_DOUBLE_QUOTE GR2A(KC_V) // “
|
#define CSA_SOFT_HYPHEN CA_SHYP
|
||||||
#define CSA_LDQT CSA_LEFT_DOUBLE_QUOTE
|
#define CSA_SHYP CA_SHYP
|
||||||
#define CSA_RIGHT_DOUBLE_QUOTE GR2A(KC_B) // ”
|
#define CSA_INVERTED_EXCLAIM CA_IEXL
|
||||||
#define CSA_RDQT CSA_RIGHT_DOUBLE_QUOTE
|
#define CSA_IXLM CA_IEXL
|
||||||
#define CSA_N_APOSTROPHE GR2A(KC_N) // ʼn (deprecated unicode codepoint)
|
#define CSA_POUND CA_PND
|
||||||
#define CSA_NAPO CSA_N_APOSTROPHE
|
#define CSA_GBP CA_PND
|
||||||
#define CSA_MU GR2A(KC_M) // μ
|
#define CSA_EURO_BIS CA_EURO
|
||||||
#define CSA_HORIZONTAL_BAR GR2A(KC_COMMA) // ―
|
#define CSA_EURB CA_EURO
|
||||||
#define CSA_HZBR CSA_HORIZONTAL_BAR
|
#define CSA_THREE_EIGHTHS CA_TEIG
|
||||||
#define CSA_DEAD_DOT_ABOVE GR2A(KC_DOT) // dead ˙
|
#define CSA_3ON8 CA_TEIG
|
||||||
#define CSA_DDTA CSA_DEAD_DOT_ABOVE
|
#define CSA_FIVE_EIGHTHS CA_FEIG
|
||||||
|
#define CSA_5ON8 CA_FEIG
|
||||||
// GR2A-shifted characters (different from capitalised GR2A-ed characters)
|
#define CSA_SEVEN_EIGHTHS CA_SEIG
|
||||||
// First row
|
#define CSA_7ON8 CA_SEIG
|
||||||
#define CSA_SOFT_HYPHEN GR2A(LSFT(CSA_SLASH)) // soft-hyphen, appears as a hyphen in wrapped word
|
#define CSA_TRADEMARK CA_TM
|
||||||
#define CSA_SHYP CSA_SOFT_HYPHEN
|
#define CSA_TM CA_TM
|
||||||
#define CSA_INVERTED_EXCLAIM GR2A(KC_EXCLAIM) // ¡
|
#define CSA_PLUS_MINUS CA_PLMN
|
||||||
#define CSA_IXLM CSA_INVERTED_EXCLAIM
|
#define CSA_PSMS CA_PLMN
|
||||||
// nothing on 2
|
#define CSA_INVERTED_QUESTION CA_IQUE
|
||||||
#define CSA_POUND GR2A(LSFT(KC_3)) // £
|
#define CSA_IQST CA_IQUE
|
||||||
#define CSA_GBP CSA_POUND_SIGN
|
#define CSA_DEAD_OGONEK CA_OGON
|
||||||
// already on ALGR(KC_E)
|
#define CSA_DOGO CA_OGON
|
||||||
#define CSA_EURO_BIS GR2A(LSFT(KC_4)) // €
|
#define CSA_REGISTERED_TRADEMARK CA_REGD
|
||||||
#define CSA_EURB CSA_EURO_BIS
|
#define CSA_RTM CA_REGD
|
||||||
#define CSA_THREE_EIGHTHS GR2A(LSFT(KC_5)) // ⅜
|
#define CSA_YEN CA_YEN
|
||||||
#define CSA_3ON8 CSA_THREE_EIGHTHS
|
#define CSA_YUAN CA_YEN
|
||||||
#define CSA_FIVE_EIGHTHS GR2A(LSFT(KC_6)) // ⅝
|
#define CSA_UP_ARROW CA_UARR
|
||||||
#define CSA_5ON8 CSA_FIVE_EIGHTHS
|
#define CSA_DOTLESS_I CA_DLSI
|
||||||
#define CSA_SEVEN_EIGHTHS GR2A(LSFT(KC_7)) // ⅞
|
#define CSA_DLSI CA_DLSI
|
||||||
#define CSA_7ON8 CSA_SEVEN_EIGHTHS
|
#define CSA_DEAD_RING CA_RNGA
|
||||||
#define CSA_TRADEMARK GR2A(LSFT(KC_8)) // ™
|
#define CSA_DRNG CA_RNGA
|
||||||
#define CSA_TM CSA_TRADEMARK
|
#define CSA_DEAD_MACRON CA_MACR
|
||||||
#define CSA_PLUS_MINUS GR2A(LSFT(KC_9)) // ±
|
#define CSA_DMCR CA_MACR
|
||||||
#define CSA_PSMS CSA_PLUS_MINUS
|
#define CSA_SECTION CA_SECT
|
||||||
// nothing on 0
|
#define CSA_SECT CA_SECT
|
||||||
#define CSA_INVERTED_QUESTION GR2A(LSFT(KC_MINUS)) // ¿
|
#define CSA_ORDINAL_INDICATOR_A CA_FORD
|
||||||
#define CSA_IQST CSA_INVERTED_QUESTION
|
#define CSA_ORDA CA_FORD
|
||||||
#define CSA_DEAD_OGONEK GR2A(LSFT(KC_EQUAL)) // dead ˛
|
#define CSA_DEAD_DOUBLE_ACUTE CA_DACU
|
||||||
#define CSA_DOGO CSA_DEAD_OGONEK
|
#define CSA_DDCT CA_DACU
|
||||||
|
#define CSA_DEAD_CARON CA_CARN
|
||||||
// Second row
|
#define CSA_DCAR CA_CARN
|
||||||
#define CSA_REGISTERED_TRADEMARK GR2A(LSFT(KC_R)) // ®
|
#define CSA_DEAD_BREVE CA_BREV
|
||||||
#define CSA_RTM CSA_REGISTERED_TRADEMARK
|
#define CSA_DBRV CA_BREV
|
||||||
#define CSA_YEN GR2A(LSFT(KC_Y)) // ¥
|
#define CSA_BROKEN_PIPE CA_BRKP
|
||||||
#define CSA_YUAN CSA_YEN
|
#define CSA_BPIP CA_BRKP
|
||||||
#define CSA_UP_ARROW LSFT(CSA_DOWN_ARROW) // ↑
|
#define CSA_COPYRIGHT CA_COPY
|
||||||
#define CSA_DOTLESS_I GR2A(LSFT(KC_I)) // ı
|
#define CSA_CPRT CA_COPY
|
||||||
#define CSA_DLSI CSA_DOTLESS_I
|
#define CSA_LEFT_QUOTE CA_LSQU
|
||||||
#define CSA_DEAD_RING GR2A(LSFT(CSA_DCRC)) // dead °
|
#define CSA_LQOT CA_LSQU
|
||||||
#define CSA_DRNG CSA_DEAD_RING
|
#define CSA_RIGHT_QUOTE CA_RSQU
|
||||||
#define CSA_DEAD_MACRON GR2A(LSFT(CSA_C_CEDILLA)) // dead ¯
|
#define CSA_RQOT CA_RSQU
|
||||||
#define CSA_DMCR CSA_DEAD_MACRON
|
#define CSA_EIGHTH_NOTE CA_ENOT
|
||||||
|
#define CSA_8NOT CA_ENOT
|
||||||
// Third row
|
#define CSA_ORDINAL_INDICATOR_O CA_MORD
|
||||||
#define CSA_SECTION GR2A(LSFT(KC_S)) // §
|
#define CSA_ORDO CA_MORD
|
||||||
#define CSA_SECT CSA_SECTION
|
#define CSA_TIMES CA_MUL
|
||||||
#define CSA_ORDINAL_INDICATOR_A GR2A(LSFT(KC_F)) // ª
|
#define CSA_TIMS CA_MUL
|
||||||
#define CSA_ORDA CSA_ORDINAL_INDICATOR_A
|
#define CSA_OBELUS CA_DIV
|
||||||
#define CSA_DEAD_DOUBLE_ACUTE LSFT(CSA_DEAD_ACUTE) // ˝
|
#define CSA_OBEL CA_DIV
|
||||||
#define CSA_DDCT CSA_DEAD_DOUBLE_ACUTE
|
#define CSA_DIVISION_SIGN CA_DIV
|
||||||
#define CSA_DEAD_CARON GR2A(LSFT(CSA_E_GRAVE)) // dead ˇ
|
#define CSA_DVSN CA_DIV
|
||||||
#define CSA_DCAR CSA_DEAD_CARON
|
|
||||||
#define CSA_DEAD_BREVE GR2A(LSFT(CSA_A_GRAVE)) // dead ˘
|
|
||||||
#define CSA_DBRV CSA_DEAD_BREVE
|
|
||||||
|
|
||||||
// Fourth row
|
|
||||||
#define CSA_BROKEN_PIPE GR2A(LSFT(CSA_U_GRAVE)) // ¦
|
|
||||||
#define CSA_BPIP CSA_BROKEN_PIPE
|
|
||||||
#define CSA_COPYRIGHT GR2A(LSFT(KC_C)) // ©
|
|
||||||
#define CSA_CPRT CSA_COPYRIGHT
|
|
||||||
#define CSA_LEFT_QUOTE GR2A(LSFT(KC_V)) // ‘
|
|
||||||
#define CSA_LQOT CSA_LEFT_QUOTE
|
|
||||||
#define CSA_RIGHT_QUOTE GR2A(LSFT(KC_B)) // ’
|
|
||||||
#define CSA_RQOT CSA_RIGHT_QUOTE
|
|
||||||
#define CSA_EIGHTH_NOTE GR2A(LSFT(KC_N)) // ♪
|
|
||||||
#define CSA_8NOT CSA_EIGHTH_NOTE
|
|
||||||
#define CSA_ORDINAL_INDICATOR_O GR2A(LSFT(KC_M)) // º
|
|
||||||
#define CSA_ORDO CSA_ORDINAL_INDICATOR_O
|
|
||||||
#define CSA_TIMES GR2A(LSFT(KC_COMMA)) // ×
|
|
||||||
#define CSA_TIMS CSA_TIMES
|
|
||||||
#define CSA_OBELUS GR2A(LSFT(KC_DOT)) // ÷
|
|
||||||
#define CSA_OBEL CSA_OBELUS
|
|
||||||
// more conventional name of the symbol
|
|
||||||
#define CSA_DIVISION_SIGN CSA_OBELUS
|
|
||||||
#define CSA_DVSN CSA_DIVISION_SIGN
|
|
||||||
// TODO GR2A(LSFT(CSA_E_ACUTE))
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -13,66 +13,130 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef KEYMAP_NEO2
|
|
||||||
#define KEYMAP_NEO2
|
#pragma once
|
||||||
|
|
||||||
#include "keymap.h"
|
#include "keymap.h"
|
||||||
#include "keymap_german.h"
|
|
||||||
|
|
||||||
#define NEO_A KC_D
|
// clang-format off
|
||||||
#define NEO_B KC_N
|
|
||||||
#define NEO_C KC_R
|
|
||||||
#define NEO_D DE_OE
|
|
||||||
#define NEO_E KC_F
|
|
||||||
#define NEO_F KC_O
|
|
||||||
#define NEO_G KC_I
|
|
||||||
#define NEO_H KC_U
|
|
||||||
#define NEO_I KC_S
|
|
||||||
#define NEO_J DE_MINS
|
|
||||||
#define NEO_K DE_Z
|
|
||||||
#define NEO_L KC_E
|
|
||||||
#define NEO_M KC_M
|
|
||||||
#define NEO_N KC_J
|
|
||||||
#define NEO_O KC_G
|
|
||||||
#define NEO_P KC_V
|
|
||||||
#define NEO_Q KC_P
|
|
||||||
#define NEO_R KC_K
|
|
||||||
#define NEO_S KC_H
|
|
||||||
#define NEO_T KC_L
|
|
||||||
#define NEO_U KC_A
|
|
||||||
#define NEO_V KC_W
|
|
||||||
#define NEO_W KC_T
|
|
||||||
#define NEO_X KC_Q
|
|
||||||
#define NEO_Y DE_AE
|
|
||||||
#define NEO_Z KC_B
|
|
||||||
#define NEO_AE KC_C
|
|
||||||
#define NEO_OE KC_X
|
|
||||||
#define NEO_UE DE_Y
|
|
||||||
#define NEO_SS DE_UE
|
|
||||||
|
|
||||||
#define NEO_DOT DE_DOT
|
/*
|
||||||
#define NEO_COMM DE_COMM
|
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||||
|
* │ ^ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ ` │ │
|
||||||
|
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||||
|
* │ │ X │ V │ L │ C │ W │ K │ H │ G │ F │ Q │ ß │ ´ │ │
|
||||||
|
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||||
|
* │ L3 │ U │ I │ A │ E │ O │ S │ N │ R │ T │ D │ Y │ L3│ │
|
||||||
|
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||||
|
* │ │L4 │ Ü │ Ö │ Ä │ P │ Z │ B │ M │ , │ . │ J │ │
|
||||||
|
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||||
|
* │ │ │ │ │ │ L4 │ │ │
|
||||||
|
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||||
|
*/
|
||||||
|
// Row 1
|
||||||
|
#define NE_CIRC KC_GRV // ^ (dead)
|
||||||
|
#define NE_1 KC_1 // 1
|
||||||
|
#define NE_2 KC_2 // 2
|
||||||
|
#define NE_3 KC_3 // 3
|
||||||
|
#define NE_4 KC_4 // 4
|
||||||
|
#define NE_5 KC_5 // 5
|
||||||
|
#define NE_6 KC_6 // 6
|
||||||
|
#define NE_7 KC_7 // 7
|
||||||
|
#define NE_8 KC_8 // 8
|
||||||
|
#define NE_9 KC_9 // 9
|
||||||
|
#define NE_0 KC_0 // 0
|
||||||
|
#define NE_MINS KC_MINS // -
|
||||||
|
#define NE_GRV KC_EQL // ` (dead)
|
||||||
|
// Row 2
|
||||||
|
#define NE_X KC_Q // X
|
||||||
|
#define NE_V KC_W // V
|
||||||
|
#define NE_L KC_E // L
|
||||||
|
#define NE_C KC_R // C
|
||||||
|
#define NE_W KC_T // W
|
||||||
|
#define NE_K KC_Y // K
|
||||||
|
#define NE_H KC_U // H
|
||||||
|
#define NE_H KC_I // G
|
||||||
|
#define NE_F KC_O // F
|
||||||
|
#define NE_Q KC_P // Q
|
||||||
|
#define NE_SS KC_LBRC // ß
|
||||||
|
#define NE_ACUT KC_RBRC // ´ (dead)
|
||||||
|
// Row 3
|
||||||
|
#define NE_L3L KC_CAPS // (layer 3)
|
||||||
|
#define NE_U KC_A // U
|
||||||
|
#define NE_I KC_S // I
|
||||||
|
#define NE_A KC_D // A
|
||||||
|
#define NE_E KC_F // E
|
||||||
|
#define NE_O KC_G // O
|
||||||
|
#define NE_S KC_H // S
|
||||||
|
#define NE_N KC_J // N
|
||||||
|
#define NE_R KC_K // R
|
||||||
|
#define NE_T KC_L // T
|
||||||
|
#define NE_D KC_SCLN // D
|
||||||
|
#define NE_Y KC_QUOT // Y
|
||||||
|
#define NE_L3R KC_NUHS // (layer 3)
|
||||||
|
// Row 4
|
||||||
|
#define NE_L4L KC_NUBS // (layer 4)
|
||||||
|
#define NE_UDIA KC_Z // Ü
|
||||||
|
#define NE_ODIA KC_X // Ö
|
||||||
|
#define NE_ADIA KC_C // Ä
|
||||||
|
#define NE_P KC_V // P
|
||||||
|
#define NE_Z KC_B // Z
|
||||||
|
#define NE_B KC_N // B
|
||||||
|
#define NE_M KC_M // M
|
||||||
|
#define NE_COMM KC_COMM // ,
|
||||||
|
#define NE_DOT KC_DOT // .
|
||||||
|
#define NE_J KC_SLSH // J
|
||||||
|
// Row 5
|
||||||
|
#define NE_L4R KC_ALGR // (layer 4)
|
||||||
|
|
||||||
#define NEO_1 DE_1
|
// DEPRECATED
|
||||||
#define NEO_2 DE_2
|
#define NEO_A NE_A
|
||||||
#define NEO_3 DE_3
|
#define NEO_B NE_B
|
||||||
#define NEO_4 DE_4
|
#define NEO_C NE_C
|
||||||
#define NEO_5 DE_5
|
#define NEO_D NE_D
|
||||||
#define NEO_6 DE_6
|
#define NEO_E NE_E
|
||||||
#define NEO_7 DE_7
|
#define NEO_F NE_F
|
||||||
#define NEO_8 DE_8
|
#define NEO_G NE_G
|
||||||
#define NEO_9 DE_9
|
#define NEO_H NE_H
|
||||||
#define NEO_0 DE_0
|
#define NEO_I NE_I
|
||||||
#define NEO_MINS DE_SS
|
#define NEO_J NE_J
|
||||||
|
#define NEO_K NE_K
|
||||||
#define NEO_ACUT DE_PLUS
|
#define NEO_L NE_L
|
||||||
#define NEO_GRV DE_ACUT
|
#define NEO_M NE_M
|
||||||
#define NEO_CIRC DE_CIRC
|
#define NEO_N NE_N
|
||||||
|
#define NEO_O NE_O
|
||||||
#define NEO_L1_L KC_CAPS
|
#define NEO_P NE_P
|
||||||
#define NEO_L1_R DE_HASH
|
#define NEO_Q NE_Q
|
||||||
|
#define NEO_R NE_R
|
||||||
#define NEO_L2_L DE_LESS
|
#define NEO_S NE_S
|
||||||
#define NEO_L2_R KC_ALGR
|
#define NEO_T NE_T
|
||||||
|
#define NEO_U NE_U
|
||||||
#endif
|
#define NEO_V NE_V
|
||||||
|
#define NEO_W NE_W
|
||||||
|
#define NEO_X NE_X
|
||||||
|
#define NEO_Y NE_Y
|
||||||
|
#define NEO_Z NE_Z
|
||||||
|
#define NEO_AE NE_ADIA
|
||||||
|
#define NEO_OE NE_ODIA
|
||||||
|
#define NEO_UE NE_UDIA
|
||||||
|
#define NEO_SS NE_SS
|
||||||
|
#define NEO_DOT NE_DOT
|
||||||
|
#define NEO_COMM NE_COMM
|
||||||
|
#define NEO_1 NE_1
|
||||||
|
#define NEO_2 NE_2
|
||||||
|
#define NEO_3 NE_3
|
||||||
|
#define NEO_4 NE_4
|
||||||
|
#define NEO_5 NE_5
|
||||||
|
#define NEO_6 NE_6
|
||||||
|
#define NEO_7 NE_7
|
||||||
|
#define NEO_8 NE_8
|
||||||
|
#define NEO_9 NE_9
|
||||||
|
#define NEO_0 NE_0
|
||||||
|
#define NEO_MINS NE_MINS
|
||||||
|
#define NEO_ACUT NE_ACUT
|
||||||
|
#define NEO_GRV NE_GRV
|
||||||
|
#define NEO_CIRC NE_CIRC
|
||||||
|
#define NEO_L1_L NE_L3L
|
||||||
|
#define NEO_L1_R NE_L3R
|
||||||
|
#define NEO_L2_L NE_L4L
|
||||||
|
#define NEO_L2_R NE_L4R
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
/* Copyright 2020
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Sendstring lookup tables for Canadian Multilingual layouts
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "keymap_canadian_multilingual.h"
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
const uint8_t ascii_to_shift_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 1, 0, 0, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 1, 1, 1, 1, 1),
|
||||||
|
KCLUT_ENTRY(1, 1, 1, 0, 1, 0, 0, 1),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_altgr_lut[16] PROGMEM = {
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 1, 0, 1, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 0, 1, 0, 0),
|
||||||
|
KCLUT_ENTRY(1, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 0, 0, 0, 0, 0),
|
||||||
|
KCLUT_ENTRY(0, 0, 0, 1, 1, 1, 1, 0)
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t ascii_to_keycode_lut[128] PROGMEM = {
|
||||||
|
// NUL SOH STX ETX EOT ENQ ACK BEL
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// BS TAB LF VT FF CR SO SI
|
||||||
|
KC_BSPC, KC_TAB, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// DLE DC1 DC2 DC3 DC4 NAK SYN ETB
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
// CAN EM SUB ESC FS GS RS US
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
|
// ! " # $ % & '
|
||||||
|
KC_SPC, CA_1, CA_DOT, CA_3, CA_4, CA_5, CA_7, CA_COMM,
|
||||||
|
// ( ) * + , - . /
|
||||||
|
CA_9, CA_0, CA_8, CA_EQL, CA_COMM, CA_MINS, CA_DOT, CA_SLSH,
|
||||||
|
// 0 1 2 3 4 5 6 7
|
||||||
|
CA_0, CA_1, CA_2, CA_3, CA_4, CA_5, CA_6, CA_7,
|
||||||
|
// 8 9 : ; < = > ?
|
||||||
|
CA_8, CA_9, CA_SCLN, CA_SCLN, CA_DOT, CA_EQL, CA_COMM, CA_6,
|
||||||
|
// @ A B C D E F G
|
||||||
|
CA_2, CA_A, CA_B, CA_C, CA_D, CA_E, CA_F, CA_G,
|
||||||
|
// H I J K L M N O
|
||||||
|
CA_H, CA_I, CA_J, CA_K, CA_L, CA_M, CA_N, CA_O,
|
||||||
|
// P Q R S T U V W
|
||||||
|
CA_P, CA_Q, CA_R, CA_S, CA_T, CA_U, CA_V, CA_W,
|
||||||
|
// X Y Z [ \ ] ^ _
|
||||||
|
CA_X, CA_Y, CA_Z, CA_9, CA_SLSH, CA_0, CA_CIRC, CA_MINS,
|
||||||
|
// ` a b c d e f g
|
||||||
|
CA_CIRC, CA_A, CA_B, CA_C, CA_D, CA_E, CA_F, CA_G,
|
||||||
|
// h i j k l m n o
|
||||||
|
CA_H, CA_I, CA_J, CA_K, CA_L, CA_M, CA_N, CA_O,
|
||||||
|
// p q r s t u v w
|
||||||
|
CA_P, CA_Q, CA_R, CA_S, CA_T, CA_U, CA_V, CA_W,
|
||||||
|
// x y z { | } ~ DEL
|
||||||
|
CA_X, CA_Y, CA_Z, CA_7, CA_SLSH, CA_8, CA_CCED, KC_DEL
|
||||||
|
};
|
||||||
@@ -56,7 +56,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
|
|||||||
// Split keyboards need to trigger on key-up for edge-case issue
|
// Split keyboards need to trigger on key-up for edge-case issue
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
#endif
|
#endif
|
||||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case RGB_TOG:
|
case RGB_TOG:
|
||||||
rgblight_toggle();
|
rgblight_toggle();
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ uint8_t unicode_saved_mods;
|
|||||||
|
|
||||||
#if UNICODE_SELECTED_MODES != -1
|
#if UNICODE_SELECTED_MODES != -1
|
||||||
static uint8_t selected[] = {UNICODE_SELECTED_MODES};
|
static uint8_t selected[] = {UNICODE_SELECTED_MODES};
|
||||||
static uint8_t selected_count = sizeof selected / sizeof *selected;
|
static int8_t selected_count = sizeof selected / sizeof *selected;
|
||||||
static uint8_t selected_index;
|
static int8_t selected_index;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void unicode_input_mode_init(void) {
|
void unicode_input_mode_init(void) {
|
||||||
@@ -33,7 +33,7 @@ void unicode_input_mode_init(void) {
|
|||||||
#if UNICODE_SELECTED_MODES != -1
|
#if UNICODE_SELECTED_MODES != -1
|
||||||
# if UNICODE_CYCLE_PERSIST
|
# if UNICODE_CYCLE_PERSIST
|
||||||
// Find input_mode in selected modes
|
// Find input_mode in selected modes
|
||||||
uint8_t i;
|
int8_t i;
|
||||||
for (i = 0; i < selected_count; i++) {
|
for (i = 0; i < selected_count; i++) {
|
||||||
if (selected[i] == unicode_config.input_mode) {
|
if (selected[i] == unicode_config.input_mode) {
|
||||||
selected_index = i;
|
selected_index = i;
|
||||||
@@ -60,9 +60,12 @@ void set_unicode_input_mode(uint8_t mode) {
|
|||||||
dprintf("Unicode input mode set to: %u\n", unicode_config.input_mode);
|
dprintf("Unicode input mode set to: %u\n", unicode_config.input_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cycle_unicode_input_mode(uint8_t offset) {
|
void cycle_unicode_input_mode(int8_t offset) {
|
||||||
#if UNICODE_SELECTED_MODES != -1
|
#if UNICODE_SELECTED_MODES != -1
|
||||||
selected_index = (selected_index + offset) % selected_count;
|
selected_index = (selected_index + offset) % selected_count;
|
||||||
|
if (selected_index < 0) {
|
||||||
|
selected_index += selected_count;
|
||||||
|
}
|
||||||
unicode_config.input_mode = selected[selected_index];
|
unicode_config.input_mode = selected[selected_index];
|
||||||
# if UNICODE_CYCLE_PERSIST
|
# if UNICODE_CYCLE_PERSIST
|
||||||
persist_unicode_input_mode();
|
persist_unicode_input_mode();
|
||||||
@@ -168,6 +171,8 @@ void register_hex32(uint32_t hex) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
void send_unicode_hex_string(const char *str) {
|
void send_unicode_hex_string(const char *str) {
|
||||||
if (!str) {
|
if (!str) {
|
||||||
return;
|
return;
|
||||||
@@ -175,12 +180,11 @@ void send_unicode_hex_string(const char *str) {
|
|||||||
|
|
||||||
while (*str) {
|
while (*str) {
|
||||||
// Find the next code point (token) in the string
|
// Find the next code point (token) in the string
|
||||||
for (; *str == ' '; str++)
|
for (; *str == ' '; str++); // Skip leading spaces
|
||||||
;
|
|
||||||
size_t n = strcspn(str, " "); // Length of the current token
|
size_t n = strcspn(str, " "); // Length of the current token
|
||||||
char code_point[n + 1];
|
char code_point[n+1];
|
||||||
strncpy(code_point, str, n);
|
strncpy(code_point, str, n); // Copy token into buffer
|
||||||
code_point[n] = '\0'; // Make sure it's null-terminated
|
code_point[n] = '\0'; // Make sure it's null-terminated
|
||||||
|
|
||||||
// Normalize the code point: make all hex digits lowercase
|
// Normalize the code point: make all hex digits lowercase
|
||||||
for (char *p = code_point; *p; p++) {
|
for (char *p = code_point; *p; p++) {
|
||||||
@@ -196,8 +200,10 @@ void send_unicode_hex_string(const char *str) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
// Borrowed from https://nullprogram.com/blog/2017/10/06/
|
// Borrowed from https://nullprogram.com/blog/2017/10/06/
|
||||||
const char *decode_utf8(const char *str, int32_t *code_point) {
|
static const char *decode_utf8(const char *str, int32_t *code_point) {
|
||||||
const char *next;
|
const char *next;
|
||||||
|
|
||||||
if (str[0] < 0x80) { // U+0000-007F
|
if (str[0] < 0x80) { // U+0000-007F
|
||||||
@@ -231,7 +237,6 @@ void send_unicode_string(const char *str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32_t code_point = 0;
|
int32_t code_point = 0;
|
||||||
|
|
||||||
while (*str) {
|
while (*str) {
|
||||||
str = decode_utf8(str, &code_point);
|
str = decode_utf8(str, &code_point);
|
||||||
|
|
||||||
@@ -243,53 +248,70 @@ void send_unicode_string(const char *str) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// clang-format off
|
||||||
|
|
||||||
|
static void audio_helper(void) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
switch (get_unicode_input_mode()) {
|
||||||
|
# ifdef UNICODE_SONG_MAC
|
||||||
|
static float song_mac[][2] = UNICODE_SONG_MAC;
|
||||||
|
case UC_MAC:
|
||||||
|
PLAY_SONG(song_mac);
|
||||||
|
break;
|
||||||
|
# endif
|
||||||
|
# ifdef UNICODE_SONG_LNX
|
||||||
|
static float song_lnx[][2] = UNICODE_SONG_LNX;
|
||||||
|
case UC_LNX:
|
||||||
|
PLAY_SONG(song_lnx);
|
||||||
|
break;
|
||||||
|
# endif
|
||||||
|
# ifdef UNICODE_SONG_WIN
|
||||||
|
static float song_win[][2] = UNICODE_SONG_WIN;
|
||||||
|
case UC_WIN:
|
||||||
|
PLAY_SONG(song_win);
|
||||||
|
break;
|
||||||
|
# endif
|
||||||
|
# ifdef UNICODE_SONG_BSD
|
||||||
|
static float song_bsd[][2] = UNICODE_SONG_BSD;
|
||||||
|
case UC_BSD:
|
||||||
|
PLAY_SONG(song_bsd);
|
||||||
|
break;
|
||||||
|
# endif
|
||||||
|
# ifdef UNICODE_SONG_WINC
|
||||||
|
static float song_winc[][2] = UNICODE_SONG_WINC;
|
||||||
|
case UC_WINC:
|
||||||
|
PLAY_SONG(song_winc);
|
||||||
|
break;
|
||||||
|
# endif
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
bool process_unicode_common(uint16_t keycode, keyrecord_t *record) {
|
bool process_unicode_common(uint16_t keycode, keyrecord_t *record) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
|
bool shifted = get_mods() & MOD_MASK_SHIFT;
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case UNICODE_MODE_FORWARD:
|
case UNICODE_MODE_FORWARD:
|
||||||
cycle_unicode_input_mode(+1);
|
cycle_unicode_input_mode(shifted ? -1 : +1);
|
||||||
|
audio_helper();
|
||||||
break;
|
break;
|
||||||
case UNICODE_MODE_REVERSE:
|
case UNICODE_MODE_REVERSE:
|
||||||
cycle_unicode_input_mode(-1);
|
cycle_unicode_input_mode(shifted ? +1 : -1);
|
||||||
|
audio_helper();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNICODE_MODE_MAC:
|
case UNICODE_MODE_MAC ... UNICODE_MODE_WINC: {
|
||||||
set_unicode_input_mode(UC_MAC);
|
// Keycodes and input modes follow the same ordering
|
||||||
#if defined(AUDIO_ENABLE) && defined(UNICODE_SONG_MAC)
|
uint8_t delta = keycode - UNICODE_MODE_MAC;
|
||||||
static float song_mac[][2] = UNICODE_SONG_MAC;
|
set_unicode_input_mode(UC_MAC + delta);
|
||||||
PLAY_SONG(song_mac);
|
audio_helper();
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
case UNICODE_MODE_LNX:
|
|
||||||
set_unicode_input_mode(UC_LNX);
|
|
||||||
#if defined(AUDIO_ENABLE) && defined(UNICODE_SONG_LNX)
|
|
||||||
static float song_lnx[][2] = UNICODE_SONG_LNX;
|
|
||||||
PLAY_SONG(song_lnx);
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
case UNICODE_MODE_WIN:
|
|
||||||
set_unicode_input_mode(UC_WIN);
|
|
||||||
#if defined(AUDIO_ENABLE) && defined(UNICODE_SONG_WIN)
|
|
||||||
static float song_win[][2] = UNICODE_SONG_WIN;
|
|
||||||
PLAY_SONG(song_win);
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
case UNICODE_MODE_BSD:
|
|
||||||
set_unicode_input_mode(UC_BSD);
|
|
||||||
#if defined(AUDIO_ENABLE) && defined(UNICODE_SONG_BSD)
|
|
||||||
static float song_bsd[][2] = UNICODE_SONG_BSD;
|
|
||||||
PLAY_SONG(song_bsd);
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
case UNICODE_MODE_WINC:
|
|
||||||
set_unicode_input_mode(UC_WINC);
|
|
||||||
#if defined(AUDIO_ENABLE) && defined(UNICODE_SONG_WINC)
|
|
||||||
static float song_winc[][2] = UNICODE_SONG_WINC;
|
|
||||||
PLAY_SONG(song_winc);
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(UNICODE_ENABLE)
|
#if defined(UNICODE_ENABLE)
|
||||||
return process_unicode(keycode, record);
|
return process_unicode(keycode, record);
|
||||||
#elif defined(UNICODEMAP_ENABLE)
|
#elif defined(UNICODEMAP_ENABLE)
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ extern uint8_t unicode_saved_mods;
|
|||||||
void unicode_input_mode_init(void);
|
void unicode_input_mode_init(void);
|
||||||
uint8_t get_unicode_input_mode(void);
|
uint8_t get_unicode_input_mode(void);
|
||||||
void set_unicode_input_mode(uint8_t mode);
|
void set_unicode_input_mode(uint8_t mode);
|
||||||
void cycle_unicode_input_mode(uint8_t offset);
|
void cycle_unicode_input_mode(int8_t offset);
|
||||||
void persist_unicode_input_mode(void);
|
void persist_unicode_input_mode(void);
|
||||||
|
|
||||||
void unicode_input_start(void);
|
void unicode_input_start(void);
|
||||||
|
|||||||
Loaded 100 of 133 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user