neo2 port tmk→qmk

This commit is contained in:
alterNERDtive 2024-07-16 14:04:46 +02:00
parent 522bf1daf2
commit 09c8f6fda8
Signed by: alterNERDtive
GPG key ID: E07E88A4921AC397
4 changed files with 331 additions and 0 deletions

View file

@ -0,0 +1 @@
https://i.imgur.com/fKX0Zbs.png

View file

@ -0,0 +1 @@
https://i.imgur.com/giAc3M9.jpg

View file

@ -0,0 +1,314 @@
#include QMK_KEYBOARD_H
#include "version.h"
enum layers {
BASE, // default layer
GAMR, // Gamers Neo2
PRQW, // Poor mans QWERTZ
PRNE, // Poor mans Neo2
LYR4, // hardware layer 4
MDIA, // media keys
};
enum custom_keycodes {
VRSN = SAFE_RANGE,
};
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | F13 | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | X | V | L | W | W | BSPC | | L1 | K | H | G | F | Q | ß |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Delete | U | I | A | E | O |------| |------| S | N | R | T | D | Y |
* |--------+------+------+------+------+------| Enter| | Meh |------+------+------+------+------+--------|
* | T1 ^ | Ü | Ä | Ä | P | Z | | | | B | M | , | . | J | T2 ` |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Prnt | F1 | F2 | F3 | F4 | | F9 | F10 | F11 | F12 | T3 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | F5 | F6 | | F7 | F8 |
* ,------|------|------| |------+------+------.
* | | | Alt | | Ctrl | | |
* | Shift| Mod4 |------| |------| Mod3 | Space|
* | | | Super| | Super| | |
* `--------------------' `--------------------'
*/
[BASE] = LAYOUT_ergodox_pretty(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F13, KC_F14, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, TO(GAMR), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_DEL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, MO(MDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_EQL,
KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F9, KC_F10, KC_F11, KC_F12, KC_RBRC,
KC_F5, KC_F6, KC_F7, KC_F8,
KC_LALT, KC_LCTL,
KC_LSFT, KC_NUBS, KC_LGUI, KC_RGUI, KC_NUHS, KC_SPC
),
/* Keymap 1: Gamers Neo2
*
* This is mostly just the standard Layout for using Neo2. Sadly, some
* Applications (games, anyone?) cannot map the Shift key as a button.
* Therefor this layer moves it to the standard keyboard pinky location and
* puts a space bar in its stead. In addition, the PRINT and T3 keys on the
* bottom edges of the board become CTRL keys, again in their standard
* keyboard position below the SHIFTs.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | F13 | | F14 | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | X | V | L | C | W | BKSP | | L2 | K | H | G | F | Q | ß |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Del | U | I | A | E | O |------| |------| S | N | R | T | D | Y |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LSft | Ü | Ö | Ä | P | Z | RET | | L5 | B | M | , | . | J | RSft |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | LCtrl| F1 | F2 | F3 | F4 | | F9 | F10 | F11 | F12 | RCtrl|
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | F5 | F6 | | F7 | F8 |
* ,------|------|------| |------+------+------.
* | | | LAlt | | RCtrl| | |
* | Space| L4 |------| |------| M3r | Space|
* | | | LGui | | RGui | | |
* `--------------------' `--------------------'
*/
[GAMR] = LAYOUT_ergodox_pretty(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, TO(PRQW), _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT,
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL,
_______, _______, _______, _______,
_______, _______,
KC_SPC,MO(LYR4), _______, _______, _______, _______
),
/* Keymap 2: Poor Mans QWERTZ
*
* This layer is designed for applications that really cant ever stand
* anything else than QWERT[ZY]. With Neo2 active as the OS keyboard
* layout, it builds a virtual QWERTZ on the board.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | F13 | | F14 | 6 | 7 | 8 | 9 | 0 | ß |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | T | Q | W | E | R | BKSP | | L3 | Z | U | I | O | P | Ü |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Del | G | A | S | D | F |------| |------| H | J | K | L | Ö | Ä |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | LSft | B | Y | X | C | V | RET | | L5 | N | M | , | . | - | RSft |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | LCtl | F1 | F2 | F3 | F4 | | F9 | F10 | F11 | F12 | RCtl |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | F5 | F6 | | F7 | F8 |
* ,------|------|------| |------+------+------.
* | | | LAlt | | RCtrl| | |
* | Space| L4 |------| |------| M3r | Space|
* | | | LGui | | RGui | | |
* `--------------------' `--------------------'
*/
[PRQW] = LAYOUT_ergodox_pretty(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_L, KC_P, KC_T, KC_F, KC_K, _______, TO(PRNE), KC_B, KC_A, KC_S, KC_G, KC_V, KC_Z,
_______, KC_I, KC_D, KC_H, KC_SCLN, KC_O, KC_U, KC_SLSH, KC_Y, KC_E, KC_X, KC_C,
KC_LSFT, KC_N, KC_QUOT, KC_Q, KC_R, KC_W, KC_N, _______, KC_J, KC_M, KC_COMM, KC_DOT, KC_MINS, KC_RSFT,
KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL,
_______, _______, _______, _______,
_______, _______,
KC_SPC, MO(LYR4), _______, _______, _______, _______
),
/* Keymap 3: Poor Mans Neo2
*
* For the rare occasions when you have to work on a computer that has no
* way of installing Neo2 in the OS, you can make do with this layer and
* QWERTZ configured on the computer. That as close as possible resembles
* Neo2. Of course, the Shift layer still is as it is in QWERTZ and Neo2
* Layer3 is not possible¹. Layer 4 is again implemented in hardware as far
* as possible.
*
* ¹ Pull requests welcome.
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | F13 | | F14 | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | X | V | L | C | W | BKSP | | L0 | K | H | G | F | Q | ß |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Del | U | I | A | E | O |------| |------| S | N | R | T | D | Y |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | < | Ü | Ö | Ä | P | Z | RET | | L5 | B | M | , | . | J | # |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | Prnt | F1 | F2 | F3 | F4 | | F9 | F10 | F11 | F12 | T3 |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | F5 | F6 | | F7 | F8 |
* ,------|------|------| |------+------+------.
* | | | LAlt | | RCtrl| | |
* | LSft | L4 |------| |------| RAlt | Space|
* | | | LGui | | RGui | | |
* `--------------------' `--------------------'
*/
[PRNE] = LAYOUT_ergodox_pretty(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_X, KC_V, KC_L, KC_C, KC_W, _______, TO(BASE), KC_K, KC_H, KC_G, KC_F, KC_Q, KC_MINS,
_______, KC_U, KC_I, KC_A, KC_E, KC_O, KC_S, KC_N, KC_R, KC_T, KC_D, KC_Z,
KC_NUBS, KC_LBRC, KC_SCLN, KC_QUOT, KC_P, KC_Y, _______, _______, KC_B, _______, _______, _______, KC_J, KC_NUHS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______,
_______,MO(LYR4), _______, _______, KC_RALT, _______
),
/* Keymap 4: Hardware Layer 4
*
* hardware Neo2 layer 4
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | PgUp | BSpc | Up | Del | PgDn | | | | | 7 | 8 | 9 | + | - |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | Home | Left | Down | Right| End |------| |------| | 4 | 5 | 6 | , | . |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | Esc | Tab | Ins | Ret | Undo | | | | | 1 | 2 | 3 | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | LAlt | | RCtrl| | |
* | LSft | |------| |------| | 0 |
* | | | LGui | | RGui | | |
* `--------------------' `--------------------'
*/
[LYR4] = LAYOUT_ergodox_pretty(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, XXXXXXX,
XXXXXXX, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, XXXXXXX,
XXXXXXX, KC_ESC, KC_TAB, KC_INS, KC_ENT, KC_UNDO, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, _______,
_______, XXXXXXX, _______, _______, XXXXXXX, KC_0
),
/* Keymap 5: Media keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Power | | | | | | BOOT | |REBOOT| | | | | CLEAR| BOOT |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | Vol+ | App | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| Mute | Last | Pl/Ps| Next | Stop | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | Vol- | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | F15 | F16 | F17 | | F22 | F23 | F24 | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | F18 | F19 | | F20 | F21 |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
[MDIA] = LAYOUT_ergodox_pretty(
KC_KB_POWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOTLOADER, QK_REBOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_CLEAR_EEPROM, QK_BOOTLOADER,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_KB_VOLUME_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_KB_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_MEDIA_STOP, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_KB_VOLUME_DOWN, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, KC_F15, KC_F16, KC_F17, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX,
KC_F18, KC_F19, KC_F20, KC_F21,
XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
};
// clang-format on
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
case VRSN:
SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
return false;
}
}
return true;
}
// Runs just one time when the keyboard initializes.
void keyboard_post_init_user(void) {
#ifdef RGBLIGHT_COLOR_LAYER_0
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
#endif
};
// Runs whenever there is a layer state change.
layer_state_t layer_state_set_user(layer_state_t state) {
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
uint8_t layer = get_highest_layer(state);
switch (layer) {
case 0:
#ifdef RGBLIGHT_COLOR_LAYER_0
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
#endif
break;
case 1:
ergodox_right_led_1_on();
#ifdef RGBLIGHT_COLOR_LAYER_1
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
#endif
break;
case 2:
ergodox_right_led_2_on();
#ifdef RGBLIGHT_COLOR_LAYER_2
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
#endif
break;
case 3:
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_3
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
#endif
break;
case 4:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
#ifdef RGBLIGHT_COLOR_LAYER_4
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
#endif
break;
case 5:
ergodox_right_led_1_on();
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_5
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
#endif
break;
case 6:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_6
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
#endif
break;
case 7:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
#ifdef RGBLIGHT_COLOR_LAYER_7
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_7);
#endif
break;
default:
break;
}
return state;
};

View file

@ -0,0 +1,15 @@
# ErgoDox EZ Default Configuration
## Changelog
* Dec 2016:
* Added LED keys
* Refreshed layout graphic, comes from http://configure.ergodox-ez.com now.
* Sep 22, 2016:
* Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
* Feb 2, 2016 (V1.1):
* Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
This is what we ship with out of the factory. :) The image says it all:
![Default](https://i.imgur.com/Be53jH7.png)