mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-12 19:45:44 +00:00
Compare commits
35 Commits
0.5.112
...
planck-4.2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c8e232907f | ||
![]() |
994592f985 | ||
![]() |
4d5b7dea14 | ||
![]() |
4d5eeb3d7d | ||
![]() |
4edfa97e03 | ||
![]() |
5f154f0a00 | ||
![]() |
94f8b758b3 | ||
![]() |
f0db2c0512 | ||
![]() |
8ea690a1b3 | ||
![]() |
b07b4bb97b | ||
![]() |
5b897ce223 | ||
![]() |
da33dfec55 | ||
![]() |
a4316ba486 | ||
![]() |
da83f04a30 | ||
![]() |
9987f9dcff | ||
![]() |
ad73553aa9 | ||
![]() |
00d8f0c082 | ||
![]() |
a729d852fe | ||
![]() |
da7aece043 | ||
![]() |
ed56a6859f | ||
![]() |
ba2ad57ca8 | ||
![]() |
677b89768b | ||
![]() |
7960302242 | ||
![]() |
de315c54eb | ||
![]() |
a6fe0320f5 | ||
![]() |
78ab926cc8 | ||
![]() |
b28982e329 | ||
![]() |
0965e5203e | ||
![]() |
8e1c3f410d | ||
![]() |
2aedbf872b | ||
![]() |
afd7bf5f09 | ||
![]() |
402235eeb4 | ||
![]() |
b2d033ffe8 | ||
![]() |
ae91af95e2 | ||
![]() |
4a9e16b394 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -48,4 +48,4 @@ util/Win_Check_Output.txt
|
||||
|
||||
# things travis sees
|
||||
secrets.tar
|
||||
id_rsa_*
|
||||
id_rsa_*
|
||||
|
4
Makefile
4
Makefile
@@ -551,6 +551,10 @@ test: test-all
|
||||
.PHONY: test-clean
|
||||
test-clean: test-all-clean
|
||||
|
||||
git-submodule:
|
||||
git submodule sync --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
ifdef SKIP_VERSION
|
||||
SKIP_GIT := yes
|
||||
endif
|
||||
|
@@ -92,7 +92,7 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u
|
||||
| KC_RCBR | } |
|
||||
| KC_LABK | < |
|
||||
| KC_RABK | > |
|
||||
| KC_PIPE | | |
|
||||
| KC_PIPE | | |
|
||||
| KC_COLN | : |
|
||||
|
||||
## Mod Tap
|
||||
|
@@ -24,6 +24,7 @@ sort of like macro. Unfortunately, each OS has different ideas on how Unicode is
|
||||
This is the current list of Unicode input method in QMK:
|
||||
|
||||
* UC_OSX: MacOS Unicode Hex Input support. Works only up to 0xFFFF. Disabled by default. To enable: go to System Preferences -> Keyboard -> Input Sources, and enable Unicode Hex.
|
||||
* UC_OSX_RALT: Same as UC_OSX, but sends the Rigt Alt key for unicode input
|
||||
* UC_LNX: Unicode input method under Linux. Works up to 0xFFFFF. Should work almost anywhere on ibus enabled distros. Without ibus, this works under GTK apps, but rarely anywhere else.
|
||||
* UC_WIN: (not recommended) Windows built-in Unicode input. To enable: create registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad`, set its value to 1, and reboot. This method is not recommended because of reliability and compatibility issue, use WinCompose method below instead.
|
||||
* UC_WINC: Windows Unicode input using WinCompose. Requires [WinCompose](https://github.com/samhocevar/wincompose). Works reliably under many (all?) variations of Windows.
|
||||
|
@@ -47,6 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 150
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
||||
|
@@ -2,45 +2,63 @@
|
||||
|
||||
// Tap Dance Declarations
|
||||
enum {
|
||||
ENT_5 = 0
|
||||
ENT_5 = 0,
|
||||
ZERO_7
|
||||
};
|
||||
|
||||
// Macro Declarations
|
||||
enum {
|
||||
DBL_0 = 0
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* LAYER 0
|
||||
* ,-----------------.
|
||||
* | 1 | 2 | 3 |
|
||||
* |-----+-----+-----|
|
||||
* | 4 |5/ENT| 6 | Dbl Tap 5 for Enter
|
||||
* |-----+-----+-----|
|
||||
* | 7 | 8 | FN |
|
||||
* `-----------------'
|
||||
* ,-----------------------.
|
||||
* | 1 | 2 | 3 |
|
||||
* |-------+-------+-------|
|
||||
* | 4 | 5/ENT | 6 | Dbl Tap 5 for Enter
|
||||
* |-------+-------+-------|
|
||||
* | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN
|
||||
* `-----------------------'
|
||||
*/
|
||||
[0] = KEYMAP( \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_4, TD(ENT_5), KC_6, \
|
||||
KC_7, KC_8, MO(1) \
|
||||
KC_1, KC_2, KC_3, \
|
||||
KC_4, TD(ENT_5), KC_6, \
|
||||
TD(ZERO_7), KC_8, LT(1, KC_9) \
|
||||
),
|
||||
|
||||
/* LAYER 1
|
||||
* ,-----------------.
|
||||
* | 9 | 0 | - |
|
||||
* |-----+-----+-----|
|
||||
* | + | * | / |
|
||||
* |-----+-----+-----|
|
||||
* | F1 | F2 | |
|
||||
* `-----------------'
|
||||
* ,-----------------------.
|
||||
* | ESC | + | - |
|
||||
* |-------+-------+-------|
|
||||
* | BSPC | * | / |
|
||||
* |-------+-------+-------|
|
||||
* | 00 | . | |
|
||||
* `-----------------------'
|
||||
*/
|
||||
[1] = KEYMAP( \
|
||||
KC_9, KC_0, KC_MINS, \
|
||||
KC_PLUS, KC_ASTR, KC_SLSH, \
|
||||
KC_F1, KC_F2, KC_TRNS \
|
||||
KC_ESC, KC_PLUS, KC_MINS, \
|
||||
KC_BSPC, KC_ASTR, KC_SLSH, \
|
||||
M(DBL_0), KC_DOT, KC_TRNS \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT)
|
||||
[ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT),
|
||||
[ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0)
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
if (record->event.pressed) {
|
||||
switch(id) {
|
||||
case DBL_0:
|
||||
SEND_STRING("00");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
@@ -8,7 +8,7 @@ A compact minipad (3x3) keyboard made and sold by Bishop Keyboards.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: 9key PCB, Pro Micro ATmega32U4
|
||||
Hardware Availability: [BishopKeyboards.com](https://www.reddit.com/user/se7en9057) (BishopKeyboards.com under renovation)
|
||||
Hardware Availability: [BishopKeyboards.com](http://bishopkeyboards.com/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
|
53
keyboards/bananasplit/keymaps/rask/README.md
Normal file
53
keyboards/bananasplit/keymaps/rask/README.md
Normal file
@@ -0,0 +1,53 @@
|
||||
# rask's BananaSplit60
|
||||
|
||||

|
||||
|
||||
## Notes
|
||||
|
||||
### Layers
|
||||
|
||||
Base layer is a regular HHKBish ANSI layer. Toggling the
|
||||
alternate base layer (Fn3) makes it simpler to play games with
|
||||
the left space being set to be an actual Space.
|
||||
|
||||
Layer 1 (Fn1) contains usual 60% functionalities such as the
|
||||
F-row, while Layer 2 (Fn2) contains media controls.
|
||||
|
||||
The final layer (Fn4) is a special layer that acts as a lock
|
||||
layer, meaning the keyboard is locked while the layer
|
||||
is active. This firmware assumes a lock switch (read below).
|
||||
|
||||
### Lock switches
|
||||
|
||||
1.25u between the split space halves and the 1u key right
|
||||
left of LeftArrow are to be operated with a lock switch.
|
||||
If you don't have lock switches you should swap the `MO()`
|
||||
calls with `TG()` calls to make the layer toggles work
|
||||
with regular non/locking switches.
|
||||
|
||||
## How to make and flash
|
||||
|
||||
(These instructions are for Linux-based operating systems
|
||||
with `dfu-programmer` available.)
|
||||
|
||||
`cd` into the `bananasplit` keyboard's directory and run
|
||||
|
||||
make rask
|
||||
|
||||
which should result in a file called `bananasplit_rask.hex` appearing
|
||||
in your QMK root directory.
|
||||
|
||||
Now plug in your BananaSplit60 keyboard via USB. Verify
|
||||
with `lsusb` that it appears. At least my PCB did not have
|
||||
anything preflashed so you should see `atmega32u4` or similar
|
||||
in the `lsusb` output.
|
||||
|
||||
Now you can flash the firmware by
|
||||
|
||||
$ sudo dfu-programmer atmega32u4 erase
|
||||
$ cd /qmk_firmware/root/directory
|
||||
$ sudo dfu-programmer atmega32u4 flash bananasplit_rask.hex
|
||||
|
||||
_If_ you happen to have some other `atmega32u4` based device
|
||||
I suggest you plug it out before flashing your BS60 just to
|
||||
prevent accidentally flashing your old device.
|
72
keyboards/bananasplit/keymaps/rask/keymap.c
Normal file
72
keyboards/bananasplit/keymaps/rask/keymap.c
Normal file
@@ -0,0 +1,72 @@
|
||||
#include "bananasplit.h"
|
||||
|
||||
// rask's BananaSplit60 layout
|
||||
|
||||
#define L_BASE 0
|
||||
#define L_BASE_ALT 1
|
||||
#define L_ONE 2
|
||||
#define L_TWO 3
|
||||
#define L_LOCK 4
|
||||
|
||||
#define ______ KC_TRNS
|
||||
#define XXXXXX KC_NO
|
||||
|
||||
// L_BASE
|
||||
// Initial layer with default keymap
|
||||
//
|
||||
// L_BASE_ALT
|
||||
// Layer with some standardisation e.g. make
|
||||
// space key "full" to make gaming less of a
|
||||
// chore
|
||||
//
|
||||
// L_ONE
|
||||
// General things like F-row and navigation
|
||||
//
|
||||
// L_TWO
|
||||
// Media controls and more exotic keybinds
|
||||
//
|
||||
// L_LOCK
|
||||
// Lock the keyboard, release to unlock
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[L_BASE] = KEYMAP_HHKB_ARROW( \
|
||||
KC_GRV, 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_DEL, \
|
||||
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, \
|
||||
MO(L_ONE), 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, MT(MOD_RSFT, KC_SLSH), KC_UP, MO(L_TWO), \
|
||||
KC_LCTRL, KC_LGUI, KC_LALT, KC_BSPC, MO(L_BASE_ALT), KC_SPACE, KC_RALT, MO(L_LOCK), KC_LEFT, KC_DOWN, KC_RIGHT \
|
||||
),
|
||||
|
||||
[L_BASE_ALT] = KEYMAP_HHKB_ARROW( \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, KC_SPACE, ______, ______, ______, ______, ______, ______, ______ \
|
||||
),
|
||||
|
||||
[L_ONE] = KEYMAP_HHKB_ARROW( \
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_PGDN, KC_END \
|
||||
|
||||
),
|
||||
|
||||
[L_TWO] = KEYMAP_HHKB_ARROW( \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, \
|
||||
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, KC_MSTP, ______, ______, ______, ______, \
|
||||
______, KC_APP, ______, ______, ______, ______, ______, ______, ______, ______, ______ \
|
||||
),
|
||||
|
||||
[L_LOCK] = KEYMAP_HHKB_ARROW( \
|
||||
XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \
|
||||
XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \
|
||||
XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \
|
||||
XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \
|
||||
XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, ______, XXXXXX, XXXXXX, XXXXXX \
|
||||
),
|
||||
};
|
@@ -2,9 +2,24 @@
|
||||
|
||||
These ARM Teensies are now supported through [ChibiOS](http://chibios.org).
|
||||
|
||||
You'll need to install an ARM toolchain, for instance from [gcc ARM embedded](https://launchpad.net/gcc-arm-embedded) website, or using your favourite package manager. After installing, you should be able to run `arm-none-eabi-gcc -v` in the command prompt and get sensible output. This toolchain is used instead of `avr-gcc`, which is only for AVR chips. Naturally you'll also need the usual development tools (e.g. `make`), just as in the AVR setting.
|
||||
## Installing the ARM toolchain
|
||||
|
||||
Next, you'll need ChibiOS. For Teensies, you'll need code from two repositories: [chibios-main](https://github.com/ChibiOS/ChibiOS) and [chibios-contrib](https://github.com/ChibiOS/ChibiOS). If you're not using git, you can just download a [zip of chibios from here](https://github.com/ChibiOS/ChibiOS/archive/a7df9a891067621e8e1a5c2a2c0ceada82403afe.zip), unpack the zip, and rename/move the unpacked directory (named `ChibiOS-<long_hash_here>`) to `tmk_core/tool/chibios/chibios` (so that the file `tmk_core/tool/chibios/chibios/license.txt` exists). Now the same procedure with a [zip of chibios-contrib from here](https://github.com/ChibiOS/ChibiOS-Contrib/archive/e1311c4db6cd366cf760673f769e925741ac0ad3.zip): unpack and move `ChibiOS-Contrib-<long_hash_here>` to `tmk_core/tool/chibios/chibios-contrib`.
|
||||
You'll need to install an ARM toolchain, there is now a nice documentation about the two AVR/ARM toolchain : https://docs.qmk.fm/getting_started_build_tools.html and you can just run `sudo util/install_dependencies.sh`.
|
||||
This toolchain is used instead of `avr-gcc`, which is only for AVR chips. Naturally you'll also need the usual development tools (e.g. `make`), just as in the AVR setting.
|
||||
|
||||
You can find others way with the [gcc ARM embedded](https://launchpad.net/gcc-arm-embedded) website, or using your favourite package manager. After installing, you should be able to run `arm-none-eabi-gcc -v` in the command prompt and get sensible output.
|
||||
|
||||
## Installing ChibiOS
|
||||
|
||||
Next, you'll need ChibiOS. For Teensies, you'll need code from two repositories: [chibios-main](https://github.com/ChibiOS/ChibiOS) and [chibios-contrib](https://github.com/ChibiOS/ChibiOS).
|
||||
|
||||
### If you’re using git
|
||||
|
||||
Run `git submodule sync —recursive && git submodule update --init —recursive`. This will install ChibiOS and ChibiOS-Contrib in the `/lib/` directory.
|
||||
|
||||
### If you’re not using Git
|
||||
|
||||
If you're not using git, you can just download a [zip of chibios from here](https://github.com/ChibiOS/ChibiOS/archive/a7df9a891067621e8e1a5c2a2c0ceada82403afe.zip), unpack the zip, and rename/move the unpacked directory (named `ChibiOS-<long_hash_here>`) to `lib/chibios/chibios` (so that the file `lib/chibios/chibios/license.txt` exists). Now the same procedure with a [zip of chibios-contrib from here](https://github.com/ChibiOS/ChibiOS-Contrib/archive/e1311c4db6cd366cf760673f769e925741ac0ad3.zip): unpack and move `ChibiOS-Contrib-<long_hash_here>` to `lib/chibios/chibios-contrib`.
|
||||
|
||||
(If you're using git, you can just clone the two repos: [chibios](https://github.com/ChibiOS/ChibiOS) and [chibios-contrib](https://github.com/ChibiOS/ChibiOS-Contrib). However - be warned that things may be somewhat out-of-sync (updates at different rates), so you may need to hunt a bit for the right commits.)
|
||||
|
||||
|
1
keyboards/clueboard/keymaps/tetris/Makefile
Normal file
1
keyboards/clueboard/keymaps/tetris/Makefile
Normal file
@@ -0,0 +1 @@
|
||||
SRC = tetris_text.c
|
209
keyboards/clueboard/keymaps/tetris/keymap.c
Normal file
209
keyboards/clueboard/keymaps/tetris/keymap.c
Normal file
@@ -0,0 +1,209 @@
|
||||
#include "clueboard.h"
|
||||
#include "tetris_text.h"
|
||||
|
||||
// Helpful defines
|
||||
#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
||||
#define _______ KC_TRNS
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
#define _CL 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
F(0), 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_GRV, KC_BSPC, KC_PGUP, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \
|
||||
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_NUHS, KC_ENT, \
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \
|
||||
_______, _______, _______,_______,_______,F(1) ,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \
|
||||
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \
|
||||
_______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END),
|
||||
|
||||
/* Keymap _CL: Control layer
|
||||
*/
|
||||
[_CL] = KEYMAP(
|
||||
_______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \
|
||||
_______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \
|
||||
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
|
||||
MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, MO(_FL), RGB_SAI, \
|
||||
_______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI),
|
||||
};
|
||||
|
||||
/* This is a list of user defined functions. F(N) corresponds to item N
|
||||
of this list.
|
||||
*/
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(0), // Calls action_function()
|
||||
[1] = ACTION_FUNCTION(1)
|
||||
};
|
||||
|
||||
static uint8_t tetris_key_presses = 0;
|
||||
static uint16_t tetris_timer = 0;
|
||||
static uint8_t tetris_running = 0;
|
||||
static int tetris_keypress = 0;
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t mods_pressed;
|
||||
static bool mod_flag;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
// clueboard specific hook to make escape quite tetris
|
||||
if (tetris_running) {
|
||||
tetris_running = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Handle the combined Grave/Esc key
|
||||
*/
|
||||
mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
|
||||
|
||||
if (record->event.pressed) {
|
||||
/* The key is being pressed.
|
||||
*/
|
||||
if (mods_pressed) {
|
||||
mod_flag = true;
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
/* The key is being released.
|
||||
*/
|
||||
if (mod_flag) {
|
||||
mod_flag = false;
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
tetris_running = 1;
|
||||
tetris_timer = 0;
|
||||
tetris_keypress = 0;
|
||||
// set randomness using total number of key presses
|
||||
tetris_start(tetris_key_presses);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up tetris
|
||||
*/
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
tetris_key_presses++;
|
||||
}
|
||||
|
||||
if (tetris_running && record->event.pressed) {
|
||||
tetris_keypress = 0;
|
||||
switch (keycode) {
|
||||
case KC_UP: tetris_keypress = 1; break;
|
||||
case KC_LEFT: tetris_keypress = 2; break;
|
||||
case KC_DOWN: tetris_keypress = 3; break;
|
||||
case KC_RIGHT: tetris_keypress = 4; break;
|
||||
// Make ESC stop tetris (on keyboards other than clueboard)
|
||||
// case KC_ESC: tetris_running = 0; return false;
|
||||
}
|
||||
if (tetris_keypress != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
if (tetris_running) {
|
||||
tetris_timer++;
|
||||
if (tetris_timer > 1000) {
|
||||
// every 1000 times this is run is about 100 ms.
|
||||
if (!tetris_tick(100)) {
|
||||
// game over
|
||||
tetris_running = 0;
|
||||
}
|
||||
tetris_timer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void send_keycode(uint16_t keycode) {
|
||||
register_code(keycode);
|
||||
unregister_code(keycode);
|
||||
}
|
||||
|
||||
void send_keycode_shift(uint16_t keycode) {
|
||||
register_code(KC_LSFT);
|
||||
register_code(keycode);
|
||||
unregister_code(keycode);
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
|
||||
void tetris_send_up(void) {
|
||||
send_keycode(KC_UP);
|
||||
}
|
||||
void tetris_send_left(void) {
|
||||
send_keycode(KC_LEFT);
|
||||
}
|
||||
void tetris_send_down(void) {
|
||||
send_keycode(KC_DOWN);
|
||||
}
|
||||
void tetris_send_right(void) {
|
||||
send_keycode(KC_RGHT);
|
||||
}
|
||||
void tetris_send_backspace(void) {
|
||||
send_keycode(KC_BSPC);
|
||||
}
|
||||
void tetris_send_delete(void) {
|
||||
send_keycode(KC_DEL);
|
||||
}
|
||||
|
||||
void tetris_send_string(const char *s) {
|
||||
for (int i = 0; s[i] != 0; i++) {
|
||||
if (s[i] >= 'a' && s[i] <= 'z') {
|
||||
send_keycode(KC_A + (s[i] - 'a'));
|
||||
} else if (s[i] >= 'A' && s[i] <= 'Z') {
|
||||
send_keycode_shift(KC_A + (s[i] - 'A'));
|
||||
} else if (s[i] >= '1' && s[i] <= '9') {
|
||||
send_keycode(KC_1 + (s[i] - '1'));
|
||||
} else {
|
||||
switch (s[i]) {
|
||||
case ' ': send_keycode(KC_SPACE); break;
|
||||
case '.': send_keycode(KC_DOT); break;
|
||||
case '0': send_keycode(KC_0); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tetris_send_newline(void) {
|
||||
send_keycode(KC_ENT);
|
||||
}
|
||||
|
||||
int tetris_get_keypress(void) {
|
||||
int out = tetris_keypress;
|
||||
tetris_keypress = 0;
|
||||
return out;
|
||||
}
|
33
keyboards/clueboard/keymaps/tetris/readme.md
Normal file
33
keyboards/clueboard/keymaps/tetris/readme.md
Normal file
@@ -0,0 +1,33 @@
|
||||
Default layout but with a tetris game
|
||||
=====================================
|
||||
Tetris works by outputting key-presses to make ascii-art in a regular text editor.
|
||||
It reads key presses to rotate and move the bricks like a regular tetris game.
|
||||
|
||||
Example
|
||||
=======
|
||||

|
||||
|
||||
Usage
|
||||
=====
|
||||
1) Open a default text editor
|
||||
2) Press the tetris button (Fn + t)
|
||||
3) Play tetris
|
||||
|
||||
It makes ascii-art by sending keycodes: left, right, up, down, qwerty characters, and numbers.
|
||||
|
||||
Problems
|
||||
========
|
||||
Drawing ascii-art is too slow to make a pleasant playing experience.
|
||||
While drawing ascii-art, the keyboard does not record key-presses, so its pretty unresponsive.
|
||||
|
||||
Adds 5000 bytes to the hex file.
|
||||
|
||||
Implement in other keyboards
|
||||
============================
|
||||
- Copy-paste the files tetris_text.c and tetrix_text.h to your keymap folder.
|
||||
- Add/update your-keyboard/your-keymap/Makefile to include ``SRC = tetris_text.c``
|
||||
- Copy-paste the tetris-related code from this keymap.c to yours.
|
||||
- Set a key to trigger F(1) to start tetris mode.
|
||||
- Its also a good idea to set a key to stop tetris, here its escape.
|
||||
|
||||
You can find a simple tetris keyboard definition at <https://github.com/danamlund/meckb_tetris/>
|
505
keyboards/clueboard/keymaps/tetris/tetris_text.c
Normal file
505
keyboards/clueboard/keymaps/tetris/tetris_text.c
Normal file
@@ -0,0 +1,505 @@
|
||||
/* Copyright 2017 Dan Amlund Thomsen
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "tetris_text.h"
|
||||
|
||||
static char empty_piece[7][7] = { { 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0, 0, 0, 0, 0, 0, 0 } };
|
||||
|
||||
static char temp_piece[7][7];
|
||||
|
||||
static int curx = 0;
|
||||
static int cury = 0;
|
||||
|
||||
static void clear_piece(char piece[7][7]) {
|
||||
for (int y = 0; y < 7; y++) {
|
||||
for (int x = 0; x < 7; x++) {
|
||||
piece[x][y] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void copy_piece_from_to(char from[7][7], char to[7][7]) {
|
||||
for (int y = 0; y < 7; y++) {
|
||||
for (int x = 0; x < 7; x++) {
|
||||
to[x][y] = from[x][y];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void rotate_piece(char piece[7][7]) {
|
||||
// transpose
|
||||
for (int y = 0; y < 7; y++) {
|
||||
for (int x = y + 1; x < 7; x++) {
|
||||
char tmp = piece[y][x];
|
||||
piece[y][x] = piece[x][y];
|
||||
piece[x][y] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
// reverse rows
|
||||
for (int y = 0; y < 7; y++) {
|
||||
for (int x = 0; x < 3; x++) {
|
||||
char tmp = piece[y][6 - x];
|
||||
piece[y][6 - x] = piece[y][x];
|
||||
piece[y][x] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static char get_shape_char(int shape) {
|
||||
switch (shape) {
|
||||
case 0: return 'I';
|
||||
case 1: return 'J';
|
||||
case 2: return 'L';
|
||||
case 3: return 'O';
|
||||
case 4: return 'S';
|
||||
case 5: return 'T';
|
||||
case 6: return 'Z';
|
||||
}
|
||||
return 'Q';
|
||||
}
|
||||
|
||||
static void set_piece(char piece[7][7], int shape, int rotation) {
|
||||
clear_piece(piece);
|
||||
switch (shape) {
|
||||
case 0:
|
||||
if (rotation % 2 == 0) {
|
||||
// xxXx
|
||||
piece[3][1] = 1;
|
||||
piece[3][2] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[3][4] = 1;
|
||||
} else {
|
||||
// x
|
||||
// x
|
||||
// X
|
||||
// x
|
||||
piece[1][3] = 1;
|
||||
piece[2][3] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[4][3] = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
// xXx
|
||||
// x
|
||||
piece[3][2] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[3][4] = 1;
|
||||
piece[4][4] = 1;
|
||||
for (int i = 0; i < rotation; i++) {
|
||||
rotate_piece(piece);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
// xXx
|
||||
// x
|
||||
piece[3][2] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[3][4] = 1;
|
||||
piece[4][2] = 1;
|
||||
for (int i = 0; i < rotation; i++) {
|
||||
rotate_piece(piece);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
// xX
|
||||
// xx
|
||||
piece[3][2] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[4][2] = 1;
|
||||
piece[4][3] = 1;
|
||||
break;
|
||||
case 4:
|
||||
if (rotation % 2 == 0) {
|
||||
// xX
|
||||
// xx
|
||||
piece[3][2] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[4][3] = 1;
|
||||
piece[4][4] = 1;
|
||||
} else {
|
||||
// x
|
||||
// xX
|
||||
// x
|
||||
piece[2][3] = 1;
|
||||
piece[3][2] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[4][2] = 1;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
// xXx
|
||||
// x
|
||||
piece[3][2] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[3][4] = 1;
|
||||
piece[4][3] = 1;
|
||||
for (int i = 0; i < rotation; i++) {
|
||||
rotate_piece(piece);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (rotation % 2 == 0) {
|
||||
// Xx
|
||||
// xx
|
||||
piece[3][3] = 1;
|
||||
piece[3][4] = 1;
|
||||
piece[4][2] = 1;
|
||||
piece[4][3] = 1;
|
||||
} else {
|
||||
// x
|
||||
// Xx
|
||||
// x
|
||||
piece[2][3] = 1;
|
||||
piece[3][3] = 1;
|
||||
piece[3][4] = 1;
|
||||
piece[4][4] = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void send_deletes(int deletes) {
|
||||
for (int i = 0; i < deletes; i++) {
|
||||
tetris_send_delete();
|
||||
}
|
||||
}
|
||||
|
||||
static void send_backspaces(int backspaces) {
|
||||
for (int i = 0; i < backspaces; i++) {
|
||||
tetris_send_backspace();
|
||||
curx--;
|
||||
}
|
||||
}
|
||||
|
||||
static void send_goto_xy(int x, int y) {
|
||||
while (curx < x) {
|
||||
tetris_send_right();
|
||||
curx++;
|
||||
}
|
||||
while (curx > x) {
|
||||
tetris_send_left();
|
||||
curx--;
|
||||
}
|
||||
while (cury < y) {
|
||||
tetris_send_down();
|
||||
cury++;
|
||||
}
|
||||
while (cury > y) {
|
||||
tetris_send_up();
|
||||
cury--;
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_row(char c, const char oldrow[7], const char newrow[7], int x, int y) {
|
||||
char str[2] = { c, 0 };
|
||||
char row_is_del[7] = { 0 };
|
||||
int first = -1;
|
||||
int last = -1;
|
||||
for (int px = 0; px < 7; px++) {
|
||||
if (oldrow[px] && !newrow[px]) {
|
||||
row_is_del[px] = 1;
|
||||
}
|
||||
if (newrow[px] || oldrow[px]) {
|
||||
if (first == -1) first = px;
|
||||
last = px;
|
||||
}
|
||||
}
|
||||
|
||||
if (first >= 0) {
|
||||
if (curx > x + last + 1) {
|
||||
send_goto_xy(x + last + 1, cury);
|
||||
}
|
||||
if (curx < x + first) {
|
||||
send_goto_xy(x + first, cury);
|
||||
}
|
||||
send_goto_xy(curx, y);
|
||||
send_deletes((x + last + 1) - curx);
|
||||
send_backspaces(curx - (x + first));
|
||||
for (int i = first; i <= last; i++) {
|
||||
if (row_is_del[i]) {
|
||||
tetris_send_string(".");
|
||||
} else {
|
||||
tetris_send_string(str);
|
||||
}
|
||||
curx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void move_piece_from_to(char from[7][7], char to[7][7], int xadd, int yadd) {
|
||||
for (int y = 0; y < 7; y++) {
|
||||
for (int x = 0; x < 7; x++) {
|
||||
if (x + xadd >= 0 && x + xadd < 7 && y + yadd >= 0 && y + yadd < 7) {
|
||||
to[y][x] = from[y + yadd][x + xadd];
|
||||
} else {
|
||||
to[y][x] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_piece(char c, int x, int y, char oldpiece[7][7], char piece[7][7]) {
|
||||
for (int py = 0; py < 7; py++) {
|
||||
draw_row(c, oldpiece[py], piece[py], x, y + py);
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_piece_moved(char c, int x, int y, char piece[7][7], int oldxadd, int oldyadd) {
|
||||
move_piece_from_to(piece, temp_piece, oldxadd, oldyadd);
|
||||
draw_piece(c, x, y, temp_piece, piece);
|
||||
}
|
||||
|
||||
static int is_piece_hitting(char board[20][10], char piece[7][7], int x, int y) {
|
||||
for (int py = 0; py < 7; py++) {
|
||||
for (int px = 0; px < 7; px++) {
|
||||
if (piece[py][px] &&
|
||||
(px + x >= 10 || px + x < 0
|
||||
|| py + y >= 20 || py + y < 0
|
||||
|| board[py + y][px + x])) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void add_piece_to_board(char piece[7][7], char board[20][10], int x, int y) {
|
||||
for (int py = 0; py < 7; py++) {
|
||||
for (int px = 0; px < 7; px++) {
|
||||
if (piece[py][px]) {
|
||||
board[py + y][px + x] = piece[py][px];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_board_line(void) {
|
||||
//send_string("l l");
|
||||
tetris_send_string("l..........l");
|
||||
tetris_send_newline();
|
||||
}
|
||||
static void init(void) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
draw_board_line();
|
||||
}
|
||||
tetris_send_string("doooooooooob");
|
||||
curx = 12;
|
||||
cury = 20;
|
||||
}
|
||||
|
||||
static int get_piece_min_y(char piece[7][7]) {
|
||||
for (int y = 0; y < 7; y++) {
|
||||
for (int x = 0; x < 7; x++) {
|
||||
if (piece[y][x])
|
||||
return y;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int clear_lines(char board[20][10]) {
|
||||
int cleared_lines = 0;
|
||||
for (int y = 19; y >= 0; y--) {
|
||||
char isfull = 1;
|
||||
for (int x = 0; x < 10; x++) {
|
||||
if (!board[y][x]) {
|
||||
isfull = 0;
|
||||
}
|
||||
}
|
||||
if (isfull) {
|
||||
// delete clear line
|
||||
send_goto_xy(12, y);
|
||||
send_backspaces(12); // delete line contents
|
||||
// delete newline
|
||||
tetris_send_backspace();
|
||||
cury--;
|
||||
curx = 12;
|
||||
cleared_lines++;
|
||||
} else {
|
||||
if (cleared_lines > 0) {
|
||||
// move cleared lines down on board
|
||||
for (int x = 0; x < 10; x++) {
|
||||
board[y + cleared_lines][x] = board[y][x];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// clear cleared top lines
|
||||
for (int y = 0; y < cleared_lines; y++) {
|
||||
for (int x = 0; x < 10; x++) {
|
||||
board[y][x] = 0;
|
||||
}
|
||||
}
|
||||
if (cleared_lines > 0) {
|
||||
send_goto_xy(0, 0);
|
||||
for (int i = 0; i < cleared_lines; i++) {
|
||||
draw_board_line();
|
||||
curx = 0;
|
||||
cury++;
|
||||
}
|
||||
}
|
||||
return cleared_lines;
|
||||
}
|
||||
|
||||
static uint8_t myrandom(uint8_t seed) {
|
||||
uint8_t out = seed >> 1;
|
||||
if (seed & 1) {
|
||||
out = out ^ 0xB8;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
static char piece[7][7];
|
||||
static char board[20][10];
|
||||
static uint8_t r;
|
||||
static int score;
|
||||
static int x;
|
||||
static int y;
|
||||
static int shape;
|
||||
static int rotation;
|
||||
static int time;
|
||||
static int next_down;
|
||||
static int down_delay;
|
||||
static int first_run;
|
||||
static int game_over;
|
||||
|
||||
void tetris_start(uint8_t seed) {
|
||||
for (int y = 0; y < 20; y++) {
|
||||
for (int x = 0; x < 10; x++) {
|
||||
board[y][x] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
clear_piece(piece);
|
||||
|
||||
init();
|
||||
|
||||
game_over = 0;
|
||||
|
||||
r = seed;
|
||||
score = 0;
|
||||
|
||||
copy_piece_from_to(empty_piece, piece);
|
||||
x = 0;
|
||||
y = 0;
|
||||
shape = 0;
|
||||
rotation = 0;
|
||||
time = 0;
|
||||
next_down = 0;
|
||||
down_delay = -1;
|
||||
first_run = 1;
|
||||
}
|
||||
|
||||
int tetris_tick(int ms_since_previous_tick) {
|
||||
if (game_over) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
time += ms_since_previous_tick;
|
||||
|
||||
if (first_run || time > next_down) {
|
||||
if (first_run || is_piece_hitting(board, piece, x, y + 1)) {
|
||||
first_run = 0;
|
||||
add_piece_to_board(piece, board, x, y);
|
||||
|
||||
score += clear_lines(board);
|
||||
|
||||
down_delay = 500 - score * 10;
|
||||
if (down_delay < 100) {
|
||||
down_delay = 100;
|
||||
}
|
||||
|
||||
rotation = 0;
|
||||
shape = r % 7;
|
||||
r = myrandom(r);
|
||||
set_piece(piece, shape, rotation);
|
||||
|
||||
x = 1;
|
||||
y = - get_piece_min_y(piece);
|
||||
draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 0, 0);
|
||||
|
||||
if (is_piece_hitting(board, piece, x, y)) {
|
||||
game_over = 1;
|
||||
send_goto_xy(12, 10);
|
||||
tetris_send_string(" game over");
|
||||
tetris_send_down();
|
||||
tetris_send_string(" score ");
|
||||
char tmp[10];
|
||||
sprintf(tmp, "%d", score);
|
||||
tetris_send_string(tmp);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
y++;
|
||||
draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 0, +1);
|
||||
}
|
||||
next_down = time + down_delay;
|
||||
} else {
|
||||
|
||||
switch (tetris_get_keypress()) {
|
||||
case 1: { // up
|
||||
int oldrotation = rotation;
|
||||
rotation = (rotation + 1) % 4;
|
||||
copy_piece_from_to(piece, temp_piece);
|
||||
set_piece(piece, shape, rotation);
|
||||
if (is_piece_hitting(board, piece, x, y)) {
|
||||
rotation = oldrotation;
|
||||
set_piece(piece, shape, rotation);
|
||||
} else {
|
||||
draw_piece(get_shape_char(shape), 1 + x, y, temp_piece, piece);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: // left
|
||||
if (!is_piece_hitting(board, piece, x - 1, y)) {
|
||||
x--;
|
||||
draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, -1, 0);
|
||||
}
|
||||
break;
|
||||
case 3: {// down
|
||||
int starty = y;
|
||||
while (!is_piece_hitting(board, piece, x, y + 1)) {
|
||||
y++;
|
||||
}
|
||||
|
||||
draw_piece(get_shape_char(shape), x + 1, starty, piece, empty_piece);
|
||||
draw_piece(get_shape_char(shape), x + 1, y, empty_piece, piece);
|
||||
|
||||
next_down = time + down_delay;
|
||||
break;
|
||||
}
|
||||
case 4: // right
|
||||
if (!is_piece_hitting(board, piece, x + 1, y)) {
|
||||
x++;
|
||||
draw_piece_moved(get_shape_char(shape), 1 + x, y, piece, 1, 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
45
keyboards/clueboard/keymaps/tetris/tetris_text.h
Normal file
45
keyboards/clueboard/keymaps/tetris/tetris_text.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright 2017 Dan Amlund Thomsen
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
#ifndef TETRIS_TEXT_H
|
||||
#define TETRIS_TEXT_H
|
||||
|
||||
//// to implement
|
||||
void tetris_send_up(void);
|
||||
void tetris_send_left(void);
|
||||
void tetris_send_down(void);
|
||||
void tetris_send_right(void);
|
||||
|
||||
void tetris_send_backspace(void);
|
||||
void tetris_send_delete(void);
|
||||
|
||||
void tetris_send_string(const char *s);
|
||||
|
||||
void tetris_send_newline(void);
|
||||
|
||||
// return = meaning
|
||||
// 0 = no keys pressed
|
||||
// 1 = up
|
||||
// 2 = left
|
||||
// 3 = down
|
||||
// 4 = right
|
||||
int tetris_get_keypress(void);
|
||||
|
||||
//// to call
|
||||
void tetris_start(uint8_t seed);
|
||||
// returns 0 when game is over
|
||||
int tetris_tick(int ms_since_previous_tick);
|
||||
|
||||
#endif
|
@@ -29,3 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifdef SUBPROJECT_protosplit
|
||||
#include "../../protosplit/config.h"
|
||||
#endif
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 20
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
@@ -24,16 +24,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |----------------------------------------------------------------------|
|
||||
* |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift | Up| End|
|
||||
* |----------------------------------------------------------------------|
|
||||
* |CapsLo|Gui |Alt |Sp |Mod | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig|
|
||||
* |CapsLo|Gui |Alt |Mod|Sp | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig|
|
||||
* `----------------------------------------------------------------------'
|
||||
*/
|
||||
KEYMAP_V2(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL,
|
||||
KC_GRV, 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_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace.
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
|
||||
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_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is unneeded ISO enter key.
|
||||
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_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is uneeded ISO enter key.
|
||||
KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, // KC_TRNS is uneeded ISO layout key.
|
||||
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
KC_CAPS, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
KEYMAP_V2(
|
||||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
||||
|
@@ -21,9 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/wdt.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
@@ -31,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "split_util.h"
|
||||
#include "pro_micro.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
# include "i2c.h"
|
||||
@@ -38,14 +37,29 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# include "serial.h"
|
||||
#endif
|
||||
|
||||
#ifndef DEBOUNCE
|
||||
# define DEBOUNCE 5
|
||||
#ifndef DEBOUNCING_DELAY
|
||||
# define DEBOUNCING_DELAY 5
|
||||
#endif
|
||||
|
||||
#if (DEBOUNCING_DELAY > 0)
|
||||
static uint16_t debouncing_time;
|
||||
static bool debouncing = false;
|
||||
#endif
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#else
|
||||
# error "Currently only supports 8 COLS"
|
||||
#endif
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
#define ERROR_DISCONNECT_COUNT 5
|
||||
|
||||
static uint8_t debouncing = DEBOUNCE;
|
||||
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
|
||||
#define ROWS_PER_HAND (MATRIX_ROWS/2)
|
||||
|
||||
static uint8_t error_count = 0;
|
||||
|
||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
@@ -55,11 +69,19 @@ static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
static matrix_row_t read_cols(void);
|
||||
static void init_cols(void);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
static void init_cols(void);
|
||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row);
|
||||
static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
static void unselect_row(uint8_t row);
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
static void init_rows(void);
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||
static void unselect_cols(void);
|
||||
static void unselect_col(uint8_t col);
|
||||
static void select_col(uint8_t col);
|
||||
#endif
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
@@ -118,33 +140,54 @@ void matrix_init(void)
|
||||
}
|
||||
|
||||
matrix_init_quantum();
|
||||
|
||||
}
|
||||
|
||||
uint8_t _matrix_scan(void)
|
||||
{
|
||||
// Right hand is stored after the left in the matirx so, we need to offset it
|
||||
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
// Set row, read cols
|
||||
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
|
||||
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
PORTD ^= (1 << 2);
|
||||
}
|
||||
|
||||
# else
|
||||
read_cols_on_row(matrix+offset, current_row);
|
||||
# endif
|
||||
|
||||
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||
select_row(i);
|
||||
_delay_us(30); // without this wait read unstable value.
|
||||
matrix_row_t cols = read_cols();
|
||||
if (matrix_debouncing[i+offset] != cols) {
|
||||
matrix_debouncing[i+offset] = cols;
|
||||
debouncing = DEBOUNCE;
|
||||
}
|
||||
unselect_rows();
|
||||
}
|
||||
|
||||
if (debouncing) {
|
||||
if (--debouncing) {
|
||||
_delay_ms(1);
|
||||
} else {
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
// Set col, read rows
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
# else
|
||||
read_rows_on_col(matrix+offset, current_col);
|
||||
# endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
# if (DEBOUNCING_DELAY > 0)
|
||||
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
|
||||
matrix[i+offset] = matrix_debouncing[i+offset];
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
}
|
||||
# endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -200,9 +243,7 @@ int serial_transaction(void) {
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
int ret = _matrix_scan();
|
||||
|
||||
|
||||
uint8_t ret = _matrix_scan();
|
||||
|
||||
#ifdef USE_I2C
|
||||
if( i2c_transaction() ) {
|
||||
@@ -226,20 +267,17 @@ uint8_t matrix_scan(void)
|
||||
TXLED0;
|
||||
error_count = 0;
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void matrix_slave_scan(void) {
|
||||
_matrix_scan();
|
||||
|
||||
int offset = (isLeftHand) ? 0 : (MATRIX_ROWS / 2);
|
||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||
|
||||
#ifdef USE_I2C
|
||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||
/* i2c_slave_buffer[i] = matrix[offset+i]; */
|
||||
i2c_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
#else // USE_SERIAL
|
||||
@@ -286,33 +324,141 @@ uint8_t matrix_key_count(void)
|
||||
return count;
|
||||
}
|
||||
|
||||
static void init_cols(void)
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
|
||||
static void init_cols(void)
|
||||
{
|
||||
for(int x = 0; x < MATRIX_COLS; x++) {
|
||||
_SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
|
||||
_SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
|
||||
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
uint8_t pin = col_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
static matrix_row_t read_cols(void)
|
||||
static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
|
||||
{
|
||||
matrix_row_t result = 0;
|
||||
for(int x = 0; x < MATRIX_COLS; x++) {
|
||||
result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[current_row];
|
||||
|
||||
static void unselect_rows(void)
|
||||
{
|
||||
for(int x = 0; x < ROWS_PER_HAND; x++) {
|
||||
_SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
|
||||
_SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
|
||||
// Clear data in matrix row
|
||||
current_matrix[current_row] = 0;
|
||||
|
||||
// Select row and wait for row selecton to stabilize
|
||||
select_row(current_row);
|
||||
wait_us(30);
|
||||
|
||||
// For each col...
|
||||
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
|
||||
|
||||
// Select the col pin to read (active low)
|
||||
uint8_t pin = col_pins[col_index];
|
||||
uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF));
|
||||
|
||||
// Populate the matrix row with the state of the col pin
|
||||
current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index);
|
||||
}
|
||||
|
||||
// Unselect row
|
||||
unselect_row(current_row);
|
||||
|
||||
return (last_row_value != current_matrix[current_row]);
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row)
|
||||
{
|
||||
_SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
|
||||
_SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
|
||||
uint8_t pin = row_pins[row];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
|
||||
static void unselect_row(uint8_t row)
|
||||
{
|
||||
uint8_t pin = row_pins[row];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
|
||||
static void unselect_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||
uint8_t pin = row_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
|
||||
static void init_rows(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < ROWS_PER_HAND; x++) {
|
||||
uint8_t pin = row_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
{
|
||||
bool matrix_changed = false;
|
||||
|
||||
// Select col and wait for col selecton to stabilize
|
||||
select_col(current_col);
|
||||
wait_us(30);
|
||||
|
||||
// For each row...
|
||||
for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++)
|
||||
{
|
||||
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[row_index];
|
||||
|
||||
// Check row pin state
|
||||
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0)
|
||||
{
|
||||
// Pin LO, set col bit
|
||||
current_matrix[row_index] |= (ROW_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
|
||||
}
|
||||
|
||||
// Determine if the matrix changed state
|
||||
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||
{
|
||||
matrix_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect col
|
||||
unselect_col(current_col);
|
||||
|
||||
return matrix_changed;
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col)
|
||||
{
|
||||
uint8_t pin = col_pins[col];
|
||||
_SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW
|
||||
}
|
||||
|
||||
static void unselect_col(uint8_t col)
|
||||
{
|
||||
uint8_t pin = col_pins[col];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
|
||||
static void unselect_cols(void)
|
||||
{
|
||||
for(uint8_t x = 0; x < MATRIX_COLS; x++) {
|
||||
uint8_t pin = col_pins[x];
|
||||
_SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1,137 +1,18 @@
|
||||
DeltaSplit75
|
||||
======
|
||||
|
||||
This readme and most of the code are from https://github.com/ahtn/tmk_keyboard/ and https://github.com/qmk/qmk_firmware/tree/master/keyboards/lets_split
|
||||
A split 75% keyboard made by xyxjj. [More info on qmk.fm](http://qmk.fm/deltasplit75/)
|
||||
|
||||
Credit to ahtn and wootpatoot for work on the split keyboard firmware
|
||||
Keyboard Maintainer: [xyxjj](https://github.com/xyxjj)
|
||||
Hardware Supported: Pro Micro
|
||||
Hardware Availability: Group Buy
|
||||
|
||||
Split keyboard firmware for Arduino Pro Micro or other ATmega32u4
|
||||
based boards.
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
## Case Files
|
||||
Files are available here: https://github.com/xyxjj/DeltaSplit75-Case-files
|
||||
make deltasplit75-v2-default
|
||||
|
||||
## Build Guide
|
||||
The build guide should be found at https://qmk.fm/deltasplit75
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
|
||||
Files are available here: [DeltaSplit75 Case Files](https://github.com/xyxjj/DeltaSplit75-Case-files)
|
||||
|
||||
## First Time Setup
|
||||
|
||||
Download or clone the whole firmware and navigate to the keyboards/deltasplit75 directory. Once your dev env is setup, you'll be able to generate the .hex using:
|
||||
|
||||
```
|
||||
make v2
|
||||
|
||||
or
|
||||
|
||||
make v2-YOUR_KEYMAP_NAME (if you make a folder for your keymap)
|
||||
|
||||
or
|
||||
|
||||
make protosplit (if you have one of the prototype PCBs)
|
||||
```
|
||||
|
||||
You will see a lot of output and if everything worked correctly you will see the built hex files:
|
||||
|
||||
```
|
||||
deltasplit75_v2_protosplit.hex
|
||||
|
||||
or
|
||||
|
||||
deltasplit74_v2_YOUR_KEYMAP_NAME.hex
|
||||
|
||||
or
|
||||
|
||||
deltasplit75_v2_default.hex
|
||||
|
||||
```
|
||||
|
||||
|
||||
For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md.
|
||||
|
||||
### DeltaSplit75 V2
|
||||
The PCBs available in groupbuy are all v2, if you've bought one of my prototype PCBs (it says DeltaSplit65 on the silkscreen instead of 75), use the code make protosplit instead
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
For the full Quantum Mechanical Keyboard feature list, see [the parent readme.md](/readme.md).
|
||||
|
||||
Some features supported by the firmware:
|
||||
|
||||
* Either half can connect to the computer via USB, or both halves can be used
|
||||
independently.
|
||||
* 75% formfactor
|
||||
* Support for multiple Bottom Rows
|
||||
* RGB underglow support
|
||||
* Split Backspace and ISO support
|
||||
|
||||
|
||||
Flashing
|
||||
-------
|
||||
I personally use xLoader to upload my hex files to the keyboard, though any other working software is fine too
|
||||
|
||||
|
||||
Choosing which board to plug the USB cable into (choosing Master)
|
||||
--------
|
||||
Because the two boards are identical, the firmware has logic to differentiate the left and right board.
|
||||
|
||||
It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable.
|
||||
|
||||
The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side.
|
||||
|
||||
The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra.
|
||||
|
||||
### Setting the left hand as master
|
||||
If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set.
|
||||
|
||||
### Setting the right hand as master
|
||||
If you always plug the usb cable into the right board, add an extra flag to your `config.h`
|
||||
```
|
||||
#define MASTER_RIGHT
|
||||
```
|
||||
|
||||
### Setting EE_hands to use either hands as master
|
||||
If you define `EE_HANDS` in your `config.h`, you will need to set the
|
||||
EEPROM for the left and right halves.
|
||||
|
||||
The EEPROM is used to store whether the
|
||||
half is left handed or right handed. This makes it so that the same firmware
|
||||
file will run on both hands instead of having to flash left and right handed
|
||||
versions of the firmware to each half. To flash the EEPROM file for the left
|
||||
half run:
|
||||
```
|
||||
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep
|
||||
// or the equivalent in dfu-programmer
|
||||
|
||||
```
|
||||
and similarly for right half
|
||||
```
|
||||
avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep
|
||||
// or the equivalent in dfu-programmer
|
||||
```
|
||||
|
||||
NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`)
|
||||
|
||||
After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash.
|
||||
|
||||
Note that you need to program both halves, but you have the option of using
|
||||
different keymaps for each half. You could program the left half with a QWERTY
|
||||
layout and the right half with a Colemak layout using bootmagic's default layout option.
|
||||
Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the
|
||||
right half is connected.
|
||||
|
||||
|
||||
Notes on Using Pro Micro 3.3V
|
||||
-----------------------------
|
||||
|
||||
Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects
|
||||
the frequency on the 3.3V board.
|
||||
|
||||
Also, if the slave board is producing weird characters in certain columns,
|
||||
update the following line in `matrix.c` to the following:
|
||||
|
||||
```
|
||||
// _delay_us(30); // without this wait read unstable value.
|
||||
_delay_us(300); // without this wait read unstable value.
|
||||
```
|
||||
The build guide should be found here: [DeltaSplit75 Build Guide](http://qmk.fm/deltasplit75/)
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#include "matrix.h"
|
||||
#include "keyboard.h"
|
||||
#include "config.h"
|
||||
#include "timer.h"
|
||||
|
||||
#ifdef USE_I2C
|
||||
# include "i2c.h"
|
||||
@@ -21,7 +22,7 @@ static void setup_handedness(void) {
|
||||
#ifdef EE_HANDS
|
||||
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
|
||||
#else
|
||||
// I2C_MASTER_RIGHT is deprecated use MASTER_RIGHT instead since this works for both serial and i2c
|
||||
// I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
|
||||
#if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
|
||||
isLeftHand = !has_usb();
|
||||
#else
|
||||
@@ -33,12 +34,16 @@ static void setup_handedness(void) {
|
||||
static void keyboard_master_setup(void) {
|
||||
#ifdef USE_I2C
|
||||
i2c_master_init();
|
||||
#ifdef SSD1306OLED
|
||||
matrix_master_OLED_init ();
|
||||
#endif
|
||||
#else
|
||||
serial_master_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void keyboard_slave_setup(void) {
|
||||
timer_init();
|
||||
#ifdef USE_I2C
|
||||
i2c_slave_init(SLAVE_I2C_ADDRESS);
|
||||
#else
|
||||
|
@@ -1,5 +1,52 @@
|
||||
#include "ergodone.h"
|
||||
|
||||
extern inline void ergodox_board_led_on(void);
|
||||
extern inline void ergodox_right_led_1_on(void);
|
||||
extern inline void ergodox_right_led_2_on(void);
|
||||
extern inline void ergodox_right_led_3_on(void);
|
||||
extern inline void ergodox_right_led_on(uint8_t led);
|
||||
|
||||
extern inline void ergodox_board_led_off(void);
|
||||
extern inline void ergodox_right_led_1_off(void);
|
||||
extern inline void ergodox_right_led_2_off(void);
|
||||
extern inline void ergodox_right_led_3_off(void);
|
||||
extern inline void ergodox_right_led_off(uint8_t led);
|
||||
|
||||
void ergodox_led_init(void);
|
||||
void ergodox_blink_all_leds(void);
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
ergodox_led_init();
|
||||
ergodox_blink_all_leds();
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void ergodox_led_init(void)
|
||||
{
|
||||
DDRB |= (1<<PB5 | 1<<PB6 | 1<<PB3);
|
||||
PORTB &= ~(1<<PB5 | 1<<PB6 | 1<<PB3);
|
||||
DDRB |= (1<<PB0);
|
||||
PORTB |= (1<<PB0);
|
||||
DDRD |= (1<<PB5);
|
||||
PORTD |= (1<<PB5);
|
||||
}
|
||||
|
||||
void ergodox_blink_all_leds(void)
|
||||
{
|
||||
ergodox_led_all_off();
|
||||
ergodox_led_all_set(LED_BRIGHTNESS_HI);
|
||||
ergodox_right_led_1_on();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_on();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_on();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
//ergodox_led_all_on();
|
||||
//_delay_ms(333);
|
||||
ergodox_led_all_off();
|
||||
}
|
||||
|
@@ -10,18 +10,57 @@
|
||||
|
||||
void init_ergodox(void);
|
||||
|
||||
inline void ergodox_right_led_1_off(void) {}
|
||||
inline void ergodox_right_led_1_on(void) {}
|
||||
inline void ergodox_right_led_2_off(void) {}
|
||||
inline void ergodox_right_led_2_on(void) {}
|
||||
inline void ergodox_right_led_3_off(void) {}
|
||||
inline void ergodox_right_led_3_on(void) {}
|
||||
inline void ergodox_right_led_on(uint8_t l) {}
|
||||
inline void ergodox_right_led_off(uint8_t l) {}
|
||||
inline void ergodox_board_led_off(void) {}
|
||||
inline void ergodox_board_led_on(void) {}
|
||||
inline void ergodox_led_all_on(void) {}
|
||||
inline void ergodox_led_all_off(void) {}
|
||||
inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<PB5); PORTB &= ~(1<<PB5); }
|
||||
inline void ergodox_right_led_1_on(void) { DDRB |= (1<<PB5); PORTB |= (1<<PB5); }
|
||||
inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<PB6); PORTB &= ~(1<<PB6); }
|
||||
inline void ergodox_right_led_2_on(void) { DDRB |= (1<<PB6); PORTB |= (1<<PB6); }
|
||||
inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<PB3); PORTB &= ~(1<<PB3); }
|
||||
inline void ergodox_right_led_3_on(void) { DDRB |= (1<<PB3); PORTB |= (1<<PB3); }
|
||||
inline void ergodox_right_led_on(uint8_t l) {
|
||||
switch (l) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
inline void ergodox_right_led_off(uint8_t l) {
|
||||
switch (l) {
|
||||
case 1:
|
||||
ergodox_right_led_1_off();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_off();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_off();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
inline void ergodox_board_led_off(void) { DDRB &= ~(1<<PB0); PORTB |= (1<<PB0); }
|
||||
inline void ergodox_board_led_on(void) { DDRB |= (1<<PB0); PORTB &= ~(1<<PB0); }
|
||||
inline void ergodox_led_all_on(void) {
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
ergodox_board_led_on();
|
||||
}
|
||||
inline void ergodox_led_all_off(void) {
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
ergodox_board_led_off();
|
||||
}
|
||||
inline void ergodox_right_led_1_set(uint8_t n) {}
|
||||
inline void ergodox_right_led_2_set(uint8_t n) {}
|
||||
inline void ergodox_right_led_3_set(uint8_t n) {}
|
||||
|
@@ -1,5 +1,4 @@
|
||||
TAP_DANCE_ENABLE = yes
|
||||
LAYER_UNDERGLOW_LIGHTING = yes
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
@@ -4,5 +4,3 @@
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
|
||||
#define LAYER_UNDERGLOW_LIGHTING
|
||||
|
@@ -1,3 +1,19 @@
|
||||
/*
|
||||
This is the keymap for the keyboard
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2017 Art Ortenburger
|
||||
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 "debug.h"
|
||||
#include "action_layer.h"
|
||||
@@ -28,17 +44,18 @@
|
||||
#define M_SALT M(2)
|
||||
#define M_HARD M(3)
|
||||
#define M_MAKE M(4)
|
||||
#define M_COVECUBE M(5)
|
||||
#define M_GOODGAME M(5)
|
||||
#define M_MORESALT M(6)
|
||||
#define M_DOOMFIST M(7)
|
||||
|
||||
|
||||
//define layer change stuff for underglow indicator
|
||||
bool skip_leds = false;
|
||||
|
||||
//This is both for underglow, and Diablo 3 macros
|
||||
bool has_layer_changed = false;
|
||||
static uint8_t current_layer;
|
||||
|
||||
static uint16_t key_timer;
|
||||
//define diablo macro timer variables
|
||||
static uint16_t diablo_timer[4];
|
||||
static uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30};
|
||||
@@ -49,10 +66,6 @@ bool check_dtimer(uint8_t dtimer) {
|
||||
return (timer_elapsed(diablo_timer[dtimer]) < ( diablo_key_time[dtimer] * 1000 ) ) ? false : true;
|
||||
};
|
||||
|
||||
bool checktime(void){
|
||||
return (timer_elapsed(key_timer) < 150) ? true : false;
|
||||
};
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
@@ -69,11 +82,7 @@ enum custom_keycodes {
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
enum {
|
||||
SFT_CAP = 0,
|
||||
TD_DIABLO_J,
|
||||
TD_CLN,
|
||||
TD_EGG,
|
||||
TD_FLSH,
|
||||
TD_FLSH = 0,
|
||||
TD_DIABLO_1,
|
||||
TD_DIABLO_2,
|
||||
TD_DIABLO_3,
|
||||
@@ -82,33 +91,10 @@ enum {
|
||||
|
||||
|
||||
|
||||
void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
register_code (KC_RSFT);
|
||||
register_code (KC_SCLN);
|
||||
} else {
|
||||
register_code (KC_SCLN);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count == 1) {
|
||||
unregister_code (KC_RSFT);
|
||||
unregister_code (KC_SCLN);
|
||||
} else {
|
||||
unregister_code (KC_SCLN);
|
||||
}
|
||||
}
|
||||
|
||||
void dance_egg (qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 10) {
|
||||
SEND_STRING ("Safety dance!");
|
||||
reset_tap_dance (state);
|
||||
}
|
||||
}
|
||||
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
// on the forth tap, turn them off from right to leftmake ergodox-ez-drashna-custom-teensy
|
||||
|
||||
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (!skip_leds) {
|
||||
ergodox_board_led_off();
|
||||
@@ -119,37 +105,38 @@ void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
}
|
||||
switch (state->count) {
|
||||
case 1:
|
||||
ergodox_right_led_3_on();
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_3_off();
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// on the fourth tap, set the keyboard on flash state
|
||||
// and set the underglow to red, because red == bad
|
||||
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 4) {
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff,0x00,0x00);
|
||||
#endif
|
||||
reset_keyboard();
|
||||
reset_tap_dance(state);
|
||||
}
|
||||
}
|
||||
|
||||
// Cycle through the times for the macro, starting at 0, for disabled.
|
||||
// Max of six values, so don't exceed
|
||||
void diablo_tapdance_master (qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) {
|
||||
if (state->count >= 7) {
|
||||
diablo_key_time[diablo_key] = diablo_times[0];
|
||||
@@ -159,6 +146,8 @@ void diablo_tapdance_master (qk_tap_dance_state_t *state, void *user_data, uint8
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Would rather have one function for all of this, but no idea how to do that...
|
||||
void diablo_tapdance1 (qk_tap_dance_state_t *state, void *user_data) {
|
||||
diablo_tapdance_master (state, user_data, 0);
|
||||
}
|
||||
@@ -179,28 +168,20 @@ void diablo_tapdance4 (qk_tap_dance_state_t *state, void *user_data) {
|
||||
// if the flash state didnt happen, then turn off leds, left to right
|
||||
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_3_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(500);
|
||||
skip_leds = false;
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
//Tap one for Space, and twice for Enter
|
||||
[SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSHIFT, KC_CAPS),
|
||||
// Special Z
|
||||
[TD_DIABLO_J] = ACTION_TAP_DANCE_DOUBLE(KC_J, S(KC_J)),
|
||||
// Once for colin, twice for semi-colin
|
||||
[TD_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset),
|
||||
// Tap until you get a surprise
|
||||
[TD_EGG] = ACTION_TAP_DANCE_FN (dance_egg),
|
||||
//Once for Blue, Twice for Green, Thrice for Red, and four to flash
|
||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset),
|
||||
|
||||
// tap once to disable, and more to enable timed micros
|
||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||
@@ -220,9 +201,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " |
|
||||
* |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------|
|
||||
* | Shift | Z | X | C | V | B | | | | N | M | , < | . > | UP | Shift |
|
||||
* | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | `/SYM| ' " | LGUI | [ { | ] } | | SYMB | ? / | LEFT | DOWN |RIGHT |
|
||||
* | `/SYM| ' " | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,--------------. ,--------------.
|
||||
* |Alt/Ap| Win | | Alt |Ctl/Esc|
|
||||
@@ -247,7 +228,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(DVORAK), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(COLEMAK), KC_N, KC_M, KC_COMMA, KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT,
|
||||
KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
@@ -281,16 +262,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_DELT, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LBRACKET,KC_RBRACKET,
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_TRANSPARENT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
KC_NO, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, LT(MOUS, KC_O), KC_QUOTE,
|
||||
KC_TRANSPARENT,KC_K, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT,
|
||||
KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT,
|
||||
KC_TRNS,KC_K,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLASH),KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
@@ -324,16 +305,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_DELT, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LBRACKET,KC_RBRACKET,
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
KC_TRANSPARENT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
KC_TRANSPARENT, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, LT(MOUS, KC_S), KC_MINS,
|
||||
KC_NO,KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSHIFT,
|
||||
KC_FN1, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_FN1,
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_TAB, KC_ENT
|
||||
@@ -347,43 +328,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc |
|
||||
* |--------+------+------+------+------+------| COVE | | |------+------+------+------+------+--------|
|
||||
* | RESET | % | ^ | [ | ] | ~ | CUBE | | | NUM | 1 | 2 | 3 | = | PAUSE |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | RESET | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LT0 | & | * | : | ; | | 0 | 0 | NUM. | ENT | ENT |
|
||||
* | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | RGBM | RED | | OFF | SOLID|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | GREEN| | | | |
|
||||
* | RGB | RGB |------| |------| NUM. | NUM0 |
|
||||
* | RGB | RGB |------| |------| NUM0 | NUME |
|
||||
* | DARK |BRITE | BLUE | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[SYMB] = KEYMAP(
|
||||
KC_ESCAPE,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRANSPARENT,
|
||||
M_VERSION, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRANSPARENT,
|
||||
KC_ESCAPE,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
|
||||
M_VERSION, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS,
|
||||
M_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, M_COVECUBE,
|
||||
TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_TRNS,
|
||||
KC_NO, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||
RGB_MOD, RGB_0000FF,
|
||||
RGB_008000,
|
||||
RGB_VAD, RGB_VAI, RGB_FF0000,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_TRANSPARENT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRANSPARENT, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||
KC_KP_MINUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH,KC_PSCREEN,
|
||||
KC_TRANSPARENT, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_ENTER,
|
||||
KC_TRNS, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
|
||||
RGB_TOG, RGB_SLD,
|
||||
RGB_HUI,
|
||||
RGB_HUD, KC_KP_DOT, KC_KP_0
|
||||
KC_NO,
|
||||
KC_KP_DOT, KC_KP_0, KC_KP_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Customized Overwatch Layout
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | SALT | SYMM | MORE | DOOM | | | | | F9 | F10 | F11 | F12 | | |
|
||||
* | ESC | SALT | MORE | GG | SYMM | DOOM | HARD | | | F9 | F10 | F11 | F12 | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F1 | K | Q | W | E | R | T | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
@@ -402,10 +383,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[OVERWATCH] = KEYMAP(
|
||||
KC_ESCAPE, M_SALT, M_SYMM, M_MORESALT, M_DOOMFIST, KC_NO, KC_NO,
|
||||
KC_ESCAPE, M_SALT, M_MORESALT, M_GOODGAME, M_SYMM, M_DOOMFIST, M_HARD,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_M, KC_TRANSPARENT,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_M, KC_TRNS,
|
||||
KC_G, KC_U, KC_I, KC_Y, KC_T,
|
||||
KC_O, KC_P,
|
||||
KC_LGUI,
|
||||
@@ -444,10 +425,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[DIABLO] = KEYMAP(
|
||||
KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRANSPARENT,
|
||||
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_TRNS,
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G,
|
||||
KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_4, KC_Z, KC_NO,
|
||||
KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4),
|
||||
KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_L, KC_J,
|
||||
KC_F,
|
||||
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR,
|
||||
@@ -485,19 +466,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[MOUS] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,
|
||||
KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_NO, KC_TRANSPARENT,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT,KC_NO, KC_NO,
|
||||
KC_NO, KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO, KC_NO, KC_TRANSPARENT,
|
||||
KC_NO, KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO,KC_NO,
|
||||
KC_MS_WH_UP,
|
||||
KC_MS_BTN1,KC_MS_BTN2,KC_MS_WH_DOWN,
|
||||
|
||||
KC_TRANSPARENT,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,
|
||||
KC_TRANSPARENT,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,
|
||||
KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,
|
||||
KC_TRNS,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,
|
||||
KC_NO,KC_NO,KC_MS_ACCEL0,KC_MS_ACCEL1,KC_MS_ACCEL2,KC_NO,KC_NO,
|
||||
KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_STOP,KC_AUDIO_MUTE,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_NO,
|
||||
KC_TRNS,KC_MEDIA_PLAY_PAUSE,KC_MEDIA_STOP,KC_AUDIO_MUTE,KC_AUDIO_VOL_DOWN,KC_AUDIO_VOL_UP,KC_NO,
|
||||
KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,
|
||||
KC_NO,KC_NO,
|
||||
KC_NO,
|
||||
@@ -509,10 +490,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB),
|
||||
// FN1 - Momentary Layer 1 (Symbols)
|
||||
[2] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_UP),
|
||||
[3] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_LEFT),
|
||||
[4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_DOWN),
|
||||
[5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RIGHT),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||
@@ -547,13 +524,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
case 4:
|
||||
if (record->event.pressed) {
|
||||
// make ergodox-ez-drashna-custom-teensy
|
||||
return MACRO( I(5), T(M), T(A), T(K), T(E), T(SPACE), T(E), T(R), T(G), T(O), T(D), T(O), T(X), T(MINUS), T(E), T(Z), T(MINUS), T(D), T(R), T(A), T(S), T(H), T(N), T(A), T(MINUS), T(C), T(U), T(S), T(T), T(O), T(M), T(MINUS), T(T), T(E), T(E), T(N), T(S), T(Y), T(ENTER), END );
|
||||
return MACRO(I(5), T(M), T(A), T(K), T(E), T(SPACE), T(E), T(R), T(G), T(O), T(D), T(O), T(X), D(LSFT), T(MINUS), U(LSFT), T(E), T(Z), T(MINUS), T(D), T(R), T(A), T(S), T(H), T(N), T(A), T(MINUS), T(C), T(U), T(S), T(T), T(O), T(M), T(MINUS), T(T), T(E), T(E), T(N), T(S), T(Y), T(ENTER), END);
|
||||
}
|
||||
case 5:
|
||||
if (record->event.pressed) {
|
||||
//super secret hash
|
||||
SEND_STRING("supersecrethash");
|
||||
return MACRO_NONE;
|
||||
//gg
|
||||
return MACRO(I(50), T(ENTER), I(5), T(G), T(G), T(ENTER), END);
|
||||
}
|
||||
case 6:
|
||||
if (record->event.pressed) {
|
||||
@@ -562,40 +538,15 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (record->event.pressed) {
|
||||
// DoomFisted
|
||||
// Hey, look at me. I'm Doomfist, and I'm overpowered!
|
||||
// All I do is spam punches all day! I'm DPS, tank and
|
||||
// defense, rolled into one! All I need is team healing to be complete!
|
||||
return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(H), U(LSFT), T(E), T(Y), T(COMMA), T(SPACE), T(L), T(O), T(O), T(K), T(SPACE), T(A), T(T), T(SPACE), T(M), T(E), T(DOT), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), T(O), T(O), T(M), T(F), T(I), T(S), T(T), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), T(O), T(V), T(E), T(R), T(P), T(O), T(W), T(E), T(R), T(E), T(D), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(D), T(O), T(SPACE), T(I), T(S), T(SPACE), T(S), T(P), T(A), T(M), T(SPACE), T(P), T(U), T(N), T(C), T(H), T(E), T(S), T(SPACE), T(A), T(L), T(L), T(SPACE), T(D), T(A), T(Y), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), D(LSFT), T(P), U(LSFT), D(LSFT), T(S), U(LSFT), T(COMMA), T(SPACE), T(T), T(A), T(N), T(K), T(SPACE), T(A), T(N), T(D), T(SPACE), T(D), T(E), T(F), T(E), T(N), T(S), T(E), T(COMMA), T(SPACE), T(R), T(O), T(L), T(L), T(E), T(D), T(SPACE), T(I), T(N), T(T), T(O), T(SPACE), T(O), T(N), T(E), D(LSFT), T(1), U(LSFT), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(N), T(E), T(E), T(D), T(SPACE), T(I), T(S), T(SPACE), T(T), T(E), T(A), T(M), T(SPACE), T(H), T(E), T(A), T(L), T(I), T(N), T(G), T(SPACE), T(T), T(O), T(SPACE), T(B), T(E), T(SPACE), T(C), T(O), T(M), T(P), T(L), T(E), T(T), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END );
|
||||
}
|
||||
case 8: //MAC1 - Hold for rshift and } on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(LSFT), END );
|
||||
} else {
|
||||
return checktime() ? MACRO(U(LSFT),D(RALT),T(7),U(RALT),END): MACRO(U(LSFT),END);
|
||||
}; break;
|
||||
case 9: //MAC1 - Hold for rshift and } on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(RSFT), END );
|
||||
} else {
|
||||
return checktime() ? MACRO(U(RSFT),D(RALT),T(0),U(RALT),END): MACRO(U(RSFT),END);
|
||||
}; break;
|
||||
case 10: //MAC2 - Hold for lctrl and [ on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(LCTL), END );
|
||||
} else {return checktime() ? MACRO(U(LCTL),D(RALT),T(8),U(RALT),END):MACRO(U(LCTL),END);
|
||||
}; break;
|
||||
case 11: //MAC3 - Hold for rctrl and ] on tap
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
return MACRO(D(RCTL), END );
|
||||
} else {
|
||||
return checktime() ? MACRO(U(RCTL),D(RALT),T(9),U(RALT),END):MACRO(U(RCTL),END);
|
||||
}; break;
|
||||
if (record->event.pressed) {
|
||||
// DoomFisted
|
||||
// Hey, look at me. I'm Doomfist, and I'm overpowered!
|
||||
// All I do is spam punches all day! I'm DPS, tank and
|
||||
// defense, rolled into one! All I need is team healing to be complete!
|
||||
return MACRO( I(50), T(ENTER), I(5), D(LSFT), T(H), U(LSFT), T(E), T(Y), T(COMMA), T(SPACE), T(L), T(O), T(O), T(K), T(SPACE), T(A), T(T), T(SPACE), T(M), T(E), T(DOT), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), T(O), T(O), T(M), T(F), T(I), T(S), T(T), T(COMMA), T(SPACE), T(A), T(N), T(D), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), T(O), T(V), T(E), T(R), T(P), T(O), T(W), T(E), T(R), T(E), T(D), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(D), T(O), T(SPACE), T(I), T(S), T(SPACE), T(S), T(P), T(A), T(M), T(SPACE), T(P), T(U), T(N), T(C), T(H), T(E), T(S), T(SPACE), T(A), T(L), T(L), T(SPACE), T(D), T(A), T(Y), D(LSFT), T(1), U(LSFT), T(SPACE), T(SPACE), T(SPACE), D(LSFT), T(I), U(LSFT), T(QUOTE), T(M), T(SPACE), D(LSFT), T(D), U(LSFT), D(LSFT), T(P), U(LSFT), D(LSFT), T(S), U(LSFT), T(COMMA), T(SPACE), T(T), T(A), T(N), T(K), T(SPACE), T(A), T(N), T(D), T(SPACE), T(D), T(E), T(F), T(E), T(N), T(S), T(E), T(COMMA), T(SPACE), T(R), T(O), T(L), T(L), T(E), T(D), T(SPACE), T(I), T(N), T(T), T(O), T(SPACE), T(O), T(N), T(E), D(LSFT), T(1), U(LSFT), T(SPACE), D(LSFT), T(A), U(LSFT), T(L), T(L), T(SPACE), D(LSFT), T(I), U(LSFT), T(SPACE), T(N), T(E), T(E), T(D), T(SPACE), T(I), T(S), T(SPACE), T(T), T(E), T(A), T(M), T(SPACE), T(H), T(E), T(A), T(L), T(I), T(N), T(G), T(SPACE), T(T), T(O), T(SPACE), T(B), T(E), T(SPACE), T(C), T(O), T(M), T(P), T(L), T(E), T(T), T(E), D(LSFT), T(1), U(LSFT), T(ENTER), END );
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
@@ -677,7 +628,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_DIABLO_CLEAR:
|
||||
case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them
|
||||
if (record->event.pressed) {
|
||||
uint8_t dtime;
|
||||
|
||||
@@ -692,6 +643,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
void send_diablo_keystroke (uint8_t diablo_key) {
|
||||
if (current_layer == DIABLO) {
|
||||
switch (diablo_key) {
|
||||
@@ -711,6 +664,8 @@ void send_diablo_keystroke (uint8_t diablo_key) {
|
||||
}
|
||||
}
|
||||
|
||||
// Checks each of the 4 timers/keys to see if enough time has elapsed
|
||||
// Runs the "send string" command if enough time has passed, and resets the timer.
|
||||
void run_diablo_macro_check(void) {
|
||||
uint8_t dtime;
|
||||
|
||||
@@ -724,32 +679,7 @@ void run_diablo_macro_check(void) {
|
||||
}
|
||||
|
||||
void matrix_init_user(void) { // Runs boot tasks for keyboard
|
||||
wait_ms(500);
|
||||
ergodox_board_led_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_on();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_on();
|
||||
wait_ms(200);
|
||||
ergodox_board_led_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
wait_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
rgblight_enable();
|
||||
rgblight_sethsv(195,255,255);
|
||||
#endif
|
||||
has_layer_changed = false;
|
||||
|
||||
|
||||
|
||||
has_layer_changed = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -764,6 +694,9 @@ void matrix_scan_user(void) { // runs frequently to update info
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
// Since we're not using the LEDs here for layer indication anymore,
|
||||
// then lets use them for modifier indicators. Shame we don't have 4...
|
||||
// Also, no "else", since we want to know each, independantly.
|
||||
if ( modifiders & MODS_SHIFT_MASK) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
@@ -775,93 +708,61 @@ void matrix_scan_user(void) { // runs frequently to update info
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check layer, and apply color if its changed since last check
|
||||
switch (layer) {
|
||||
case SYMB:
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (240,255,255);
|
||||
}
|
||||
#else
|
||||
ergodox_right_led_3_on();
|
||||
#endif
|
||||
break;
|
||||
case OVERWATCH:
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (30,255,255);
|
||||
}
|
||||
#else
|
||||
ergodox_right_led_2_on();
|
||||
#endif
|
||||
break;
|
||||
case DIABLO:
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (0,255,255);
|
||||
}
|
||||
#else
|
||||
ergodox_right_led_1_on();
|
||||
#endif
|
||||
break;
|
||||
case MOUS:
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (60,255,255);
|
||||
}
|
||||
#else
|
||||
ergodox_right_led_3_on();
|
||||
ergodox_right_led_2_on();
|
||||
#endif
|
||||
break;
|
||||
case COLEMAK:
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (300,255,255);
|
||||
}
|
||||
#else
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_3_on();
|
||||
#endif
|
||||
break;
|
||||
case DVORAK:
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (120,255,255);
|
||||
}
|
||||
#else
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_1_on();
|
||||
#endif
|
||||
break;
|
||||
case 7:
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (255,255,255);
|
||||
}
|
||||
#else
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#endif
|
||||
break;
|
||||
case OVERWATCH:
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (30,255,255);
|
||||
}
|
||||
break;
|
||||
case DIABLO:
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (0,255,255);
|
||||
}
|
||||
break;
|
||||
case MOUS:
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (60,255,255);
|
||||
}
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (300,255,255);
|
||||
}
|
||||
break;
|
||||
case DVORAK:
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (120,255,255);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (255,255,255);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// Do not add anything here, as this will be ran EVERY check, and can cause a significant slowdown
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
if (has_layer_changed) {
|
||||
rgblight_sethsv (195,255,255);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Update layer status at the end, so this sets the default color
|
||||
// rather than relying on the init, which was unreliably...
|
||||
// Probably due to a timing issue, but this requires no additional code
|
||||
if (current_layer == layer) {
|
||||
has_layer_changed = false;
|
||||
} else {
|
||||
has_layer_changed = true;
|
||||
current_layer = layer;
|
||||
}
|
||||
|
||||
// Run Diablo 3 macro checking code.
|
||||
run_diablo_macro_check();
|
||||
};
|
||||
|
||||
|
||||
|
@@ -74,5 +74,6 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
#define LAYOUT_60_iso KEYMAP
|
||||
#define LAYOUT_60_ansi_split_bs_rshift KEYMAP_HHKB
|
||||
|
||||
#endif
|
@@ -65,4 +65,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:
|
||||
# UNICODE_ENABLE = YES # Unicode
|
||||
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
LAYOUTS = 60_ansi 60_iso
|
||||
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift
|
29
keyboards/gherkin/keymaps/mjt/Makefile
Normal file
29
keyboards/gherkin/keymaps/mjt/Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
## not sure where this stuff goes ##
|
||||
MCU = atmega32u4
|
||||
F_CPU = 16000000
|
||||
ARCH = AVR8
|
||||
F_USB = $(F_CPU)
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # 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.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
TAP_DANCE_ENABLE=yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
171
keyboards/gherkin/keymaps/mjt/config.h
Normal file
171
keyboards/gherkin/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Some Guy
|
||||
#define PRODUCT Gherkin
|
||||
#define DESCRIPTION 30 percent disaster
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/*
|
||||
* 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)
|
||||
*
|
||||
*/
|
||||
|
||||
// These are with USB on the left.
|
||||
// #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 }
|
||||
// original from TMK: #define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4 }
|
||||
// #define MATRIX_COL_PINS { D0, D4, F6, D7, E6, B4 }
|
||||
|
||||
// these are with USB on the right.
|
||||
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
|
||||
#define MATRIX_COL_PINS { B4, E6, D7, F6, D4, D0 }
|
||||
|
||||
#define CATERINA_BOOTLOADER
|
||||
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_PIN B5
|
||||
|
||||
/* 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 AUDIO_VOICES
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
280
keyboards/gherkin/keymaps/mjt/keymap.c
Normal file
280
keyboards/gherkin/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,280 @@
|
||||
#include "gherkin.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
//Tap Dance Declarations
|
||||
enum {
|
||||
TD_Z_LCTL = 0,
|
||||
TD_X_LGUI = 1,
|
||||
TD_C_LALT = 2,
|
||||
TD_A_TAB = 3,
|
||||
TD_Q_ESC = 4,
|
||||
// M(0)
|
||||
};
|
||||
|
||||
//Friendly Layer Names
|
||||
enum gherkin_layers {
|
||||
_QWERTY,
|
||||
_SONGS,
|
||||
_NUMBERS,
|
||||
_SYMBOLS,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
// custom keycodes
|
||||
enum gherkin_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
NUMBERS,
|
||||
SYMBOLS,
|
||||
SONGS,
|
||||
PLOVER,
|
||||
BACKLIT,
|
||||
MACSLEEP,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = KEYMAP(
|
||||
TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
TD(TD_A_TAB), LT(_SYMBOLS,KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_ADJUST,KC_SPC),
|
||||
TD(TD_Z_LCTL), TD(TD_X_LGUI), TD(TD_C_LALT), KC_V, KC_B, LT(_NUMBERS, KC_N), KC_M, KC_COMM, KC_DOT, SFT_T(KC_ENT))
|
||||
,
|
||||
[_NUMBERS] = KEYMAP(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_HOME, KC_PGDN, KC_PGUP, KC_END ,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, LT(_ADJUST,KC_F11), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT)
|
||||
,
|
||||
[_SYMBOLS] = KEYMAP(
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
|
||||
KC_GRV, _______, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, KC_MINS, KC_EQL , KC_SCLN, KC_QUOT,
|
||||
KC_TILD, MO(_ADJUST), XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, KC_UNDS, KC_PLUS, S(KC_SCLN), S(KC_QUOT))
|
||||
,
|
||||
[_PLOVER] = KEYMAP(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_1, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX)
|
||||
,
|
||||
[_ADJUST] = KEYMAP(
|
||||
RESET, _______, _______, _______, _______, QWERTY, NUMBERS, SYMBOLS, PLOVER, SONGS,
|
||||
MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, MACSLEEP, _______,
|
||||
BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______)
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NUMBERS:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_dvorak);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_NUMBERS);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SYMBOLS:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_colemak);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_SYMBOLS);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(tone_plover);
|
||||
#endif
|
||||
layer_off(_NUMBERS);
|
||||
layer_off(_SYMBOLS);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_plover_gb);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MACSLEEP:
|
||||
if (record->event.pressed) {
|
||||
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
keyevent_t event = record->event;
|
||||
|
||||
switch (id) {
|
||||
case 0: {
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
}
|
||||
else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap.
|
||||
return MACRO( D(LSFT), END );
|
||||
}
|
||||
else {
|
||||
return MACRO( T(N), END );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}*/
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
//Tap once for Esc, twice for Caps Lock
|
||||
[TD_Z_LCTL] = ACTION_TAP_DANCE_DOUBLE(KC_Z, KC_LCTL),
|
||||
[TD_X_LGUI] = ACTION_TAP_DANCE_DOUBLE(KC_X, KC_LGUI),
|
||||
[TD_C_LALT] = ACTION_TAP_DANCE_DOUBLE(KC_C, KC_LALT),
|
||||
[TD_A_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB),
|
||||
[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)
|
||||
};
|
||||
|
||||
// don't know what this is doing...
|
||||
/*
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRD |= (1 << 5); PORTD &= ~(1 << 5);
|
||||
} else {
|
||||
DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
|
||||
} else {
|
||||
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
77
keyboards/hhkb/keymaps/mjt/config.h
Normal file
77
keyboards/hhkb/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0xCAFE
|
||||
#define DEVICE_VER 0x0104
|
||||
#define MANUFACTURER q.m.k
|
||||
#define PRODUCT HHKB mod
|
||||
#define DESCRIPTION q.m.k keyboard firmware for HHKB
|
||||
|
||||
/* key matrix size */
|
||||
#ifdef HHKB_JP
|
||||
# define MATRIX_ROWS 16
|
||||
#else
|
||||
# define MATRIX_ROWS 8
|
||||
#endif
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 50
|
||||
|
||||
/* 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 */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
114
keyboards/hhkb/keymaps/mjt/keymap.c
Normal file
114
keyboards/hhkb/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,114 @@
|
||||
/* -*- eval: (turn-on-orgtbl); -*-
|
||||
* default HHKB Layout
|
||||
*/
|
||||
#include "hhkb.h"
|
||||
|
||||
#define BASE 0
|
||||
#define HHKB 1
|
||||
#define FUNK 2
|
||||
#define DYN 3
|
||||
#define CTL_ESC CTL_T(KC_ESC)
|
||||
#define MACSLEEP LCTL(LSFT(KC_POWER))
|
||||
|
||||
enum hhkb_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
DYNKEY,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BASE Level: Default Layer
|
||||
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
|
||||
| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
|
||||
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | |
|
||||
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
|
||||
| Cont | A | S | D | F | G | H | J | K | L | ; | ' | Ent | | |
|
||||
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | |
|
||||
|-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
|
||||
|
||||
|------+------+-----------------------+------+------|
|
||||
| LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
|
||||
|------+------+-----------------------+------+------|
|
||||
*/
|
||||
|
||||
[BASE] = KEYMAP( // default layer
|
||||
KC_GRV, 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_DEL, \
|
||||
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, \
|
||||
CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), TT(FUNK), \
|
||||
KC_LALT, KC_LGUI, /* */ KC_SPC, MO(DYN), KC_RALT),
|
||||
|
||||
|
||||
|
||||
/* Layer HHKB: HHKB mode (HHKB Fn)
|
||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||
| Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
|
||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||
| Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | |
|
||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||
| | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | |
|
||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||
| | | | | | | + | - | End | PgD | Dow | | | | |
|
||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||
|
||||
|------+------+----------------------+------+------+
|
||||
| **** | **** | ******************** | **** | **** |
|
||||
|------+------+----------------------+------+------+
|
||||
|
||||
|
||||
|
||||
[HHKB] = KEYMAP(
|
||||
KC_PWR, 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_INS, KC_DEL, \
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \
|
||||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
*/
|
||||
[FUNK] = KEYMAP(
|
||||
KC_PWR, 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_INS, KC_DEL, \
|
||||
KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
[DYN] = KEYMAP(
|
||||
KC_TRNS, DYN_REC_START1, DYN_REC_START2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACSLEEP, KC_HOME, KC_END , KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_TRNS, KC_TRNS, \
|
||||
KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_TRNS, KC_TRNS)
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t macro_kc = (keycode == MO(DYN) ? DYN_REC_STOP : keycode);
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
16
keyboards/hhkb/keymaps/mjt/readme.md
Normal file
16
keyboards/hhkb/keymaps/mjt/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Mike's HHKB
|
||||
|
||||
- Surprisingly stock for the most part
|
||||
- Dynamic macros
|
||||
- ctrl key has tapkey for escape
|
||||
- right shift has tapkey for enter
|
||||
- Works with iPhone Camera Adapter
|
||||
|
||||
## Layers
|
||||
|
||||
Base for letters and mods.
|
||||
|
||||
Funk layer is my tweaked function layer
|
||||
|
||||
Dyn layer has dynamic macros. Record with 1 and 2, playback with \ and
|
||||
upper-right-most key. Also turns the arrow clusters into nav keys.
|
@@ -19,8 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#ifdef INFINITY_PROTOTYPE
|
||||
#define LAYOUT_60_ansi_split_bs_rshift KEYMAP
|
||||
|
||||
#ifdef INFINITY_PROTOTYPE
|
||||
/* Infinity prototype */
|
||||
#define KEYMAP( \
|
||||
K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K86, \
|
||||
|
@@ -65,3 +65,5 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
|
||||
LAYOUTS = 60_ansi_split_bs_rshift
|
21
keyboards/jd45/keymaps/mjt/Makefile
Normal file
21
keyboards/jd45/keymaps/mjt/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
85
keyboards/jd45/keymaps/mjt/config.h
Normal file
85
keyboards/jd45/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER geekhack
|
||||
#define PRODUCT JD45
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for JD45
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 13
|
||||
|
||||
/* Planck PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { F0, F1, F5, B4 }
|
||||
#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2, B0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 50
|
||||
#define BACKLIGHT_BREATHING
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
80
keyboards/jd45/keymaps/mjt/keymap.c
Normal file
80
keyboards/jd45/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,80 @@
|
||||
#include "jd45.h"
|
||||
|
||||
/* Mike's Layout for JD45 with backlight LEDs acting as layer indicator
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS,
|
||||
FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT,
|
||||
FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,
|
||||
NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO ),
|
||||
[1] = KEYMAP(
|
||||
GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
|
||||
TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS ),
|
||||
[2] = KEYMAP(
|
||||
TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4,
|
||||
TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
|
||||
TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS )
|
||||
/* ,
|
||||
[3] = KEYMAP(
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, BTLD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
|
||||
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS )*/
|
||||
};
|
||||
|
||||
enum macro_id {
|
||||
M_LAYER1,
|
||||
M_LAYER2
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT),
|
||||
// [1] = ACTION_LAYER_TAP_TOGGLE(1),
|
||||
[1] = ACTION_MACRO(M_LAYER1),
|
||||
[2] = ACTION_LAYER_TAP_TOGGLE(2),
|
||||
[3] = ACTION_BACKLIGHT_STEP(),
|
||||
[4] = ACTION_BACKLIGHT_TOGGLE()
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case M_LAYER1:
|
||||
// need to add a timer for doubletap: https://github.com/jackhumbert/qmk_firmware/wiki#timer-functionality
|
||||
// action_function_tap may also handle this...
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_enable();
|
||||
layer_on(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(1);
|
||||
}
|
||||
break;
|
||||
case M_LAYER2:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(2);
|
||||
breathing_pulse();
|
||||
layer_on(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
12
keyboards/jd45/keymaps/mjt/readme.md
Normal file
12
keyboards/jd45/keymaps/mjt/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# Mike's JD45 standard layout
|
||||
|
||||
- Backlight that matches active layer
|
||||
- Works with iPhone Camera Adapter
|
||||
|
||||
## Layers
|
||||
|
||||
Base for letters and mods.
|
||||
|
||||
Function 1 layer adds a centered numpad to the board
|
||||
|
||||
Function 2 layer replaces the numpad numbers with Fkeys.
|
67
keyboards/jd45/keymaps/mjt/rules.mk
Normal file
67
keyboards/jd45/keymaps/mjt/rules.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
# UNICODE_ENABLE = YES # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
23
keyboards/jd45/keymaps/mjt6u/Makefile
Normal file
23
keyboards/jd45/keymaps/mjt6u/Makefile
Normal file
@@ -0,0 +1,23 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
DEBUG_ENABLE = yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
84
keyboards/jd45/keymaps/mjt6u/config.h
Normal file
84
keyboards/jd45/keymaps/mjt6u/config.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER geekhack
|
||||
#define PRODUCT JD45
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for JD45
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 13
|
||||
|
||||
/* Planck PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { F0, F1, F5, B4 }
|
||||
#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2, B0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 50
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
149
keyboards/jd45/keymaps/mjt6u/keymap.c
Normal file
149
keyboards/jd45/keymaps/mjt6u/keymap.c
Normal file
@@ -0,0 +1,149 @@
|
||||
#include "jd45.h"
|
||||
|
||||
enum jd45_layers
|
||||
{
|
||||
_QWERTY,
|
||||
_QWERTYNUMMODS,
|
||||
_NUMSYM,
|
||||
_FUNCTION,
|
||||
_NUMPAD,
|
||||
_FKEYNUMPAD,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum jd45_keycodes
|
||||
{
|
||||
NUMSYM = SAFE_RANGE,
|
||||
MACSLEEP,
|
||||
USEFNMODS,
|
||||
USENUMMODS,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
#define LAYER_TOGGLE_DELAY 900
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define __MOD__ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define F_FNSPC F(0)
|
||||
#define F_NUMSPC F(1)
|
||||
#define F_FNTAB F(2)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = {
|
||||
{F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC},
|
||||
{CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
|
||||
{ XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_FNSPC, XXXXXXX, XXXXXXX, MO(_FUNCTION), MO(_ADJUST) }
|
||||
},
|
||||
[_QWERTYNUMMODS] = {
|
||||
{F_FNTAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSPC},
|
||||
{CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(_ADJUST, KC_QUOT)},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT)},
|
||||
{XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, F_NUMSPC, XXXXXXX, XXXXXXX, MO(_FKEYNUMPAD), MO(_ADJUST) }
|
||||
},
|
||||
[_NUMSYM] = {
|
||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL},
|
||||
{__MOD__, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______},
|
||||
{_______, _______, _______, _______, _______, KC_SPC, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______},
|
||||
{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
|
||||
},
|
||||
[_FUNCTION] = {
|
||||
{__MOD__, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{__MOD__, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{XXXXXXX, __MOD__, __MOD__, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__ , __MOD__}
|
||||
},
|
||||
[_NUMPAD] = {
|
||||
{KC_GRV, _______, KC_UP, _______, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_PSCR, KC_LBRC, KC_RBRC},
|
||||
{_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_4, KC_5, KC_6, KC_INS, KC_HOME, KC_PGUP, _______, _______},
|
||||
{_______, _______, _______, _______, KC_1, KC_2, KC_3, KC_DEL, KC_END, KC_PGDN, _______, _______},
|
||||
{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
|
||||
},
|
||||
[_FKEYNUMPAD] = {
|
||||
{_______, _______, KC_VOLU, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, _______},
|
||||
{_______, KC_MPRV, KC_VOLD, KC_MNXT, KC_F4, KC_F5, KC_F6, KC_J, KC_K, KC_L, KC_SCLN, _______},
|
||||
{_______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_MUTE, KC_MPRV, KC_MNXT, KC_MSTP, _______},
|
||||
{XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__ }
|
||||
},
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, KC_PSCR, _______, _______},
|
||||
{ _______, _______, _______, _______, USEFNMODS, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, MACSLEEP, _______, _______},
|
||||
{ _______, _______, _______, _______, _______, _______, USENUMMODS, _______, _______, _______, _______, _______},
|
||||
{XXXXXXX, _______, _______,XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, __MOD__, __MOD__}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_TAP_KEY(_NUMSYM, KC_SPC),
|
||||
[1] = ACTION_LAYER_TAP_KEY(_NUMPAD, KC_SPC),
|
||||
[2] = ACTION_LAYER_TAP_KEY(_FUNCTION, KC_TAB),
|
||||
};
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
static bool singular_key = false;
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode);
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
println(" ");
|
||||
print("process record");
|
||||
|
||||
switch (keycode) {
|
||||
case MACSLEEP:
|
||||
if (record->event.pressed) {
|
||||
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case USEFNMODS:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_fnpc, false, 0);
|
||||
#endif
|
||||
print("Space-FN");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case USENUMMODS:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_QWERTYNUMMODS);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_fnmac, false, 0);
|
||||
#endif
|
||||
print("Space-Numpad");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
singular_key = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
// debug_enable = true;
|
||||
}
|
23
keyboards/jd45/keymaps/mjt6u/readme.md
Normal file
23
keyboards/jd45/keymaps/mjt6u/readme.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Mike's JD45 with 6u Spacebar
|
||||
|
||||
- Early draft of numsym that misses a lot of symbols
|
||||
- Numpad layer available for evaluation
|
||||
- Works with iPhone Camera Adapter
|
||||
- Dynamic macros
|
||||
|
||||
## Layers
|
||||
|
||||
Qwerty for letters and mods.
|
||||
|
||||
Qwertymods layer switches some Modifiers around
|
||||
|
||||
Numsym puts the number keys across the top row like a Planck. Arrows are on hjkl
|
||||
which makes the other NumSym dynamic from my other boards fall apart
|
||||
|
||||
Function layer replaces the top row numbers with Fkeys.
|
||||
|
||||
Numpad layer makes a number pad in the center.
|
||||
|
||||
Fkeynumpad replaces the numpad numbers with Fkeys.
|
||||
|
||||
Adjust layer has macros and configuration.
|
@@ -1,2 +1,2 @@
|
||||
:0B0000000000000000000000000001F4
|
||||
:00000001FF
|
||||
:0F000000000000000000000000000000000001F0
|
||||
:00000001FF
|
||||
|
@@ -1,2 +1,2 @@
|
||||
:0B0000000000000000000000000000F5
|
||||
:00000001FF
|
||||
:0F000000000000000000000000000000000000F1
|
||||
:00000001FF
|
||||
|
7
keyboards/lets_split/keymaps/mbsurfer/Makefile
Normal file
7
keyboards/lets_split/keymaps/mbsurfer/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
TAP_DANCE_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
USE_I2C = no
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
43
keyboards/lets_split/keymaps/mbsurfer/config.h
Normal file
43
keyboards/lets_split/keymaps/mbsurfer/config.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define TAPPING_TERM 100
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
//#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
#define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 8
|
||||
|
||||
#endif
|
248
keyboards/lets_split/keymaps/mbsurfer/keymap.c
Normal file
248
keyboards/lets_split/keymaps/mbsurfer/keymap.c
Normal file
@@ -0,0 +1,248 @@
|
||||
#include "lets_split.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern rgblight_config_t rgblight_config;
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// Tap Dance Declarations
|
||||
enum {
|
||||
SFT_CAP = 0,
|
||||
LFT_HOM,
|
||||
DWN_PDN,
|
||||
UPP_PUP,
|
||||
RGT_END
|
||||
};
|
||||
|
||||
// Task Manager
|
||||
#define C_S_ESC LSFT(LCTL(KC_ESC))
|
||||
#define C_A_DEL LALT(LCTL(KC_DEL))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,------------------------------------------ ------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
|
||||
* `------------------------------------------ ------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP( \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
TD(SFT_CAP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
|
||||
ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, TD(LFT_HOM), TD(DWN_PDN), TD(UPP_PUP), TD(RGT_END) \
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,------------------------------------------ ------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
|
||||
* `------------------------------------------ ------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = KEYMAP( \
|
||||
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_ESC, 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_LCTL, 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 |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up |Right |
|
||||
* `------------------------------------------ ------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = KEYMAP( \
|
||||
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_ESC, 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_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,------------------------------------------ ------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO ~ |ISO | | END | HOME |Enter |
|
||||
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||
* | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `------------------------------------------ ------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP( \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_END, KC_HOME, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,------------------------------------------ ------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | F12 |ISO # |ISO / |PG DN |PG UP |Enter |
|
||||
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||
* | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `------------------------------------------ ------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
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_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,------------------------------------------ ------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm| |AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------- -------+------+------+------+------+------|
|
||||
* | |Toggle| Mode | Hue- | Hue+ | Sat- | | Sat+ | Val- | Val+ | | | | (RGB)
|
||||
* |------+------+------+------+------+------+ +------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |TskMng|CAltDe|
|
||||
* `------------------------------------------ ------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = KEYMAP( \
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, C_S_ESC, C_A_DEL \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
int RGB_current_mode;
|
||||
int RGB_current_hue;
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[SFT_CAP] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
|
||||
[LFT_HOM] = ACTION_TAP_DANCE_DOUBLE(KC_LEFT, KC_HOME),
|
||||
[DWN_PDN] = ACTION_TAP_DANCE_DOUBLE(KC_DOWN, KC_PGDN),
|
||||
[UPP_PUP] = ACTION_TAP_DANCE_DOUBLE(KC_UP, KC_PGUP),
|
||||
[RGT_END] = ACTION_TAP_DANCE_DOUBLE(KC_RGHT, KC_END)
|
||||
};
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL<<_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
|
||||
// Save current RGB info
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
RGB_current_hue = rgblight_config.hue;
|
||||
|
||||
// Set RGB to Blue
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0, 0, 254);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
|
||||
// Reset RGB
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
|
||||
// Save current RGB info
|
||||
RGB_current_mode = rgblight_config.mode;
|
||||
RGB_current_hue = rgblight_config.hue;
|
||||
|
||||
// Set RGB to Green
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0, 254, 0);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
|
||||
// Reset RGB
|
||||
rgblight_mode(RGB_current_mode);
|
||||
rgblight_sethsv(RGB_current_hue, rgblight_config.sat, rgblight_config.val);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
25
keyboards/lets_split/keymaps/mjt/Makefile
Normal file
25
keyboards/lets_split/keymaps/mjt/Makefile
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
ONEHAND_ENABLE = no # Enable one-hand typing
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
38
keyboards/lets_split/keymaps/mjt/config.h
Normal file
38
keyboards/lets_split/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
#ifdef SUBPROJECT_rev1
|
||||
#include "../../rev1/config.h"
|
||||
#endif
|
||||
#ifdef SUBPROJECT_rev2
|
||||
#include "../../rev2/config.h"
|
||||
#endif
|
||||
#ifdef SUBPROJECT_rev2fliphalf
|
||||
#include "../../rev2fliphalf/config.h"
|
||||
#endif
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 10
|
217
keyboards/lets_split/keymaps/mjt/keymap.c
Normal file
217
keyboards/lets_split/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,217 @@
|
||||
#include "lets_split.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _COLEMAK 1
|
||||
#define _DVORAK 2
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _ADJUST 16
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP( \
|
||||
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_ESC, 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_LCTL, 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 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = KEYMAP( \
|
||||
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_ESC, 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_LCTL, 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 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = KEYMAP( \
|
||||
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_ESC, 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_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP( \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
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_NUHS, KC_NUBS, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = KEYMAP( \
|
||||
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
|
||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||
#endif
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
|
||||
#endif
|
||||
persistent_default_layer_set(1UL<<_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
@@ -1 +1,16 @@
|
||||
#include "lets_split.h"
|
||||
#include "lets_split.h"
|
||||
|
||||
#ifdef ONEHAND_ENABLE
|
||||
__attribute__ ((weak))
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
{{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
|
||||
{{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}},
|
||||
{{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}},
|
||||
{{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}},
|
||||
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}},
|
||||
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}},
|
||||
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}},
|
||||
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}},
|
||||
};
|
||||
#endif
|
||||
|
@@ -2,11 +2,7 @@
|
||||
#define SPLIT_KEYBOARD_UTIL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef EE_HANDS
|
||||
#define EECONFIG_BOOTMAGIC_END (uint8_t *)10
|
||||
#define EECONFIG_HANDEDNESS EECONFIG_BOOTMAGIC_END
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
#define SLAVE_I2C_ADDRESS 0x32
|
||||
|
||||
|
17
keyboards/mitosis/keymaps/mjt/Makefile
Normal file
17
keyboards/mitosis/keymaps/mjt/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # 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.
|
||||
API_SYSEX_ENABLE = no
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
24
keyboards/mitosis/keymaps/mjt/config.h
Normal file
24
keyboards/mitosis/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define AUDIO_VOICES
|
||||
#define C6_AUDIO
|
||||
|
||||
// fix iPhone power adapter issue
|
||||
#define USB_MAX_POWER_CONSUMPTION 50
|
||||
|
||||
|
||||
#endif
|
343
keyboards/mitosis/keymaps/mjt/keymap.c
Normal file
343
keyboards/mitosis/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,343 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include "mitosis.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum mitosis_layers
|
||||
{
|
||||
_QWERTY,
|
||||
_SHIFTED,
|
||||
_FUNCTIONPC,
|
||||
_FUNCTIONMAC,
|
||||
_FUNCSHIFT,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum mitosis_keycodes
|
||||
{
|
||||
FNKEY = SAFE_RANGE,
|
||||
SHIFT,
|
||||
MACSLEEP,
|
||||
FNMAC,
|
||||
FNPC,
|
||||
AUDIOTEST,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
|
||||
// Macro definitions for readability
|
||||
enum mitosis_macros
|
||||
{
|
||||
VOLU,
|
||||
VOLD,
|
||||
ESCM
|
||||
};
|
||||
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
#define LAYER_TOGGLE_DELAY 900
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define __MOD__ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = { /* QWERTY adapted to this crazy thing */
|
||||
{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, KC_SCLN },
|
||||
{SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) },
|
||||
{XXXXXXX, KC_LCTL, M(ESCM), KC_TAB, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX },
|
||||
{XXXXXXX, KC_LALT, KC_LGUI, KC_SPC, SHIFT, FNKEY, KC_BSPC, KC_ENT, MO(_ADJUST), XXXXXXX }
|
||||
},
|
||||
|
||||
|
||||
[_SHIFTED] = { /* Shifted Layer, layered so that tri_layer can be used, or selectively
|
||||
able to modify individual key's shifted behaviour */
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{XXXXXXX, __MOD__, KC_DEL, _______, _______, _______, _______, _______, _______, XXXXXXX },
|
||||
{XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, _______, KC_NO, XXXXXXX }
|
||||
},
|
||||
|
||||
|
||||
[_FUNCTIONPC] = { /* Function Layer mimicks planck's raise layer somewhat */
|
||||
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 },
|
||||
{LCTL(KC_A), LCTL(KC_S), _______, LCTL(KC_F),_______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC },
|
||||
{LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V),_______, _______, KC_BSLS, _______, _______, KC_QUOT },
|
||||
{XXXXXXX, __MOD__, KC_DEL, _______, KC_GRV, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX },
|
||||
{XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, KC_PSCR, KC_NO, XXXXXXX }
|
||||
},
|
||||
|
||||
[_FUNCTIONMAC] = { /* Function Layer mimicks planck's raise layer somewhat */
|
||||
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 },
|
||||
{LGUI(KC_A), LGUI(KC_S), _______, LGUI(KC_F),_______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC },
|
||||
{LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V),_______, _______, KC_BSLS, _______, _______, KC_QUOT },
|
||||
{XXXXXXX, __MOD__, KC_DEL, _______, KC_GRV, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX },
|
||||
{XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, KC_PSCR, KC_NO, XXXXXXX }
|
||||
},
|
||||
|
||||
[_FUNCSHIFT] = { /* Function Shifted Layer mimicks planck's lower layer somewhat */
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_LCBR, KC_RCBR },
|
||||
{KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______ },
|
||||
{XXXXXXX, __MOD__, KC_DEL, _______, KC_TILD, _______, _______, _______, _______, XXXXXXX },
|
||||
{XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, _______, _______, XXXXXXX }
|
||||
},
|
||||
|
||||
|
||||
[_ADJUST] = { /* Adjust layer for fancy stuff and macros */
|
||||
{RESET, FNPC, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______ },
|
||||
{FNMAC, _______, AU_ON, AU_OFF, _______, _______, _______, _______, MACSLEEP, _______ },
|
||||
{MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY },
|
||||
{XXXXXXX, __MOD__, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, XXXXXXX },
|
||||
{XXXXXXX, __MOD__, __MOD__, _______, __MOD__, __MOD__, _______, _______, __MOD__, XXXXXXX }
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_fnpc[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_fnmac[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
static uint16_t function_layer = _FUNCTIONMAC;
|
||||
static uint16_t key_timer;
|
||||
|
||||
void persistent_function_layer_set(uint16_t new_function_layer) {
|
||||
// eeconfig_update_function_layer(new_function_layer);
|
||||
function_layer = new_function_layer;
|
||||
// should clear layers to avoid getting stuck.
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
|
||||
//switch multiplexing for media, short tap for volume up, long press for play/pause
|
||||
case VOLU:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read(); // if the key is being pressed, we start the timer.
|
||||
} else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down").
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) { // LONGPRESS_DELAY being 150ms, the threshhold we pick for counting something as a tap.
|
||||
return MACRO(T(MPLY), END);
|
||||
} else {
|
||||
return MACRO(T(VOLU), END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//switch multiplexing for media, short tap for volume down, long press for next track
|
||||
case VOLD:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
|
||||
return MACRO(T(MNXT), END);
|
||||
} else {
|
||||
return MACRO(T(VOLD), END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//switch multiplexing for escape, short tap for escape, long press for context menu
|
||||
case ESCM:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) > LONGPRESS_DELAY) {
|
||||
return MACRO(T(APP), END);
|
||||
} else {
|
||||
return MACRO(T(ESC), END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
static bool singular_key = false;
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t macro_kc = (keycode == MO(_ADJUST) ? DYN_REC_STOP : keycode);
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
uint8_t layer;
|
||||
layer = biton32(layer_state); // get the current layer
|
||||
|
||||
//custom layer handling for tri_layer,
|
||||
switch (keycode) {
|
||||
case MACSLEEP:
|
||||
if (record->event.pressed) {
|
||||
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FNKEY:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
singular_key = true;
|
||||
// layer_on(_FUNCTION);
|
||||
layer_on(function_layer);
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
|
||||
layer_off(function_layer);
|
||||
}
|
||||
}
|
||||
update_tri_layer(function_layer, _SHIFTED, _FUNCSHIFT);
|
||||
return false;
|
||||
break;
|
||||
//SHIFT is handled as LSHIFT in the general case
|
||||
case SHIFT:
|
||||
if (record->event.pressed) {
|
||||
key_timer = timer_read();
|
||||
singular_key = true;
|
||||
layer_on(_SHIFTED);
|
||||
register_code(KC_LSFT);
|
||||
} else {
|
||||
if (timer_elapsed(key_timer) < LAYER_TOGGLE_DELAY || !singular_key) {
|
||||
layer_off(_SHIFTED);
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
}
|
||||
update_tri_layer(function_layer, _SHIFTED, _FUNCSHIFT);
|
||||
return false;
|
||||
break;
|
||||
case FNPC:
|
||||
if (record->event.pressed) {
|
||||
persistent_function_layer_set(_FUNCTIONPC);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_fnpc);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FNMAC:
|
||||
if (record->event.pressed) {
|
||||
persistent_function_layer_set(_FUNCTIONMAC);
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_fnmac);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case AUDIOTEST:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(music_scale);
|
||||
register_code(KC_M);
|
||||
unregister_code(KC_M);
|
||||
#endif
|
||||
register_code(KC_A);
|
||||
} else {
|
||||
unregister_code(KC_A);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
//If any other key was pressed during the layer mod hold period,
|
||||
//then the layer mod was used momentarily, and should block latching
|
||||
default:
|
||||
singular_key = false;
|
||||
break;
|
||||
}
|
||||
|
||||
//FUNCSHIFT has been shifted by the SHIFT handling, some keys need to be excluded
|
||||
if (layer == _FUNCSHIFT) {
|
||||
//F1-F12 should be sent as unshifted keycodes,
|
||||
//and ] needs to be unshifted or it is sent as }
|
||||
if ( (keycode >= KC_F1 && keycode <= KC_F12)
|
||||
|| keycode == KC_RBRC ) {
|
||||
if (record->event.pressed) {
|
||||
unregister_mods(MOD_LSFT);
|
||||
} else {
|
||||
register_mods(MOD_LSFT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
set_led_off;
|
||||
break;
|
||||
case _FUNCTIONMAC:
|
||||
set_led_blue;
|
||||
break;
|
||||
case _FUNCTIONPC:
|
||||
set_led_cyan;
|
||||
break;
|
||||
case _SHIFTED:
|
||||
set_led_red;
|
||||
break;
|
||||
case _FUNCSHIFT:
|
||||
set_led_green;
|
||||
break;
|
||||
case _ADJUST:
|
||||
set_led_white;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
@@ -68,8 +68,8 @@ Gaming mode (Raise)
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| CTRL | | | | F | | | | | | | |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Shift| Z | | | | | | | | | | |
|
||||
| Shift| Z | | | | | | | | | | GUI |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY|
|
||||
| Enter| | Lock | Bksp | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY|
|
||||
`-----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
@@ -35,11 +35,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \
|
||||
KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, TG(_GAME), KC_DEL \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \
|
||||
KC_ESC, KC_A, KC_S, KC_D, LT(_VIM, KC_F), KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \
|
||||
KC_LCTL, KC_LALT, KC_F4, KC_LGUI, OSL(_LOWER), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, TG(_GAME), KC_DEL \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
@@ -56,11 +56,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP( \
|
||||
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \
|
||||
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \
|
||||
M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \
|
||||
KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \
|
||||
KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \
|
||||
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \
|
||||
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \
|
||||
M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \
|
||||
KC_PSCR, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Vim Movement (Hold down F)
|
||||
@@ -77,11 +77,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_VIM] = KEYMAP( \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, M(DLEFT), M(DRIGHT), KC_LCTL, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
|
||||
/* Gaming mode (Raise)
|
||||
@@ -93,24 +93,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | CTRL | | | | F | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Shift| Z | | | | | | | | | | |
|
||||
* | Shift| Z | | | | | | | | | | GUI |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Enter| | Lock | | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY|
|
||||
* | Enter| | Lock | Bksp | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_GAME] = KEYMAP( \
|
||||
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_ENT, _______, KC_LOCK, _______, KC_LALT, KC_SPC, OSL(_LOWER), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(_QWERTY) \
|
||||
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \
|
||||
KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, \
|
||||
KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSL(_LOWER), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(_QWERTY) \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
@@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define MANUFACTURER Ortholinear Keyboards
|
||||
#define MANUFACTURER OLKB
|
||||
#define PRODUCT The Planck Keyboard
|
||||
#define DESCRIPTION A compact ortholinear keyboard
|
||||
|
||||
|
@@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
|
||||
{_______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL },
|
||||
{_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______},
|
||||
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
|
3
keyboards/planck/keymaps/mjt/Makefile
Normal file
3
keyboards/planck/keymaps/mjt/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
33
keyboards/planck/keymaps/mjt/config.h
Normal file
33
keyboards/planck/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
// #define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
// fix iPhone power adapter issue
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 50
|
||||
|
||||
#endif
|
283
keyboards/planck/keymaps/mjt/keymap.c
Normal file
283
keyboards/planck/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,283 @@
|
||||
// This is MJT's bastardization of the planck and minivan defaults
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST,
|
||||
_DYN
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
PLOVER,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT,
|
||||
EXT_PLV,
|
||||
MACSLEEP,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{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_ESC, 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, SFT_T(KC_ENT) },
|
||||
{MO(_DYN), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
|
||||
{KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
||||
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Dn |Pg Up | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Home |Pg Dn |Pg Up | End |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{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_NUHS, KC_NUBS, KC_PGDN, KC_PGUP, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | |Pause |PR SC | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| |Sleep |Plover| |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |TogLED| | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL },
|
||||
{_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
|
||||
{_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
},
|
||||
[_DYN] = {
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ },
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][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 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);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t macro_kc = (keycode == MO(_DYN) ? DYN_REC_STOP : keycode);
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(tone_plover);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_plover_gb);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MACSLEEP:
|
||||
if (record->event.pressed) {
|
||||
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
22
keyboards/planck/keymaps/mjt/readme.md
Normal file
22
keyboards/planck/keymaps/mjt/readme.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Mike's Plancklike Planck
|
||||
|
||||
- Music/Audio
|
||||
- Dynamic Macros
|
||||
- Media Keys
|
||||
- Works with iPhone Camera Adapter
|
||||
|
||||
## Layers
|
||||
|
||||
Qwerty for letters and mods.
|
||||
|
||||
Raise and Lower are mostly default with a few tweaks.
|
||||
|
||||
Adjust layer is tough to get to so it is only for keyboard configuration stuff.
|
||||
|
||||
## Dynamic Macros
|
||||
|
||||
Hold TAB key, then press ";" to record macro 1 and "'" to record macro 2.
|
||||
|
||||
When you are done recording, press TAB again.
|
||||
|
||||
For playback of macros, TAB+"," plays macro 1 and TAB+","plays macro 2.
|
3
keyboards/planck/keymaps/mjtnumsym/Makefile
Normal file
3
keyboards/planck/keymaps/mjtnumsym/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
33
keyboards/planck/keymaps/mjtnumsym/config.h
Normal file
33
keyboards/planck/keymaps/mjtnumsym/config.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
// #define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
// fix iPhone power adapter issue
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 50
|
||||
|
||||
#endif
|
282
keyboards/planck/keymaps/mjtnumsym/keymap.c
Normal file
282
keyboards/planck/keymaps/mjtnumsym/keymap.c
Normal file
@@ -0,0 +1,282 @@
|
||||
// This is MJT's bastardization of the planck and minivan defaults
|
||||
|
||||
#include "planck.h"
|
||||
#include "action_layer.h"
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_FKEYS,
|
||||
_NUMSYM,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
PLOVER,
|
||||
FKEYS,
|
||||
NUMSYM,
|
||||
BACKLIT,
|
||||
EXT_PLV,
|
||||
MACSLEEP,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |FKEYS | Space |NUMSYM | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{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_ESC, 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, SFT_T(KC_ENT) },
|
||||
{KC_LCTL, KC_LCTL, KC_LALT, KC_LGUI, FKEYS, KC_SPC, KC_SPC, NUMSYM, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* FKEYS
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F11 | F12 | F13 | F14 | F15 | | |Sleep | | Rec1 | Rec2 |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | Mac1 | Mac2 | | Stop |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FKEYS] = {
|
||||
{KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______},
|
||||
{KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F6, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, DYN_REC_STOP},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
|
||||
/* NUMSYM
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | ' |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | _ | + | { | } | | | - | = | [ | ] | \ | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Home |Pg Dn |Pg Up | End |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NUMSYM] = {
|
||||
{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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______},
|
||||
{_______,KC_UNDS, KC_PLUS,KC_LCBR, KC_RCBR, KC_PIPE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (FKEYS + NUMSYM)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | Reset| | | | | | | |Pause |PR SC | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| |Sleep |Plover| |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |TogLED| | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{_______ , RESET, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, KC_PSCR, KC_DEL },
|
||||
{_______ , _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
|
||||
{_______ , MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
|
||||
{BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
} /*,
|
||||
[_DYN] = {
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, _______ },
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______}
|
||||
}*/
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][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 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);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t macro_kc = (keycode == FKEYS ? DYN_REC_STOP : keycode);
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_qwerty);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FKEYS:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FKEYS);
|
||||
update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
|
||||
} else {
|
||||
layer_off(_FKEYS);
|
||||
update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NUMSYM:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_NUMSYM);
|
||||
update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
|
||||
} else {
|
||||
layer_off(_NUMSYM);
|
||||
update_tri_layer(_FKEYS, _NUMSYM, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(tone_plover);
|
||||
#endif
|
||||
layer_off(_NUMSYM);
|
||||
layer_off(_FKEYS);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(tone_plover_gb);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MACSLEEP:
|
||||
if (record->event.pressed) {
|
||||
// ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_POWER);
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
26
keyboards/planck/keymaps/mjtnumsym/readme.md
Normal file
26
keyboards/planck/keymaps/mjtnumsym/readme.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Mike's Rethought Planck
|
||||
|
||||
- Music/Audio
|
||||
- Dynamic Macros
|
||||
- Media Keys
|
||||
- Works with iPhone Camera Adapter
|
||||
|
||||
## Layers
|
||||
|
||||
Qwerty for letters and mods.
|
||||
|
||||
Numsym for all numbers and symbols used in typing. Follows a similar approach to
|
||||
planck but puts both on the same layer eschewing the F-keys.
|
||||
|
||||
Fkeys layer is for the seldom used stuff like F-keys and some additional features
|
||||
such as dynamic macros, media keys, and a sleep shortcut for OS X.
|
||||
|
||||
Adjust layer is mainly for keyboard configuration stuff.
|
||||
|
||||
## Dynamic Macros
|
||||
|
||||
Hold TAB key, then press ";" to record macro 1 and "'" to record macro 2.
|
||||
|
||||
When you are done recording, press TAB again.
|
||||
|
||||
For playback of macros, TAB+"," plays macro 1 and TAB+","plays macro 2.
|
@@ -53,10 +53,10 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = yes # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
|
@@ -32,6 +32,7 @@ Designed and built in Felton, CA, Clueboards keyboard emphasize quality and loca
|
||||
|
||||
These keyboards are part of the QMK repository, but their manufacturers are not official maintainers of the repository.
|
||||
|
||||
* [9key](/keyboards/9key) — A 9-key minipad sold by Bishop Keyboards.
|
||||
* [Alps64](/keyboards/alps64) — A 60% keyboard for Alps keyswitches.
|
||||
* [AMJ60](/keyboards/amj60) — DIY/Assembled compact 60% keyboard.
|
||||
* [Arrow Pad](/keyboards/arrow_pad) — A custom creation by IBNobody.
|
||||
|
21
keyboards/roadkit/keymaps/flipphone/Makefile
Normal file
21
keyboards/roadkit/keymaps/flipphone/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
8
keyboards/roadkit/keymaps/flipphone/config.h
Normal file
8
keyboards/roadkit/keymaps/flipphone/config.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
216
keyboards/roadkit/keymaps/flipphone/keymap.c
Normal file
216
keyboards/roadkit/keymaps/flipphone/keymap.c
Normal file
@@ -0,0 +1,216 @@
|
||||
#include "roadkit.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
|
||||
void backlight_toggle(void){
|
||||
};
|
||||
|
||||
enum roadkit_layers {
|
||||
_NUMPAD,
|
||||
_FPH,
|
||||
_FPHNOISY,
|
||||
_ADJUST,
|
||||
_DYN
|
||||
};
|
||||
|
||||
enum roadkit_keycodes {
|
||||
NUMPAD = SAFE_RANGE,
|
||||
FPH_1,
|
||||
FPH_2,
|
||||
FPH_3,
|
||||
FPH_4,
|
||||
FPH_5,
|
||||
FPH_6,
|
||||
FPH_7,
|
||||
FPH_8,
|
||||
FPH_9,
|
||||
FN_0,
|
||||
BACKLIT,
|
||||
MACSLEEP,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
// Fillers to make keymaps cleaner looking
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_NUMPAD] = /* Numpad */
|
||||
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
||||
KC_KP_4, KC_KP_5, KC_KP_6, \
|
||||
KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, \
|
||||
LT(_ADJUST, KC_KP_0), KC_KP_DOT),
|
||||
[_FPH] = /* Quiet T9 */
|
||||
KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
|
||||
FPH_4, FPH_5, FPH_6, \
|
||||
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
|
||||
LT(_ADJUST, KC_SPACE), KC_KP_DOT),
|
||||
[_FPHNOISY] = /* Noisy T9 */
|
||||
KEYMAP(FPH_7, FPH_8, FPH_9, KC_KP_PLUS, \
|
||||
FPH_4, FPH_5, FPH_6, \
|
||||
FPH_1, FPH_2, FPH_3, SFT_T(KC_KP_ENTER), \
|
||||
LT(_ADJUST, KC_SPACE), KC_KP_DOT),
|
||||
[_ADJUST] = /* Adjustments */
|
||||
KEYMAP(KC_NUMLOCK, TG(_FPHNOISY), TG(_FPH), TG(_NUMPAD), \
|
||||
KC_BSPC, BACKLIT, KC_DEL, \
|
||||
MACSLEEP, _______, _______, _______, \
|
||||
_______, MO(_DYN)),
|
||||
[_DYN] = /* DYNAMIC MACRO */
|
||||
KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, DYN_REC_STOP, \
|
||||
_______, _______, _______, \
|
||||
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
|
||||
_______, _______),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
uint16_t fph_tap_qty = false;
|
||||
uint16_t fph_keycode = 0; // stores which spacebar was used, either raise or lower...
|
||||
|
||||
uint16_t get_render_keycode(uint16_t keycode, uint16_t tap_qty){ // maybe replace shift with "mods"
|
||||
tap_qty--; // reduce by one to match array indexes.
|
||||
switch(keycode){
|
||||
case FPH_2:
|
||||
{uint16_t kc[] = {KC_A, KC_B, KC_C};
|
||||
if(tap_qty % 6 > 2)
|
||||
return LSFT(kc[tap_qty % 3]);
|
||||
return kc[tap_qty % 3];}
|
||||
break;
|
||||
case FPH_3:
|
||||
{uint16_t kc[] = {KC_D, KC_E, KC_F};
|
||||
if(tap_qty % 6 > 2)
|
||||
return LSFT(kc[tap_qty % 3]);
|
||||
return kc[tap_qty % 3];}
|
||||
break;
|
||||
case FPH_4:
|
||||
{uint16_t kc[] = {KC_G, KC_H, KC_I};
|
||||
if(tap_qty % 6 > 2)
|
||||
return LSFT(kc[tap_qty % 3]);
|
||||
return kc[tap_qty % 3];}
|
||||
break;
|
||||
case FPH_5:
|
||||
{uint16_t kc[] = {KC_J, KC_K, KC_L};
|
||||
if(tap_qty % 6 > 2)
|
||||
return LSFT(kc[tap_qty % 3]);
|
||||
return kc[tap_qty % 3];}
|
||||
break;
|
||||
case FPH_6:
|
||||
{uint16_t kc[] = {KC_M, KC_N, KC_O};
|
||||
if(tap_qty % 6 > 2)
|
||||
return LSFT(kc[tap_qty % 3]);
|
||||
return kc[tap_qty % 3];}
|
||||
break;
|
||||
case FPH_7:
|
||||
{uint16_t kc[] = {KC_P, KC_Q, KC_R, KC_S};
|
||||
if(tap_qty % 8 > 2)
|
||||
return LSFT(kc[tap_qty % 4]);
|
||||
return kc[tap_qty % 4];}
|
||||
break;
|
||||
case FPH_8:
|
||||
{uint16_t kc[] = {KC_T, KC_U, KC_V};
|
||||
if(tap_qty % 8 > 2)
|
||||
return LSFT(kc[tap_qty % 4]);
|
||||
return kc[tap_qty % 4];}
|
||||
break;
|
||||
case FPH_9:
|
||||
{uint16_t kc[] = {KC_W, KC_X, KC_Y, KC_Z};
|
||||
if(tap_qty % 8 > 2)
|
||||
return LSFT(kc[tap_qty % 4]);
|
||||
return kc[tap_qty % 4];}
|
||||
break;
|
||||
case FPH_1:
|
||||
{uint16_t kc[] = {KC_COMM, LSFT(KC_SLSH), KC_EXLM, KC_AT, KC_MINS, KC_UNDS, KC_PLUS, \
|
||||
KC_SCLN, LSFT(KC_SCLN), KC_QUOT, LSFT(KC_QUOT), KC_TILD, \
|
||||
KC_PIPE, KC_BSLS, KC_HASH, LSFT(KC_4), KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, \
|
||||
KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, LSFT(KC_COMM), LSFT(KC_DOT)};
|
||||
return kc[tap_qty % 26];}
|
||||
}
|
||||
return KC_NO;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
uint8_t layer;
|
||||
layer = biton32(layer_state);
|
||||
|
||||
switch (keycode) {
|
||||
case FPH_1 ... FPH_9:
|
||||
if(layer == _FPHNOISY){
|
||||
if (record->event.pressed) {
|
||||
if(fph_keycode != keycode) { // key change
|
||||
fph_tap_qty = 0;
|
||||
fph_keycode = keycode;
|
||||
} else { // same key tapped again so erase and increment.
|
||||
register_code(KC_BSPC);
|
||||
unregister_code(KC_BSPC);
|
||||
fph_tap_qty++;
|
||||
}
|
||||
uint16_t render_keycode = get_render_keycode(keycode, fph_tap_qty);
|
||||
// find mods? Apply mods..
|
||||
register_code(render_keycode);
|
||||
unregister_code(render_keycode);
|
||||
} else {
|
||||
// do we need to do anything on key-release?
|
||||
}
|
||||
} else { // not noisy, be demure .
|
||||
if (record->event.pressed) {
|
||||
if(fph_keycode != keycode) { // key change, kill everything.
|
||||
uint16_t render_keycode = get_render_keycode(fph_keycode, fph_tap_qty);
|
||||
// find mods? Apply mods..
|
||||
register_code(render_keycode);
|
||||
unregister_code(render_keycode);
|
||||
fph_keycode = keycode;
|
||||
fph_tap_qty = 0;
|
||||
} else { // same key tapped again so increment counter silently
|
||||
fph_tap_qty++;
|
||||
}
|
||||
} else {
|
||||
// do we need to do anything on key-release?
|
||||
// maybe start a timer on this one?
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MACSLEEP:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
26
keyboards/roadkit/keymaps/flipphone/readme.md
Normal file
26
keyboards/roadkit/keymaps/flipphone/readme.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Flip Phone layout for Roadkit
|
||||
|
||||
BEWARE, THIS DOES NOT WORK YET.
|
||||
|
||||
Uses the numpad with classic cellular phone style letters assigned to the numbers.
|
||||
|
||||
# LAYERS
|
||||
|
||||
* Numpad - The layer that matches the caps mostly
|
||||
* FPH - Base layer for text
|
||||
* FPHNOISY - Text layer that outputs every character and then backspaces as they're replaced
|
||||
* DYN - dynamic macro layer for recording and playing macros
|
||||
|
||||
## FPH
|
||||
|
||||
Poke the "2" key twice and it makes "B".
|
||||
|
||||
## FPHNOISY
|
||||
|
||||
Poke the "2" key twice and it makes "A"+backspace+"B" so you can see it cycle through.
|
||||
|
||||
## MACROS
|
||||
|
||||
May be able to record macros with the T9 layer because the "KC_*"s are only sent
|
||||
at the end. Trying to do a macro with T9NOISY would probably fill up the buffer
|
||||
in just a few characters.
|
21
keyboards/roadkit/keymaps/mjt/Makefile
Normal file
21
keyboards/roadkit/keymaps/mjt/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
8
keyboards/roadkit/keymaps/mjt/config.h
Normal file
8
keyboards/roadkit/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
236
keyboards/roadkit/keymaps/mjt/keymap.c
Normal file
236
keyboards/roadkit/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,236 @@
|
||||
#include "roadkit.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
|
||||
void backlight_toggle(void){
|
||||
};
|
||||
|
||||
enum roadkit_layers {
|
||||
_NUMPAD,
|
||||
_NAVIGATION,
|
||||
_EXCEL,
|
||||
_ADJUST,
|
||||
_DYN
|
||||
};
|
||||
|
||||
enum minivan_keycodes {
|
||||
NUMPAD = SAFE_RANGE,
|
||||
NAVIGATION,
|
||||
EXCEL,
|
||||
NUMPAD_LOCK,
|
||||
NAVIGATION_LOCK,
|
||||
EXCEL_LOCK,
|
||||
PARENS,
|
||||
BRACKETS,
|
||||
BRACES,
|
||||
BACKLIT,
|
||||
MACSLEEP,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
// Fillers to make keymaps cleaner looking
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_NUMPAD] = /* Numpad */
|
||||
KEYMAP(KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \
|
||||
KC_KP_4, KC_KP_5, KC_KP_6, \
|
||||
KC_KP_1, KC_KP_2, KC_KP_3, NAVIGATION, \
|
||||
EXCEL, KC_KP_DOT),
|
||||
[_EXCEL] = /* Excel related */
|
||||
KEYMAP(KC_KP_SLASH, KC_KP_ASTERISK, KC_MINS, KC_TAB, \
|
||||
KC_QUOT, KC_KP_EQUAL, PARENS , \
|
||||
KC_DQT, BRACKETS, BRACES, _______, \
|
||||
_______, MO(_DYN)),
|
||||
[_NAVIGATION] = /* Navigation */
|
||||
KEYMAP(KC_HOME, _______, KC_PGUP, KC_TAB, \
|
||||
KC_END, KC_UP, KC_PGDN, \
|
||||
KC_LEFT, KC_DOWN, KC_RIGHT, _______, \
|
||||
_______, MO(_DYN)),
|
||||
[_ADJUST] = /* Adjustments */
|
||||
KEYMAP(KC_NUMLOCK, MACSLEEP, BACKLIT, _______, \
|
||||
KC_BSPC, _______, KC_DEL, \
|
||||
EXCEL_LOCK, NUMPAD_LOCK, NAVIGATION_LOCK, _______, \
|
||||
_______, _______),
|
||||
[_DYN] = /* DYNAMIC MACRO */
|
||||
KEYMAP(DYN_REC_START1, DYN_REC_START2, _______, _______, \
|
||||
_______, _______, _______, \
|
||||
DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, _______, _______, \
|
||||
_______, _______),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_numpad[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_excel[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_navigation[][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 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);
|
||||
}
|
||||
|
||||
bool fn_tap_used = false; // sets to false when space is pressed,
|
||||
// sets to true when any other key is pressed,
|
||||
//when space is lifted, if another key was prssed, don't send space.
|
||||
uint16_t fn_keycode = 0; // stores which spacebar was used, either raise or lower...
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case NAVIGATION: // This key is enter if tapped, navigation if held
|
||||
if (record->event.pressed) {
|
||||
fn_keycode = NAVIGATION; // these two lines figure out if the next action is
|
||||
fn_tap_used = false;
|
||||
layer_on(_NAVIGATION);
|
||||
update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
|
||||
} else {
|
||||
layer_off(_NAVIGATION);
|
||||
update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
|
||||
if(!fn_tap_used && fn_keycode == NAVIGATION ){
|
||||
register_code(KC_KP_ENTER);
|
||||
unregister_code(KC_KP_ENTER);
|
||||
fn_keycode = 0;
|
||||
fn_tap_used = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXCEL:
|
||||
if (record->event.pressed) {
|
||||
fn_keycode = EXCEL;
|
||||
fn_tap_used = false;
|
||||
layer_on(_EXCEL);
|
||||
update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
|
||||
} else {
|
||||
layer_off(_EXCEL);
|
||||
update_tri_layer(_EXCEL, _NAVIGATION, _ADJUST);
|
||||
if(!fn_tap_used && fn_keycode == EXCEL ){
|
||||
register_code(KC_KP_0);
|
||||
unregister_code(KC_KP_0);
|
||||
fn_keycode = 0;
|
||||
fn_tap_used = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
fn_tap_used = true;
|
||||
break; // don't return because this just handles the spacebars.
|
||||
}
|
||||
// this is the normal keycode processing switch from Planck default layout.
|
||||
switch (keycode) {
|
||||
case NUMPAD_LOCK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_numpad, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_NUMPAD);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case NAVIGATION_LOCK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_navigation, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_NAVIGATION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXCEL_LOCK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_excel, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_EXCEL);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PARENS:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_9);
|
||||
unregister_code(KC_9);
|
||||
register_code(KC_0);
|
||||
unregister_code(KC_0);
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_LEFT);
|
||||
unregister_code(KC_LEFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BRACKETS:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_LBRC);
|
||||
unregister_code(KC_LBRC);
|
||||
register_code(KC_RBRC);
|
||||
unregister_code(KC_RBRC);
|
||||
register_code(KC_LEFT);
|
||||
unregister_code(KC_LEFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BRACES:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_LBRC);
|
||||
unregister_code(KC_LBRC);
|
||||
register_code(KC_RBRC);
|
||||
unregister_code(KC_RBRC);
|
||||
unregister_code(KC_RSFT);
|
||||
register_code(KC_LEFT);
|
||||
unregister_code(KC_LEFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MACSLEEP:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
22
keyboards/roadkit/keymaps/mjt/readme.md
Normal file
22
keyboards/roadkit/keymaps/mjt/readme.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Mike's custom keymap for roadkit
|
||||
|
||||
Based on the 13 key layout.
|
||||
|
||||
## LAYERS
|
||||
|
||||
* Numpad - The layer that matches the caps
|
||||
* Excel - / * - = and () [] {} macros
|
||||
* Navigation - arrow keys and home/end
|
||||
* ADJUST - just like planck adjust, lets you set default layer.
|
||||
* DYN - dynamic macro layer for recording and playing macros
|
||||
|
||||
## MACROS
|
||||
|
||||
Sadly, the dynamic macros are probably going worthless because they keys that
|
||||
they record have to be pressed on this keyboard. This keyboard doesn't have
|
||||
most letters...
|
||||
|
||||
## LEADER KEYS
|
||||
|
||||
This board would probably be better with the user of leader keys instead of
|
||||
complex layers with a raise/lower setup... Something to look into for later.
|
79
keyboards/satan/keymaps/rask63/keymap.c
Normal file
79
keyboards/satan/keymaps/rask63/keymap.c
Normal file
@@ -0,0 +1,79 @@
|
||||
#include "satan.h"
|
||||
|
||||
#define _BASE 0
|
||||
#define _FNO 1
|
||||
#define _FNT 2
|
||||
|
||||
#define ________ KC_TRNS
|
||||
#define XXXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
Base layer
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| Fn1 | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / | Up | Fn2 |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| Ctrl | Win | Alt | Space | AltGr | Left | Down | Right |
|
||||
-------------------------------------------------------------------------------------------
|
||||
*/
|
||||
[_BASE] = KEYMAP_HHKB(
|
||||
KC_GRV, 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_DEL, \
|
||||
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, \
|
||||
MO(_FNO), 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_SLSH, KC_UP, MO(_FNT), \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/*
|
||||
Fn1 layer
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
| Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Prsc| Ins |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| | | | | | | | | | | | | | |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| NONE | | | | | | | | | | | | |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| | | | | | | | | | | | PgUp | |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| | | | | | Home | PgDn | End |
|
||||
-------------------------------------------------------------------------------------------
|
||||
*/
|
||||
[_FNO] = KEYMAP_HHKB(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, \
|
||||
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, \
|
||||
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, \
|
||||
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_PGUP, ________, \
|
||||
________, ________, ________, ________, ________, KC_HOME, KC_PGDN, KC_END),
|
||||
|
||||
/*
|
||||
Fn2 layer
|
||||
|
||||
TODO: macro buttons
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
| | | | | | | | | | | | | | | |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| | | | | | | | | | Prev| Play| Next| | |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| CapsLk | | | | | | | | | Vol-| Vol+| Mute| |
|
||||
-------------------------------------------------------------------------------------------
|
||||
| | | | | | | | | | Stop| | | NONE|
|
||||
-------------------------------------------------------------------------------------------
|
||||
| Reset | Menu | | | M1 | M2 | M3 | M4 |
|
||||
-------------------------------------------------------------------------------------------
|
||||
*/
|
||||
[_FNT] = KEYMAP_HHKB(
|
||||
________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, \
|
||||
________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MPRV, KC_MPLY, KC_MNXT, ________, ________, \
|
||||
KC_CAPS, ________, ________, ________, ________, ________, ________, ________, ________, KC_VOLD, KC_VOLU, KC_MUTE, ________, \
|
||||
________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MSTP, ________, ________, ________, \
|
||||
RESET, KC_MENU, ________, ________, ________, ________, ________, ________),
|
||||
};
|
@@ -65,4 +65,4 @@ AUDIO_ENABLE = no
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
LAYOUTS = 60_ansi 60_iso
|
||||
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift
|
@@ -127,5 +127,6 @@ void matrix_scan_user(void);
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
#define LAYOUT_60_iso KEYMAP
|
||||
#define LAYOUT_60_ansi_split_bs_rshift KEYMAP_HHKB
|
||||
|
||||
#endif
|
||||
|
21
keyboards/tv44/keymaps/mjt/Makefile
Normal file
21
keyboards/tv44/keymaps/mjt/Makefile
Normal file
@@ -0,0 +1,21 @@
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
14
keyboards/tv44/keymaps/mjt/config.h
Normal file
14
keyboards/tv44/keymaps/mjt/config.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#define BACKLIGHT_PIN B2
|
||||
#define BACKLIGHT_LEVELS 7
|
||||
#endif
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 50
|
||||
|
||||
#endif
|
199
keyboards/tv44/keymaps/mjt/keymap.c
Normal file
199
keyboards/tv44/keymaps/mjt/keymap.c
Normal file
@@ -0,0 +1,199 @@
|
||||
//Author: mike terhar
|
||||
|
||||
#include "tv44.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
#endif
|
||||
|
||||
enum minivan_layers {
|
||||
_QWERTY,
|
||||
_NUMSYM,
|
||||
_FKEYS,
|
||||
_FKEYGRV,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
DYNKEY,
|
||||
DYNAMIC_MACRO_RANGE,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define FKEYS F(_FKEYS)
|
||||
#define NUMSYM F(_NUMSYM)
|
||||
#define FKEYGRV F(_FKEYGRV)
|
||||
#define MACSLEEP M(5)
|
||||
#define PLOVER M(6)
|
||||
#define LAYERRESET M(7)
|
||||
#define BACKLIT M(8)
|
||||
#define ADJUST M(9)
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = {
|
||||
{FKEYS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT},
|
||||
{KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT,KC_SLSH,SFT_T(KC_ENT) },
|
||||
{KC_LCTL,KC_LALT,KC_LGUI, KC_SPC,XXXXXXX,XXXXXXX,XXXXXXX,NUMSYM,KC_LEFT,KC_DOWN,KC_UP ,KC_RIGHT}
|
||||
},
|
||||
[_NUMSYM] = {
|
||||
{FKEYGRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______},
|
||||
{KC_DEL,KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN, ADJUST },
|
||||
{ _______, KC_UNDS,KC_PLUS, KC_LCBR,KC_RCBR,KC_PIPE , KC_MINS,KC_EQL,KC_LBRC, KC_RBRC, KC_BSLS, _______},
|
||||
{_______,_______,_______,_______,XXXXXXX,XXXXXXX,XXXXXXX,_______, KC_HOME, KC_PGDN, KC_PGUP, KC_END}
|
||||
},
|
||||
[_FKEYS] ={
|
||||
{_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______},
|
||||
{KC_DEL, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, _______, _______, MACSLEEP, DYN_REC_START1, DYN_REC_START2 },
|
||||
{KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,_______,DYN_REC_STOP},
|
||||
{_______,_______,_______,LAYERRESET,XXXXXXX,XXXXXXX,XXXXXXX,LAYERRESET, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
|
||||
},
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{LAYERRESET, XXXXXXX, KC_C, KC_V, XXXXXXX , XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
[_ADJUST] = {
|
||||
{_______ , RESET, _______, _______, _______, _______, _______, _______, KC_SLCK, KC_PAUS, KC_PSCR, KC_DEL },
|
||||
{_______ , _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, _______, MACSLEEP, PLOVER, _______},
|
||||
{_______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{BACKLIT, _______, _______, LAYERRESET, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______}
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_plover[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_adjust[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_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);
|
||||
}
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[_FKEYS] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_TAB),
|
||||
[_FKEYGRV] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_GRV),
|
||||
[_NUMSYM] = ACTION_LAYER_TAP_TOGGLE(_NUMSYM),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case 5: // MACSLEEP
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
register_code(KC_RCTL);
|
||||
register_code(KC_POWER);
|
||||
unregister_code(KC_POWER);
|
||||
unregister_code(KC_RCTL);
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
case 6: // PLOVER
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_NOTE_ARRAY(tone_plover, false, 0);
|
||||
#endif
|
||||
layer_off(_NUMSYM);
|
||||
layer_off(_FKEYS);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
}
|
||||
break;
|
||||
case 7: // LAYERRESET
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||
#endif
|
||||
layer_off(_NUMSYM);
|
||||
layer_off(_FKEYS);
|
||||
layer_off(_PLOVER);
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
break;
|
||||
case 8: // BACKLIT
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
case 9: // ADJUST
|
||||
if(record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_NOTE_ARRAY(tone_adjust, false, 0);
|
||||
#endif
|
||||
layer_off(_NUMSYM);
|
||||
layer_off(_FKEYS);
|
||||
layer_off(_PLOVER);
|
||||
layer_on(_ADJUST);
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t macro_kc = keycode;
|
||||
if (keycode == FKEYS || keycode == ADJUST || keycode == FKEYGRV ){
|
||||
macro_kc = DYN_REC_STOP;
|
||||
}
|
||||
if (!process_record_dynamic_macro(macro_kc, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
startup_user();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
_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
|
26
keyboards/tv44/keymaps/mjt/readme.md
Normal file
26
keyboards/tv44/keymaps/mjt/readme.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# Mike's Minivan
|
||||
|
||||
- Arrow Layout (45key)
|
||||
- Dynamic Macros
|
||||
- Media Keys
|
||||
- Works with iPhone Camera Adapter
|
||||
|
||||
## Layers
|
||||
|
||||
Qwerty for letters and mods.
|
||||
|
||||
Numsym for all numbers and symbols used in typing. Follows a similar approach to
|
||||
planck but puts both on the same layer eschewing the F-keys.
|
||||
|
||||
Fkeys layer is for the seldom used stuff like F-keys and some additional features
|
||||
such as dynamic macros, media keys, and a sleep shortcut for OS X.
|
||||
|
||||
Adjust layer is tough to get to so it is only for keyboard configuration stuff.
|
||||
|
||||
## Dynamic Macros
|
||||
|
||||
Hold TAB key, then press ";" to record macro 1 and "'" to record macro 2.
|
||||
|
||||
When you are done recording, press TAB again.
|
||||
|
||||
For playback of macros, TAB+"," plays macro 1 and TAB+","plays macro 2.
|
@@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define BACKLIGHT_PIN F5
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_LEVELS 6
|
||||
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
|
5
layouts/community/60_ansi_split_bs_rshift/layout.json
Normal file
5
layouts/community/60_ansi_split_bs_rshift/layout.json
Normal file
@@ -0,0 +1,5 @@
|
||||
[{a:7},"","","","","","","","","","","","","","",""],
|
||||
[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""],
|
||||
[{w:1.75},"","","","","","","","","","","","",{w:2.25},""],
|
||||
[{w:2.25},"","","","","","","","","","","",{w:1.75},"",{w:1},""],
|
||||
[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""]
|
3
layouts/community/60_ansi_split_bs_rshift/readme.md
Normal file
3
layouts/community/60_ansi_split_bs_rshift/readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 60_ansi_split_bs_rshift
|
||||
|
||||
LAYOUT_60_ansi_split_bs_rshift
|
10
layouts/community/60_ansi_split_bs_rshift/talljoe/config.h
Normal file
10
layouts/community/60_ansi_split_bs_rshift/talljoe/config.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define KM LAYOUT_60_ansi_split_bs_rshift
|
||||
|
||||
#endif //CONFIG_USER_H
|
113
layouts/community/60_ansi_split_bs_rshift/talljoe/keymap.c
Normal file
113
layouts/community/60_ansi_split_bs_rshift/talljoe/keymap.c
Normal file
@@ -0,0 +1,113 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum layers {
|
||||
_BASE = 0,
|
||||
_WORKMAN,
|
||||
_NORMAN,
|
||||
_DVORAK,
|
||||
_COLMAK,
|
||||
_GAME,
|
||||
_NAV,
|
||||
_ADJUST,
|
||||
_RESET,
|
||||
};
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#define NV_SPC LT(_NAV, KC_SPC)
|
||||
#define AD_GRV LT(_ADJUST, KC_GRV)
|
||||
|
||||
#define MO_NAV MO(_NAV)
|
||||
#define MO_ADJ MO(_ADJUST)
|
||||
#define MO_RST MO(_RESET)
|
||||
#define TG_ADJ TG(_ADJUST)
|
||||
#define TG_GAME TG(_GAME)
|
||||
#define LY_QWER DF(_BASE)
|
||||
#define LY_WORK DF(_WORKMAN)
|
||||
#define LY_NRMN DF(_NORMAN)
|
||||
#define LY_DVRK DF(_DVORAK)
|
||||
#define LY_CLMK DF(_COLMAK)
|
||||
#define TG_NKRO MAGIC_TOGGLE_NKRO
|
||||
#define KC_PTT KC_F24
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = KM(
|
||||
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,
|
||||
KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT ,
|
||||
KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, AD_GRV ,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, NV_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
|
||||
[_WORKMAN] = KM(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______,
|
||||
_______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______,
|
||||
_______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_NORMAN] = KM(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______,
|
||||
_______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______,
|
||||
_______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_DVORAK] = KM(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______,
|
||||
_______, KC_QUOT, KC_COMM, KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L , KC_SLSH, KC_EQL , _______,
|
||||
_______, KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S , KC_MINS, _______,
|
||||
_______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_COLMAK] = KM(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN, _______, _______, _______,
|
||||
_______, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , _______, _______,
|
||||
_______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_GAME] = KM(
|
||||
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,
|
||||
MO_NAV , 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_SLSH, KC_RSFT, MO_ADJ ,
|
||||
KC_LCTL, KC_PTT , KC_PGDN, KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ),
|
||||
[_NAV] = KM(
|
||||
KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_INS , KC_PGUP, KC_UP , KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL ,
|
||||
XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , XXXXXXX, TG_ADJ ,
|
||||
KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, XXXXXXX,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, _______, KC_RALT, KC_RGUI, KC_RCTL, _______),
|
||||
// Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards)
|
||||
[_ADJUST] = KM(
|
||||
MO_RST , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_ADJ ,
|
||||
TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG_GAME, XXXXXXX, XXXXXXX,
|
||||
MO_RST , AG_NORM, AG_SWAP, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS),
|
||||
// To Reset hit FN + ` + Esc
|
||||
[_RESET] = KM(
|
||||
RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX),
|
||||
};
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
#ifdef KEYBOARD_gh60
|
||||
if (IS_LAYER_ON(_GAME)) {
|
||||
gh60_wasd_leds_on();
|
||||
} else {
|
||||
gh60_wasd_leds_off();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t default_layer_state_set_kb(uint32_t state) {
|
||||
// persist changes to default layers
|
||||
eeconfig_update_default_layer(state);
|
||||
return state;
|
||||
}
|
@@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | ~L1 | Alt |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* | ~L1 | Alt |AltShf| Left | Right| | Up | Down |AltShf| Alt | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | Home | | PgUp |Ctrl/Esc|
|
||||
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, MO(SYMB),
|
||||
KC_UP, KC_DOWN,RALT(KC_RSFT), KC_RALT, MO(SYMB),
|
||||
|
||||
KC_PGUP, CTL_T(KC_ESC),
|
||||
KC_PGDN,
|
||||
@@ -102,9 +102,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Lclk | Rclk | | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | |------| |------|MsLeft|MsDown| MsUp |MsRght| | Play |
|
||||
* | | | | | | |------| |------|MsLeft|MsDown| MsUp |MsRght| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* | | | | | | | | | | | Prev | Play | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
@@ -129,8 +129,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// right hand
|
||||
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_F12,
|
||||
KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_MPLY,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
Essentially, I wanted to switch to a layout that was less jarring than the default ErgoDox EZ layout, and did not require finger gymnastics to perform common OS X shortcuts (most of which involve the CMD (LGui) key).
|
||||
|
||||
## How is it different from the default ErgoDox EZ layout?
|
||||
## How is it different from the default ErgoDox EZ default_osx layout?
|
||||
|
||||
This layout more closely resembles that of the Mac keyboard, and has some other goodness baked in. Here is a rundown of what that means:
|
||||
|
||||
@@ -18,15 +18,16 @@ This layout more closely resembles that of the Mac keyboard, and has some other
|
||||
|
||||
### Other changes
|
||||
|
||||
- **The button to the left of "A" is Ctrl/Esc instead of Backspace.** This is actually how I have the keyboard on my Macbook set up to be, since it's loads more convenient than a CAPS LOCK key. This is the Ctrl key I find myself using most.
|
||||
- **Mouse uses Vim-style navigation**. To activate "Media mode," hold the 'a' key. This allows you to move the mouse around with hjkl just like in Vim. Additionally, right and left click are the conveniently placed 'i' and 'o' keys.
|
||||
- **The button to the left of "A" is Ctrl/Esc instead of Backspace.** This is actually how I have the keyboard on my Macbook set up to be, since it's loads more convenient than a CAPS LOCK key. This is the Ctrl key I find myself using most.
|
||||
- **Mouse uses Vim-style navigation**. This allows you to move the mouse around with hjkl just like in Vim. Additionally, right and left click are the conveniently placed 'i' and 'o' keys.
|
||||
- **The key to the right of "5" and the key to left of "6" are "[" and "]", respectively, instead of Left and Right.** There is a more convenient set of Left and Right already present. Truth be told, I don't really use these keys, as they are a stretch to reach.
|
||||
- **The Toggle L1 keys have been replaced by the otherwise displaced "-" and "=".** They are laid out, left-to-right, in the same order as on the Mac keyboard. Honestly, they are not terribly conveniently placed, and their placement might change in a later version. I found that I did not toggle L1 frequently at all, and found using the momentary keys to access L1 to fit my workflow better.
|
||||
- **The "~"/L1 key in the bottom-left is now just momentary L1.** The "~" key was moved to the top-left as mentioned before, and I like to keep my multi-use keys to a minimum due to the latency for them to switch from "press" to "hold."
|
||||
- **The Home and End buttons have been shifted up on the left thumb, and Shift inserted below them.** This makes doing Shift-5 and other such combinations less painful.
|
||||
- **The Page Up and Page Down buttons have been shifted up on the right thumb.** I don't use either of these keys often, and wanted to free up some real estate.
|
||||
- **The bottommost-inner keys on the left and right thumb are momentary L2 and momentary L1, respectively**. I have found that both modes are useful, and this seemed like a reasonably accessible place to put these.
|
||||
- **The Toggle L1 keys in the center of the keyboard have been replaced by the otherwise displaced "-" and "=".** They are laid out, left-to-right, in the same order as on the Mac keyboard. Honestly, they are not terribly conveniently placed, and their placement might change in a later version. I found that the ~L1 would be better situated elsewhere.
|
||||
- **The "~" key in the extreme bottom-left is now just momentary L1.** The "~" key was moved to the top-left as mentioned before, and I like to keep my multi-use keys to a minimum due to the latency for them to switch from "press" to "hold."
|
||||
- **The Home and End buttons have been shifted up on the left thumb, and ~L2 inserted below them.** Nearly all of my media layer changes are on the right side, so the ~L2 key is on the left side.
|
||||
- **The Page Up and Page Down buttons have been shifted up on the right thumb, and ~L1 inserted below them.** I don't use either of the "Page" keys often, and use this ~L1 more than any other.
|
||||
- **Traditional numpad layout.** The base of most numpads is a double-wide "0" key to the left of a "." key. This is reflected in my layout by having two "0" keys to the left of a "." key.
|
||||
- **The function keys (F1-F12) have been moved to L2.** They were in the way in L1.
|
||||
- **⏯ lives on ',' in the media layer, between ⏪ on 'm' and ⏩ on '.'.** This is the way they are laid out on the mac keyboard, and makes the most sense to me.
|
||||
- **The keys on the bottom-right that were formerly "[" and "]" are now Alt-Shift and Alt, respectively.** This enables me to do those `C-M-<key>` bindings in emacs. I use L1 for "[" and "]".
|
||||
|
||||
**I'm always open to feedback and/or suggestions!**
|
||||
|
@@ -0,0 +1,21 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_ansi_split_bs_rshift(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
||||
)
|
||||
};
|
||||
|
||||
// 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) {
|
||||
|
||||
};
|
5
layouts/default/60_ansi_split_bs_rshift/layout.json
Normal file
5
layouts/default/60_ansi_split_bs_rshift/layout.json
Normal file
@@ -0,0 +1,5 @@
|
||||
[{a:7},"","","","","","","","","","","","","","",""],
|
||||
[{w:1.5},"","","","","","","","","","","","","",{w:1.5},""],
|
||||
[{w:1.75},"","","","","","","","","","","","",{w:2.25},""],
|
||||
[{w:2.25},"","","","","","","","","","","",{w:1.75},"",{w:1},""],
|
||||
[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:1.25},""]
|
3
layouts/default/60_ansi_split_bs_rshift/readme.md
Normal file
3
layouts/default/60_ansi_split_bs_rshift/readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 60_ansi_split_bs_rshift
|
||||
|
||||
LAYOUT_60_ansi_split_bs_rshift
|
@@ -23,6 +23,7 @@
|
||||
#include "print.h"
|
||||
#include "audio.h"
|
||||
#include "keymap.h"
|
||||
#include "wait.h"
|
||||
|
||||
#include "eeconfig.h"
|
||||
|
||||
@@ -122,14 +123,19 @@ bool glissando = true;
|
||||
#ifndef STARTUP_SONG
|
||||
#define STARTUP_SONG SONG(STARTUP_SOUND)
|
||||
#endif
|
||||
#ifndef AUDIO_ON_SONG
|
||||
#define AUDIO_ON_SONG SONG(AUDIO_ON_SOUND)
|
||||
#endif
|
||||
#ifndef AUDIO_OFF_SONG
|
||||
#define AUDIO_OFF_SONG SONG(AUDIO_OFF_SOUND)
|
||||
#endif
|
||||
float startup_song[][2] = STARTUP_SONG;
|
||||
float audio_on_song[][2] = AUDIO_ON_SONG;
|
||||
float audio_off_song[][2] = AUDIO_OFF_SONG;
|
||||
|
||||
void audio_init()
|
||||
{
|
||||
|
||||
if (audio_initialized)
|
||||
return;
|
||||
|
||||
// Check EEPROM
|
||||
if (!eeconfig_is_enabled())
|
||||
{
|
||||
@@ -137,46 +143,49 @@ void audio_init()
|
||||
}
|
||||
audio_config.raw = eeconfig_read_audio();
|
||||
|
||||
// Set port PC6 (OC3A and /OC4A) as output
|
||||
if (!audio_initialized) {
|
||||
|
||||
#ifdef C6_AUDIO
|
||||
DDRC |= _BV(PORTC6);
|
||||
#else
|
||||
DDRC |= _BV(PORTC6);
|
||||
PORTC &= ~_BV(PORTC6);
|
||||
#endif
|
||||
// Set port PC6 (OC3A and /OC4A) as output
|
||||
|
||||
#ifdef B5_AUDIO
|
||||
DDRB |= _BV(PORTB5);
|
||||
#else
|
||||
DDRB |= _BV(PORTB5);
|
||||
PORTB &= ~_BV(PORTB5);
|
||||
#endif
|
||||
#ifdef C6_AUDIO
|
||||
DDRC |= _BV(PORTC6);
|
||||
#else
|
||||
DDRC |= _BV(PORTC6);
|
||||
PORTC &= ~_BV(PORTC6);
|
||||
#endif
|
||||
|
||||
#ifdef C6_AUDIO
|
||||
DISABLE_AUDIO_COUNTER_3_ISR;
|
||||
#endif
|
||||
|
||||
#ifdef B5_AUDIO
|
||||
DISABLE_AUDIO_COUNTER_1_ISR;
|
||||
#endif
|
||||
#ifdef B5_AUDIO
|
||||
DDRB |= _BV(PORTB5);
|
||||
#else
|
||||
DDRB |= _BV(PORTB5);
|
||||
PORTB &= ~_BV(PORTB5);
|
||||
#endif
|
||||
|
||||
// TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
|
||||
// Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
|
||||
// Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A)
|
||||
// Clock Select (CS3n) = 0b010 = Clock / 8
|
||||
#ifdef C6_AUDIO
|
||||
DISABLE_AUDIO_COUNTER_3_ISR;
|
||||
#endif
|
||||
|
||||
#ifdef B5_AUDIO
|
||||
DISABLE_AUDIO_COUNTER_1_ISR;
|
||||
#endif
|
||||
|
||||
#ifdef C6_AUDIO
|
||||
TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
|
||||
TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
|
||||
#endif
|
||||
// TCCR3A / TCCR3B: Timer/Counter #3 Control Registers
|
||||
// Compare Output Mode (COM3An) = 0b00 = Normal port operation, OC3A disconnected from PC6
|
||||
// Waveform Generation Mode (WGM3n) = 0b1110 = Fast PWM Mode 14 (Period = ICR3, Duty Cycle = OCR3A)
|
||||
// Clock Select (CS3n) = 0b010 = Clock / 8
|
||||
|
||||
#ifdef B5_AUDIO
|
||||
TCCR1A = (0 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (0 << WGM10);
|
||||
TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10);
|
||||
#endif
|
||||
#ifdef C6_AUDIO
|
||||
TCCR3A = (0 << COM3A1) | (0 << COM3A0) | (1 << WGM31) | (0 << WGM30);
|
||||
TCCR3B = (1 << WGM33) | (1 << WGM32) | (0 << CS32) | (1 << CS31) | (0 << CS30);
|
||||
#endif
|
||||
|
||||
audio_initialized = true;
|
||||
#ifdef B5_AUDIO
|
||||
TCCR1A = (0 << COM1A1) | (0 << COM1A0) | (1 << WGM11) | (0 << WGM10);
|
||||
TCCR1B = (1 << WGM13) | (1 << WGM12) | (0 << CS12) | (1 << CS11) | (0 << CS10);
|
||||
#endif
|
||||
|
||||
audio_initialized = true;
|
||||
}
|
||||
|
||||
if (audio_config.enable) {
|
||||
PLAY_SONG(startup_song);
|
||||
@@ -720,9 +729,13 @@ void audio_on(void) {
|
||||
audio_config.enable = 1;
|
||||
eeconfig_update_audio(audio_config.raw);
|
||||
audio_on_user();
|
||||
PLAY_SONG(audio_on_song);
|
||||
}
|
||||
|
||||
void audio_off(void) {
|
||||
PLAY_SONG(audio_off_song);
|
||||
wait_ms(100);
|
||||
stop_all_notes();
|
||||
audio_config.enable = 0;
|
||||
eeconfig_update_audio(audio_config.raw);
|
||||
}
|
||||
|
@@ -127,6 +127,14 @@
|
||||
E__NOTE(_GS6), \
|
||||
E__NOTE(_A6 ),
|
||||
|
||||
#define AUDIO_ON_SOUND \
|
||||
E__NOTE(_A5 ), \
|
||||
E__NOTE(_A6 ),
|
||||
|
||||
#define AUDIO_OFF_SOUND \
|
||||
E__NOTE(_A6 ), \
|
||||
E__NOTE(_A5 ),
|
||||
|
||||
#define MUSIC_SCALE_SOUND MUSIC_ON_SOUND
|
||||
|
||||
#define MUSIC_OFF_SOUND \
|
||||
|
@@ -49,6 +49,9 @@ void unicode_input_start (void) {
|
||||
case UC_OSX:
|
||||
register_code(KC_LALT);
|
||||
break;
|
||||
case UC_OSX_RALT:
|
||||
register_code(KC_RALT);
|
||||
break;
|
||||
case UC_LNX:
|
||||
register_code(KC_LCTL);
|
||||
register_code(KC_LSFT);
|
||||
@@ -78,6 +81,9 @@ void unicode_input_finish (void) {
|
||||
case UC_WIN:
|
||||
unregister_code(KC_LALT);
|
||||
break;
|
||||
case UC_OSX_RALT:
|
||||
unregister_code(KC_RALT);
|
||||
break;
|
||||
case UC_LNX:
|
||||
register_code(KC_SPC);
|
||||
unregister_code(KC_SPC);
|
||||
|
@@ -37,6 +37,7 @@ void register_hex(uint16_t hex);
|
||||
#define UC_WIN 2 // Windows 'HexNumpad'
|
||||
#define UC_BSD 3 // BSD (not implemented)
|
||||
#define UC_WINC 4 // WinCompose https://github.com/samhocevar/wincompose
|
||||
#define UC_OSX_RALT 5 // Mac OS X using Right Alt key for Unicode Compose
|
||||
|
||||
#define UC_BSPC UC(0x0008)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user