Merge branch 'master' into promethium

This commit is contained in:
Priyadi Iman Nurcahyo 2017-02-23 18:11:59 +07:00
commit b27a8dea1b
17 changed files with 360 additions and 104 deletions

View file

@ -312,6 +312,8 @@ uint16_t hex_to_keycode(uint8_t hex)
return NEO_E;
case 0xF:
return NEO_F;
default:
return KC_NO;
}
}
}

View file

@ -0,0 +1,166 @@
#include "ergodox.h"
#include "keymap_dvorak.h"
#include "debug.h"
#include "action_layer.h"
/******************************************************************************************
* DVORAK LAYOUT (see http://djelibeibi.unex.es/dvorak/)
* Layer 1: auxiliary keys
* Layer 2: full qwerty layout
*****************************************************************************************/
// LAYERS
#define BASE 0 // dvorak layout (default)
#define AUX 1 // auxiliary keys
// MACROS
/* #define OBRACE 0 // key { or shift */
/* #define CBRACE 1 // key } or shift */
/* #define OBRACK 2 // key [ or left alt */
/* #define CBRACK 3 // key ] or left alt */
/* #define CAPS 4 // caps lock */
// LEDS
#define USB_LED_NUM_LOCK 0
#define USB_LED_CAPS_LOCK 1
#define USB_LED_SCROLL_LOCK 2
#define USB_LED_COMPOSE 3
#define USB_LED_KANA 4
// TIMERS
#define KEY_TAP_FAST 85
#define KEY_TAP_SLOW 95
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Base layer
* Keys with double values (like Esc/Ctrl) correspond to the 'tapped' key and the 'held' key, respectively
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = / + |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | ~ |" / ' |, / < |. / > | P | Y | [ | | ] | F | G | C | H | L | / / ? |
* |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------|
* | Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - / _ |
* |--------+------+------+------+------+------| LGUI | | LGUI |------+------+------+------+------+--------|
* | {/LSft |; / : | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | ~L1 | | ~L1 | | | \ / || |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | HOME | END | | LEFT | RIGHT|
* ,------|------|------| |------+--------+------.
* | BSPC | DEL | PGUP | | UP | SPACE |RETURN|
* | / | / |------| |------| / | / |
* | LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
* `--------------------' `----------------------'
*
*/
[BASE] = KEYMAP(
// left hand
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
KC_TILD, DV_QUOT, DV_COMM,DV_DOT, DV_P, DV_Y, DV_LBRC,
KC_TAB, DV_A, DV_O, DV_E, SFT_T(DV_U), LT(AUX, DV_I),
SFT_T(DV_LBRC), DV_SCLN, DV_Q, DV_J, DV_K, DV_X, KC_LGUI,
KC_NO, KC_NO, KC_NO, KC_NO, MO(AUX),
KC_HOME, KC_END,
KC_PGUP,
CTL_T(KC_BSPC), ALT_T(KC_DEL), KC_PGDN,
// right hand
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, DV_EQL,
DV_RBRC, DV_F, DV_G, DV_C, DV_R, DV_L, DV_SLSH,
LT(AUX, DV_D), SFT_T(DV_H), DV_T, DV_N, DV_S, DV_MINS,
KC_LGUI, DV_B, DV_M, DV_W, DV_V, DV_Z, SFT_T(DV_RBRC),
MO(AUX), KC_NO, KC_NO, KC_BSLS, KC_NO,
KC_LEFT, KC_RIGHT,
KC_UP,
KC_DOWN, ALT_T(KC_ENT), CTL_T(KC_SPC)
),
/* Keymap 1: Aux layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | VolUp | | | | | | SLEEP | PWR | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| | |PSCR |------+-----aan+------+------+------+--------|
* | TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* |CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | TRANS| TRANS| | TRANS| TRANS|
* ,------|------|------| |------+------+------.
* | | | TRANS| | TRANS| | |
* |TRANS |TRANS |------| |------| TRANS| TRANS|
* | | | TRANS| | TRANS| | |
* `--------------------' `--------------------'
*/
[AUX] = KEYMAP(
// left hand
KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP,
KC_VOLD, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_NO,
KC_NO , KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS,
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
LCTL(DV_S), LCTL(DV_Z), LCTL(DV_X), LCTL(DV_C), KC_TRNS,
KC_TRNS , KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_PWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_PAST, KC_NO,
KC_TRNS, KC_4, KC_5, KC_6, KC_PPLS, KC_NO,
KC_PSCR, KC_NO, KC_1, KC_2, KC_3, KC_PSLS, KC_TRNS,
KC_TRNS,KC_DOT, KC_0, KC_PEQL, KC_NO,
KC_TRNS , KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
}

View file

@ -0,0 +1,74 @@
# Ergodox Dvorak Layout with emacs binding in mind - software version
This configuration is the same as the dvorak_emacs layout, but using a sofware dvorak configuration
instead of a firmware configuration. This layout is for those who run their computer in dvorak mode.
* Control & Alt key on the thumbs (activated if pressed with another key).
* In the same way, "U" and "R" are the shift modifier if pressed with another key.
* "I" and "D" set the layer 1 for the auxiliary keys if pressed with another key.
* Software layout set to english.
## Keymap Layers
- L0: dvorak with some customizations (see layout below)
- L1: auxiliary keys (includes function keys, numpad...)
### Keymap 0: Base layer
Keys with double values (like U/LSft) correspond to the 'tapped' key and the 'held' key, respectively
<pre><code>
,--------------------------------------------------. ,--------------------------------------------------.
| | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
| ~ | ' | , | . | P | Y | [ | | ] | F | G | C | H | L | / |
|--------|------|------|------|------|------| { | | } |------|------|------|------|------|--------|
| Tab | A | O | E |U/LSft| I/L1 |------| |------| D/L1|R/RSft| T | N | S | - |
|--------|------|------|------|------|------| LGUI | | LGUI |------|------|------|------|------|--------|
| {/LSft | ; | Q | J | K | X | | | | B | M | W | V | Z | }/RSft |
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
| | | | | ~L1 | | ~L1 | | | \ | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| HOME | END | | LEFT | RIGHT|
,------|------|------| |------|--------|------.
| BSPC | DEL | PGUP | | UP | SPACE |RETURN|
| / | / |------| |------| / | / |
| LCTL | LALT |PGDWN | | DOWN | LALT | LCTL |
`--------------------' `----------------------'
</pre></code>
### Keymap 1: Aux layer
<pre><code>
,--------------------------------------------------. ,--------------------------------------------------.
| VolUp | | | | | | SLEEP | PWR | | | | | | |
|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------|
| VolDn | F1 | F2 | F3 | F4 | | | | | | 7 | 8 | 9 | * | |
|--------|------|------|------|------|------| | | |------|------|------|------|------|--------|
| | F5 | F6 | F7 | F8 | TRANS|------| |------|TRANS | 4 | 5 | 6 | + | |
|--------|------|------|------|------|------| | |PSCR |------|------|------|------|------|--------|
| TRANS | F9 | F10 | F11 | F12 | | | | | | 1 | 2 | 3 | / | TRANS |
`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------'
|CTRL-S|CTRL-Z|CTRL-X|CTRL-C| TRANS| | TRANS| . | 0 | = | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| TRANS| TRANS| | TRANS| TRANS|
,------|------|------| |------|------|------.
| | | TRANS| | TRANS| | |
|TRANS |TRANS |------| |------| TRANS| TRANS|
| | | TRANS| | TRANS| | |
`--------------------' `--------------------'
</pre></code>
## Generation of .hex file
> In the "qmk_firmware/keyboards/ergodox" directory.
> Execute "make dvorak_emacs". Then the hex file "ergodox_ez_dvorak_emacs.hex" is in the root directory : "qmk_firmware".
> Flash with `teensy_loader` binary

View file

@ -8,15 +8,16 @@
#define MDIA 2 // media keys
//macros
#define CTL_SFT_T 100
#define CTL_SFT_G 101
#define CTL_ALT_H 102
#define CTL_SFT_T 100 // open type
#define CTL_SFT_G 101 // find references
#define CTL_ALT_H 102 // open call hierarchy
#define CTL_SFT_R 103 // open resource
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | ESC | | M 100| 6 | 7 | 8 | 9 | 0 | - |
* | = | 1 | 2 | 3 | 4 | 5 | ESC | |M100/3| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* |TAB /Alt| Q | W | E | R | T | Meh | | Meh | Y | U | I | O | P |\ / ALT |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@ -38,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
LT(MDIA, KC_EQL),KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
ALT_T(KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, ALL_T(KC_NO),
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(SYMB),
@ -47,11 +48,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_HOME,
KC_SPC,KC_BSPC,KC_END,
// right hand
M(CTL_SFT_T),KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
MEH_T(KC_NO),KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT),
MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
LALT(KC_LSFT),KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,
LT(M(CTL_SFT_T),
M(CTL_SFT_R)),KC_6, KC_7, KC_8, KC_9, KC_0, LT(MDIA, KC_MINS),
MEH_T(KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), CTL_T(KC_QUOT),
MO(SYMB), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
LALT(KC_LSFT),KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT,
KC_LALT, KC_CAPS,
KC_PGUP,
KC_PGDN,KC_DEL, KC_ENT
@ -101,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 2: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* | | | | | | |RESET | |RESET | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
@ -121,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
@ -130,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
@ -172,6 +174,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
}
return MACRO(U(LCTL), U(LALT), END);
break;
case CTL_SFT_R:
if (record->event.pressed) {
return MACRO(D(LCTL), D(LSFT), T(R), END);
}
return MACRO(U(LCTL), U(LSFT), END);
break;
}
return MACRO_NONE;
};

View file

@ -205,6 +205,7 @@ void matrix_init_user(void) {
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
__attribute__ ((unused))
uint32_t layer0 = layer_state & (1UL << 0),
layer1 = layer_state & (1UL << 1),
layer2 = layer_state & (1UL << 2),

View file

@ -1,8 +1,12 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#ifndef NO_DEBUG
#define NO_DEBUG
#endif
#ifndef NO_PRINT
#define NO_PRINT
#endif
#include "../../config.h"

View file

@ -195,24 +195,20 @@ const uint16_t PROGMEM fn_actions[] = {
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = {
{440.0*pow(2.0,(31)/12.0), 12},
{440.0*pow(2.0,(28)/12.0), 8},
{440.0*pow(2.0,(19)/12.0), 8},
{440.0*pow(2.0,(24)/12.0), 8},
{440.0*pow(2.0,(28)/12.0), 20}
};
float tone_startup[][2] = SONG(STARTUP_SOUND);
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_plover[][2] = SONG(PLOVER_SOUND);
float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float goodbye[][2] = SONG(GOODBYE_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
@ -309,18 +305,35 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
};
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
_delay_ms(20); // stops the tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
#endif
#ifdef AUDIO_ENABLE
startup_user();
#endif
}
#ifdef AUDIO_ENABLE
void play_goodbye_tone()
void startup_user()
{
PLAY_NOTE_ARRAY(goodbye, false, 0);
_delay_ms(150);
_delay_ms(20); // gets rid of tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
}
void shutdown_user()
{
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
_delay_ms(150);
stop_all_notes();
}
void music_on_user(void)
{
music_scale_user();
}
void music_scale_user(void)
{
PLAY_NOTE_ARRAY(music_scale, false, 0);
}
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -25,8 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER XIUDI
#define PRODUCT XD60
#define DESCRIPTION XD60 Keyboard by XIUDI
#define PRODUCT XD60v2
#define DESCRIPTION XD60 v2 Keyboard PCB by XIUDI
/* key matrix size */
#define MATRIX_ROWS 5
@ -46,14 +46,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
#define UNUSED_PINS
/* Backlight Setup */
#define BACKLIGHT_PIN F5
#define BACKLIGHT_LEVELS 6
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
/* RGB Underglow
* F6 PIN for XD60v2 that has pre-soldered WS2812 LEDs
*/
#define RGB_DI_PIN F6
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 6 // Number of LEDs
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

View file

@ -9,56 +9,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
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_NO, KC_ENT, \
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer
KEYMAP(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \
KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \
KC_LSFT, KC_NO, KC_NO, KC_APP, BL_TOGG,BL_DEC, BL_INC, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_NO, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, F(0), KC_HOME, KC_PGDOWN,KC_END),
KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_INS, \
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END),
};
// Custom Actions
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
};
// Macros
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
// MACRODOWN only works in this function
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
if (record->event.pressed) { register_code(KC_RSFT); }
else { unregister_code(KC_RSFT); }
break;
}
return MACRO_NONE;
};
// Loop
void matrix_scan_user(void) {
// Layer LED indicators
uint32_t layer = layer_state;
if (layer & (1<<1)) {
xd60_esc_led_on();
} else {
xd60_esc_led_off();
}
/*
if (layer & (1<<2)) {
xd60_poker_leds_on();
xd60_esc_led_on();
} else {
xd60_poker_leds_off();
xd60_esc_led_off();
}
*/
// Empty
};

View file

@ -8,53 +8,48 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \
F(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(1), KC_UP, KC_DEL, \
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
// 1: Function Layer
KEYMAP(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_STEP, BL_TOGG, KC_DEL, \
KC_CAPS, KC_MPRV, KC_UP, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, \
F(0), KC_LEFT, KC_DOWN, KC_RIGHT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \
KC_LSFT, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_PGUP, KC_INS, \
KC_LSFT, KC_NO, KC_VOLD, KC_MUTE, KC_VOLU,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_INS, \
KC_LCTL, KC_LALT, KC_LGUI, KC_MPLY, KC_RGUI, KC_RALT, KC_HOME, KC_PGDOWN,KC_END),
// 2: RGB Layer
KEYMAP(
KC_NO, BL_TOGG, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
KC_NO, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
KC_NO, KC_NO, RGB_HUD, RGB_SAD, RGB_VAD,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, F(1), KC_NO, KC_NO, \
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
};
// Custom Actions
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
[0] = ACTION_LAYER_MOMENTARY(1), // to Function Layer
[1] = ACTION_LAYER_MOMENTARY(2), // to RGB Layer
};
// Macros
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
// MACRODOWN only works in this function
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
if (record->event.pressed) { register_code(KC_RSFT); }
else { unregister_code(KC_RSFT); }
break;
}
return MACRO_NONE;
};
// Loop
void matrix_scan_user(void) {
// Layer LED indicators
uint32_t layer = layer_state;
if (layer & (1<<1)) {
xd60_wasd_leds_on();
xd60_fn_led_on();
xd60_esc_led_on();
xd60_poker_leds_on();
} else {
xd60_wasd_leds_off();
xd60_fn_led_off();
xd60_esc_led_off();
xd60_poker_leds_off();
}
// Empty
};

View file

@ -1,7 +1,6 @@
# QMK Firmware for XIUDI's 60% XD60 PCB
![Top View of XD60 Keyboard, with DSA Dolch keycaps](./top-view.JPG)
![Angled View of XD60 Keyboard Arrow Cluster, with DSA Dolch keycaps](./arrow-cluster.JPG)
![Top View of a pair of XD60 Keyboard](./xd60.JPG)
## Quantum MK Firmware
For the full Quantum feature list, see [the parent readme.md](/readme.md).
@ -9,5 +8,10 @@ For the full Quantum feature list, see [the parent readme.md](/readme.md).
## Additional Notes
The XD60 is essentially a GH60 rev. C, with support for a right-hand arrow cluster. Includes full compatibility with GH60 expansion boards. Board also supports in-switch LEDs (two-pin, single colour), as well as WS2182 LED strips for underglow lighting. Default keymap included, matching configuration on sale page.
Version 2 PCBs include 6 soldered on RGB underglow LEDs on the bottom, and are labelled "XD60v2" on the top. They are otherwise identical to v1 PCBs.
## Known Issues
In-switch backlight LEDs seem to only support 1 brightness level.
## Build
To build the default keymap, simply run `make xd60-default`.

View file

@ -61,5 +61,5 @@ MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2 MiB

View file

@ -6,24 +6,18 @@
/* XD60 LEDs
* GPIO pads
* 0 F7 WASD LEDs
* 1 F6 ESC LED
* 2 F5 FN LED
* 3 F4 POKER Arrow LEDs
* 0 F7 not connected
* 1 F6 RGB PWM Underglow
* 2 F5 Backlight LED
* 3 F4 not connected
* B2 Capslock LED
* B0 not connected
*/
inline void xd60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); }
inline void xd60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); }
inline void xd60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); }
inline void xd60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); }
inline void xd60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); }
inline void xd60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); }
inline void xd60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
inline void xd60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); }
inline void xd60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
inline void xd60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); }
inline void xd60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
inline void xd60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); }
/* XD60 Keymap Definition Macro */
#define KEYMAP( \

BIN
keyboards/xd60/xd60.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

View file

@ -4,7 +4,9 @@
#include "keymap.h"
// Alt gr
#ifndef ALGR
#define ALGR(kc) RALT(kc)
#endif
#define NO_ALGR KC_RALT
// Normal characters
@ -72,7 +74,7 @@
#define FR_PIPE ALGR(KC_6)
#define FR_GRV ALGR(KC_7)
#define FR_BSLS ALGR(KC_8)
#define FR_CIRC ALGR(KC_9)
#define FR_CCIRC ALGR(KC_9)
#define FR_AT ALGR(KC_0)
#define FR_RBRC ALGR(FR_RPRN)
#define FR_RCBR ALGR(FR_EQL)