From fced377ac007d27f2650ccffbe0b18abcdcfe23d Mon Sep 17 00:00:00 2001 From: James Young <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 30 May 2020 13:14:59 -0700 Subject: 2020 May 30 Breaking Changes Update (#9215) * Branch point for 2020 May 30 Breaking Change * Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954) * Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957) * Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958) * Migrate `ACTION_LAYER_MODS` to `LM()` (#8959) * Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968) * Convert V-USB usbdrv to a submodule (#8321) * Unify Tap Hold functions and documentation (#8348) * Changing board names to prevent confusion (#8412) * Move the Keyboardio Model01 to a keyboardio/ subdir (#8499) * Move spaceman keyboards (#8830) * Migrate miscellaneous `fn_actions` entries (#8977) * Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979) * Organizing my keyboards (plaid, tartan, ergoinu) (#8537) * Refactor Lily58 to use split_common (#6260) * Refactor zinc to use split_common (#7114) * Add a message if bin/qmk doesn't work (#9000) * Fix conflicting types for 'tfp_printf' (#8269) * Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480) * Refactor and updates to TKC1800 code (#8472) * Switch to qmk forks for everything (#9019) * audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484) * Audio enable corrections (2/3) (#8903) * Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582) * Audio enable corrections (Part 4) (#8974) * Fix typo from PR7114 (#9171) * Augment future branch Changelogs (#8978) * Revert "Branch point for 2020 May 30 Breaking Change" --- keyboards/2_milk/2_milk.c | 16 - keyboards/2_milk/2_milk.h | 26 - keyboards/2_milk/config.h | 41 -- keyboards/2_milk/info.json | 14 - keyboards/2_milk/keymaps/binary/keymap.c | 8 - keyboards/2_milk/keymaps/binary/readme.md | 2 - keyboards/2_milk/keymaps/copypasta/keymap.c | 8 - keyboards/2_milk/keymaps/copypasta/readme.md | 2 - keyboards/2_milk/keymaps/default/keymap.c | 8 - keyboards/2_milk/keymaps/default/readme.md | 2 - keyboards/2_milk/keymaps/emoji/config.h | 2 - keyboards/2_milk/keymaps/emoji/keymap.c | 53 -- keyboards/2_milk/keymaps/emoji/readme.md | 39 -- keyboards/2_milk/keymaps/emoji/rules.mk | 2 - keyboards/2_milk/keymaps/excessbread/keymap.c | 8 - keyboards/2_milk/keymaps/excessbread/readme.md | 2 - keyboards/2_milk/keymaps/mikethetiger/keymap.c | 8 - keyboards/2_milk/keymaps/mikethetiger/readme.md | 1 - keyboards/2_milk/keymaps/mikethetiger/rules.mk | 13 - keyboards/2_milk/keymaps/mouse/keymap.c | 8 - keyboards/2_milk/keymaps/mouse/readme.md | 2 - keyboards/2_milk/readme.md | 19 - keyboards/2_milk/rules.mk | 26 - keyboards/at101_bh/at101_bh.c | 1 + keyboards/at101_bh/at101_bh.h | 25 + keyboards/at101_bh/config.h | 35 ++ keyboards/at101_bh/info.json | 121 +++++ keyboards/at101_bh/keymaps/default/keymap.c | 53 ++ keyboards/at101_bh/readme.md | 15 + keyboards/at101_bh/rules.mk | 26 + keyboards/at101_blackheart/at101_blackheart.c | 1 - keyboards/at101_blackheart/at101_blackheart.h | 28 - keyboards/at101_blackheart/config.h | 35 -- keyboards/at101_blackheart/info.json | 121 ----- .../at101_blackheart/keymaps/default/keymap.c | 53 -- keyboards/at101_blackheart/readme.md | 15 - keyboards/at101_blackheart/rules.mk | 26 - keyboards/atomic/keymaps/pvc/keymap.c | 6 +- keyboards/atreus62/keymaps/atreus52/keymap.c | 17 +- .../bpiphany/pegasushoof/keymaps/blowrak/keymap.c | 8 +- keyboards/ckeys/handwire_101/config.h | 6 +- keyboards/ckeys/handwire_101/rules.mk | 2 +- keyboards/clueboard/card/keymaps/default/keymap.c | 3 +- keyboards/clueboard/card/keymaps/default/rules.mk | 2 +- .../converter/usb_usb/keymaps/chriskopher/keymap.c | 2 +- .../usb_usb/keymaps/coloneljesus/keymap.c | 6 +- keyboards/crkbd/keymaps/drashna/keymap.c | 2 +- keyboards/cu75/cu75.c | 2 +- keyboards/dm9records/ergoinu/config.h | 109 ++++ keyboards/dm9records/ergoinu/ergoinu.c | 5 + keyboards/dm9records/ergoinu/ergoinu.h | 44 ++ keyboards/dm9records/ergoinu/info.json | 87 +++ .../dm9records/ergoinu/keymaps/default/config.h | 24 + .../dm9records/ergoinu/keymaps/default/keymap.c | 101 ++++ .../dm9records/ergoinu/keymaps/default/rules.mk | 29 + .../ergoinu/keymaps/default_jis/config.h | 24 + .../ergoinu/keymaps/default_jis/keymap.c | 101 ++++ .../ergoinu/keymaps/default_jis/rules.mk | 29 + keyboards/dm9records/ergoinu/matrix.c | 292 ++++++++++ keyboards/dm9records/ergoinu/readme.md | 21 + keyboards/dm9records/ergoinu/rules.mk | 49 ++ keyboards/dm9records/ergoinu/serial.c | 295 +++++++++++ keyboards/dm9records/ergoinu/serial.h | 24 + keyboards/dm9records/ergoinu/serial_config.h | 11 + keyboards/dm9records/ergoinu/split_util.c | 56 ++ keyboards/dm9records/ergoinu/split_util.h | 12 + keyboards/dm9records/plaid/config.h | 248 +++++++++ keyboards/dm9records/plaid/info.json | 113 ++++ .../dm9records/plaid/keymaps/brickbots/config.h | 19 + .../dm9records/plaid/keymaps/brickbots/keymap.c | 411 ++++++++++++++ .../dm9records/plaid/keymaps/brickbots/readme.md | 36 ++ .../dm9records/plaid/keymaps/default/config.h | 19 + .../dm9records/plaid/keymaps/default/keymap.c | 410 ++++++++++++++ .../dm9records/plaid/keymaps/default/readme.md | 35 ++ .../plaid/keymaps/thehalfdeafchef/config.h | 19 + .../plaid/keymaps/thehalfdeafchef/keymap.c | 182 +++++++ .../plaid/keymaps/thehalfdeafchef/readme.md | 5 + keyboards/dm9records/plaid/plaid.c | 43 ++ keyboards/dm9records/plaid/plaid.h | 68 +++ keyboards/dm9records/plaid/readme.md | 23 + keyboards/dm9records/plaid/rules.mk | 36 ++ keyboards/dm9records/tartan/config.h | 246 +++++++++ keyboards/dm9records/tartan/info.json | 34 ++ .../dm9records/tartan/keymaps/default/keymap.c | 34 ++ .../dm9records/tartan/keymaps/default/readme.md | 1 + keyboards/dm9records/tartan/readme.md | 25 + keyboards/dm9records/tartan/rules.mk | 36 ++ keyboards/dm9records/tartan/tartan.c | 16 + keyboards/dm9records/tartan/tartan.h | 111 ++++ keyboards/eco/rules.mk | 2 +- keyboards/ergodox_stm32/keymaps/default/keymap.c | 4 - keyboards/ergoinu/config.h | 109 ---- keyboards/ergoinu/ergoinu.c | 5 - keyboards/ergoinu/ergoinu.h | 44 -- keyboards/ergoinu/info.json | 87 --- keyboards/ergoinu/keymaps/default/config.h | 24 - keyboards/ergoinu/keymaps/default/keymap.c | 101 ---- keyboards/ergoinu/keymaps/default/rules.mk | 29 - keyboards/ergoinu/keymaps/default_jis/config.h | 24 - keyboards/ergoinu/keymaps/default_jis/keymap.c | 101 ---- keyboards/ergoinu/keymaps/default_jis/rules.mk | 29 - keyboards/ergoinu/matrix.c | 292 ---------- keyboards/ergoinu/readme.md | 21 - keyboards/ergoinu/rules.mk | 51 -- keyboards/ergoinu/serial.c | 295 ----------- keyboards/ergoinu/serial.h | 24 - keyboards/ergoinu/serial_config.h | 11 - keyboards/ergoinu/split_util.c | 56 -- keyboards/ergoinu/split_util.h | 12 - keyboards/ergotravel/keymaps/ckofy/keymap.c | 23 +- keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c | 6 +- keyboards/gh60/satan/keymaps/denolfe/keymap.c | 3 +- .../ms_sculpt_mobile/keymaps/milestogo/keymap.c | 1 - keyboards/hhkb/ansi/ansi.c | 1 + keyboards/hhkb/ansi/ansi.h | 23 + keyboards/hhkb/ansi/config.h | 104 ++++ keyboards/hhkb/ansi/hhkb_avr.h | 157 ++++++ keyboards/hhkb/ansi/info.json | 73 +++ keyboards/hhkb/ansi/keymaps/blakedietz/README.md | 134 +++++ keyboards/hhkb/ansi/keymaps/blakedietz/config.h | 24 + keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c | 125 +++++ keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk | 3 + keyboards/hhkb/ansi/keymaps/brett/config.h | 17 + keyboards/hhkb/ansi/keymaps/brett/keymap.c | 119 +++++ keyboards/hhkb/ansi/keymaps/brett/readme.md | 13 + keyboards/hhkb/ansi/keymaps/brett/rules.mk | 4 + keyboards/hhkb/ansi/keymaps/cinaeco/README.md | 23 + keyboards/hhkb/ansi/keymaps/cinaeco/config.h | 20 + keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c | 178 +++++++ keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk | 20 + keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c | 89 ++++ keyboards/hhkb/ansi/keymaps/dbroqua/readme.md | 26 + keyboards/hhkb/ansi/keymaps/default/keymap.c | 56 ++ keyboards/hhkb/ansi/keymaps/eric/keymap.c | 73 +++ keyboards/hhkb/ansi/keymaps/krusli/config.h | 1 + keyboards/hhkb/ansi/keymaps/krusli/keymap.c | 75 +++ keyboards/hhkb/ansi/keymaps/lxol/keymap.c | 200 +++++++ keyboards/hhkb/ansi/keymaps/mjt/config.h | 72 +++ keyboards/hhkb/ansi/keymaps/mjt/keymap.c | 112 ++++ keyboards/hhkb/ansi/keymaps/mjt/readme.md | 16 + keyboards/hhkb/ansi/keymaps/mjt/rules.mk | 1 + keyboards/hhkb/ansi/keymaps/schaeferdev/README.md | 36 ++ keyboards/hhkb/ansi/keymaps/schaeferdev/config.h | 9 + keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c | 76 +++ keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk | 1 + .../hhkb/ansi/keymaps/shela/action_pseudo_lut.c | 143 +++++ .../hhkb/ansi/keymaps/shela/action_pseudo_lut.h | 15 + keyboards/hhkb/ansi/keymaps/shela/config.h | 12 + keyboards/hhkb/ansi/keymaps/shela/keymap.c | 186 +++++++ keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h | 32 ++ keyboards/hhkb/ansi/keymaps/shela/readme.md | 14 + keyboards/hhkb/ansi/keymaps/shela/rules.mk | 1 + keyboards/hhkb/ansi/keymaps/smt/keymap.c | 172 ++++++ keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c | 20 + keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md | 22 + keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore | 3 + keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c | 12 + keyboards/hhkb/ansi/keymaps/via/keymap.c | 68 +++ keyboards/hhkb/ansi/keymaps/via/rules.mk | 1 + keyboards/hhkb/ansi/keymaps/xyverz/keymap.c | 137 +++++ keyboards/hhkb/ansi/matrix.c | 211 ++++++++ keyboards/hhkb/ansi/readme.md | 14 + keyboards/hhkb/ansi/rules.mk | 71 +++ keyboards/hhkb/config.h | 111 ---- keyboards/hhkb/hhkb.c | 1 - keyboards/hhkb/hhkb.h | 52 -- keyboards/hhkb/hhkb_avr.h | 167 ------ keyboards/hhkb/info.json | 147 ----- keyboards/hhkb/jp/config.h | 104 ++++ keyboards/hhkb/jp/hhkb_avr.h | 164 ++++++ keyboards/hhkb/jp/info.json | 82 +++ keyboards/hhkb/jp/jp.c | 1 + keyboards/hhkb/jp/jp.h | 28 + keyboards/hhkb/jp/keymaps/bakingpy/keymap.c | 16 + keyboards/hhkb/jp/keymaps/bakingpy/rules.mk | 1 + keyboards/hhkb/jp/keymaps/default/keymap.c | 49 ++ keyboards/hhkb/jp/keymaps/default/rules.mk | 1 + keyboards/hhkb/jp/keymaps/default_mac/keymap.c | 49 ++ keyboards/hhkb/jp/keymaps/default_mac/rules.mk | 1 + keyboards/hhkb/jp/keymaps/dhertz/config.h | 1 + keyboards/hhkb/jp/keymaps/dhertz/keymap.c | 84 +++ keyboards/hhkb/jp/keymaps/dhertz/keymap.h | 7 + keyboards/hhkb/jp/keymaps/dhertz/rules.mk | 2 + keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c | 71 +++ keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk | 3 + keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md | 49 ++ keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c | 76 +++ keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk | 1 + keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c | 55 ++ keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk | 1 + keyboards/hhkb/jp/keymaps/sh_jp/README.md | 86 +++ keyboards/hhkb/jp/keymaps/sh_jp/keymap.c | 50 ++ keyboards/hhkb/jp/keymaps/sh_jp/rules.mk | 1 + keyboards/hhkb/jp/keymaps/via/config.h | 2 + keyboards/hhkb/jp/keymaps/via/keymap.c | 58 ++ keyboards/hhkb/jp/keymaps/via/rules.mk | 1 + keyboards/hhkb/jp/matrix.c | 212 ++++++++ keyboards/hhkb/jp/readme.md | 14 + keyboards/hhkb/jp/rules.mk | 69 +++ keyboards/hhkb/keymaps/bakingpy/keymap.c | 16 - keyboards/hhkb/keymaps/bakingpy/rules.mk | 1 - keyboards/hhkb/keymaps/blakedietz/README.md | 134 ----- keyboards/hhkb/keymaps/blakedietz/config.h | 24 - keyboards/hhkb/keymaps/blakedietz/keymap.c | 125 ----- keyboards/hhkb/keymaps/blakedietz/rules.mk | 3 - keyboards/hhkb/keymaps/brett/config.h | 17 - keyboards/hhkb/keymaps/brett/keymap.c | 119 ----- keyboards/hhkb/keymaps/brett/readme.md | 13 - keyboards/hhkb/keymaps/brett/rules.mk | 4 - keyboards/hhkb/keymaps/cinaeco/README.md | 23 - keyboards/hhkb/keymaps/cinaeco/config.h | 20 - keyboards/hhkb/keymaps/cinaeco/keymap.c | 178 ------- keyboards/hhkb/keymaps/cinaeco/rules.mk | 20 - keyboards/hhkb/keymaps/dbroqua/keymap.c | 89 ---- keyboards/hhkb/keymaps/dbroqua/readme.md | 26 - keyboards/hhkb/keymaps/default/keymap.c | 56 -- keyboards/hhkb/keymaps/dhertz/config.h | 1 - keyboards/hhkb/keymaps/dhertz/keymap.c | 84 --- keyboards/hhkb/keymaps/dhertz/keymap.h | 7 - keyboards/hhkb/keymaps/dhertz/rules.mk | 2 - keyboards/hhkb/keymaps/enoch_jp/keymap.c | 71 --- keyboards/hhkb/keymaps/enoch_jp/rules.mk | 3 - keyboards/hhkb/keymaps/eric/keymap.c | 73 --- keyboards/hhkb/keymaps/halfqwerty_jp/README.md | 49 -- keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c | 76 --- keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk | 1 - keyboards/hhkb/keymaps/jp/keymap.c | 49 -- keyboards/hhkb/keymaps/jp/rules.mk | 1 - keyboards/hhkb/keymaps/jp_mac/keymap.c | 49 -- keyboards/hhkb/keymaps/jp_mac/rules.mk | 1 - keyboards/hhkb/keymaps/krusli/config.h | 1 - keyboards/hhkb/keymaps/krusli/keymap.c | 75 --- keyboards/hhkb/keymaps/lxol/keymap.c | 204 ------- keyboards/hhkb/keymaps/mjt/config.h | 72 --- keyboards/hhkb/keymaps/mjt/keymap.c | 113 ---- keyboards/hhkb/keymaps/mjt/readme.md | 16 - keyboards/hhkb/keymaps/rdg_jp/keymap.c | 55 -- keyboards/hhkb/keymaps/rdg_jp/rules.mk | 1 - keyboards/hhkb/keymaps/schaeferdev/README.md | 36 -- keyboards/hhkb/keymaps/schaeferdev/config.h | 9 - keyboards/hhkb/keymaps/schaeferdev/keymap.c | 76 --- keyboards/hhkb/keymaps/schaeferdev/rules.mk | 1 - keyboards/hhkb/keymaps/sh_jp/README.md | 86 --- keyboards/hhkb/keymaps/sh_jp/keymap.c | 50 -- keyboards/hhkb/keymaps/sh_jp/rules.mk | 1 - keyboards/hhkb/keymaps/shela/action_pseudo_lut.c | 143 ----- keyboards/hhkb/keymaps/shela/action_pseudo_lut.h | 15 - keyboards/hhkb/keymaps/shela/config.h | 12 - keyboards/hhkb/keymaps/shela/keymap.c | 193 ------- keyboards/hhkb/keymaps/shela/keymap_jis2us.h | 32 -- keyboards/hhkb/keymaps/shela/readme.md | 14 - keyboards/hhkb/keymaps/shela/rules.mk | 1 - keyboards/hhkb/keymaps/smt/keymap.c | 172 ------ keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c | 20 - keyboards/hhkb/keymaps/tobiasvl_iso/readme.md | 22 - keyboards/hhkb/keymaps/tominabox1/.gitignore | 3 - keyboards/hhkb/keymaps/tominabox1/keymap.c | 12 - keyboards/hhkb/keymaps/xyverz/keymap.c | 137 ----- keyboards/hhkb/matrix.c | 215 -------- keyboards/hhkb/readme.md | 14 - keyboards/hhkb/rules.mk | 71 --- keyboards/infinity60/keymaps/jpetermans/keymap.c | 8 +- keyboards/jd45/keymaps/justin/keymap.c | 20 +- keyboards/jd45/keymaps/mjt6u/keymap.c | 4 +- .../keebio/nyquist/keymaps/danielhklein/keymap.c | 13 +- keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c | 6 +- keyboards/keebio/viterbi/keymaps/dwallace/keymap.c | 2 +- keyboards/keebio/viterbi/keymaps/mike808/keymap.c | 4 +- keyboards/keyboardio/model01/config.h | 38 ++ keyboards/keyboardio/model01/info.json | 87 +++ .../keyboardio/model01/keymaps/default/config.h | 19 + .../keyboardio/model01/keymaps/default/keymap.c | 124 +++++ .../keyboardio/model01/keymaps/default/readme.md | 3 + .../keyboardio/model01/keymaps/dshields/config.h | 4 + .../keyboardio/model01/keymaps/dshields/keymap.c | 28 + .../keyboardio/model01/keymaps/dshields/readme.md | 10 + .../keyboardio/model01/keymaps/tw1t611/config.h | 19 + .../keyboardio/model01/keymaps/tw1t611/keymap.c | 50 ++ .../keyboardio/model01/keymaps/tw1t611/readme.md | 5 + keyboards/keyboardio/model01/leds.c | 132 +++++ keyboards/keyboardio/model01/leds.h | 22 + keyboards/keyboardio/model01/matrix.c | 94 ++++ keyboards/keyboardio/model01/model01.c | 38 ++ keyboards/keyboardio/model01/model01.h | 50 ++ keyboards/keyboardio/model01/readme.md | 37 ++ keyboards/keyboardio/model01/rules.mk | 35 ++ .../keyboardio/model01/wire-protocol-constants.h | 53 ++ keyboards/keyboardio/readme.md | 18 + keyboards/kinesis/keymaps/milestogo/keymap.c | 26 +- keyboards/lets_split/keymaps/mjt/keymap.c | 6 +- keyboards/lets_split/keymaps/piemod/keymap.c | 20 +- keyboards/lily58/config.h | 12 +- keyboards/lily58/i2c.c | 162 ------ keyboards/lily58/i2c.h | 46 -- keyboards/lily58/keymaps/chuan/config.h | 64 +++ keyboards/lily58/keymaps/chuan/keymap.c | 230 ++++++++ keyboards/lily58/keymaps/chuan/rules.mk | 11 + keyboards/lily58/keymaps/default/config.h | 4 +- keyboards/lily58/keymaps/default/keymap.c | 58 +- keyboards/lily58/keymaps/default/rules.mk | 4 +- keyboards/lily58/keymaps/yuchi/keymap.c | 47 +- keyboards/lily58/keymaps/yuchi/rules.mk | 5 +- keyboards/lily58/lib/glcdfont.c | 232 -------- keyboards/lily58/lib/glcdfont_lily.c | 233 ++++++++ keyboards/lily58/lib/host_led_state_reader.c | 9 +- keyboards/lily58/lib/keylogger.c | 1 + keyboards/lily58/lib/layer_state_reader.c | 8 +- keyboards/lily58/lib/mode_icon_reader.c | 1 + keyboards/lily58/lib/timelogger.c | 1 + keyboards/lily58/lily58.c | 7 +- keyboards/lily58/rev1/config.h | 2 - keyboards/lily58/rev1/rules.mk | 3 - keyboards/lily58/rev1/split_scomm.c | 91 ---- keyboards/lily58/rev1/split_scomm.h | 24 - keyboards/lily58/rev1/split_util.h | 19 - keyboards/lily58/rules.mk | 16 +- keyboards/lily58/serial.h | 84 --- keyboards/lily58/serial_config.h | 4 - keyboards/lily58/ssd1306.c | 344 ------------ keyboards/lily58/ssd1306.h | 90 ---- keyboards/meira/keymaps/default/keymap.c | 6 +- keyboards/meira/keymaps/grahampheath/keymap.c | 6 +- keyboards/meira/keymaps/takmiya/keymap.c | 2 +- keyboards/meishi/keymaps/default/keymap.c | 4 - keyboards/model01/config.h | 38 -- keyboards/model01/info.json | 87 --- keyboards/model01/keymaps/default/config.h | 19 - keyboards/model01/keymaps/default/keymap.c | 124 ----- keyboards/model01/keymaps/default/readme.md | 3 - keyboards/model01/keymaps/dshields/config.h | 4 - keyboards/model01/keymaps/dshields/keymap.c | 28 - keyboards/model01/keymaps/dshields/readme.md | 10 - keyboards/model01/keymaps/tw1t611/config.h | 19 - keyboards/model01/keymaps/tw1t611/keymap.c | 50 -- keyboards/model01/keymaps/tw1t611/readme.md | 5 - keyboards/model01/leds.c | 132 ----- keyboards/model01/leds.h | 22 - keyboards/model01/matrix.c | 94 ---- keyboards/model01/model01.c | 38 -- keyboards/model01/model01.h | 50 -- keyboards/model01/readme.md | 37 -- keyboards/model01/rules.mk | 35 -- keyboards/model01/wire-protocol-constants.h | 53 -- keyboards/navi10/rev3/rules.mk | 2 +- keyboards/nomu30/keymaps/center_sprit/keymap.c | 2 +- keyboards/nomu30/keymaps/like_jis/keymap.c | 2 +- keyboards/omnikey_bh/config.h | 51 ++ keyboards/omnikey_bh/info.json | 13 + keyboards/omnikey_bh/keymaps/default/keymap.c | 45 ++ keyboards/omnikey_bh/omnikey_bh.c | 1 + keyboards/omnikey_bh/omnikey_bh.h | 19 + keyboards/omnikey_bh/readme.md | 14 + keyboards/omnikey_bh/rules.mk | 26 + keyboards/omnikey_blackheart/config.h | 51 -- keyboards/omnikey_blackheart/info.json | 13 - .../omnikey_blackheart/keymaps/default/keymap.c | 45 -- keyboards/omnikey_blackheart/omnikey_blackheart.c | 1 - keyboards/omnikey_blackheart/omnikey_blackheart.h | 22 - keyboards/omnikey_blackheart/readme.md | 14 - keyboards/omnikey_blackheart/rules.mk | 26 - keyboards/pancake/config.h | 31 -- keyboards/pancake/feather/config.h | 26 - keyboards/pancake/feather/readme.md | 1 - keyboards/pancake/feather/rules.mk | 32 -- keyboards/pancake/info.json | 113 ---- keyboards/pancake/keymaps/default/keymap.c | 90 ---- keyboards/pancake/keymaps/default/readme.md | 1 - keyboards/pancake/pancake.c | 16 - keyboards/pancake/pancake.h | 44 -- keyboards/pancake/promicro/config.h | 22 - keyboards/pancake/promicro/readme.md | 1 - keyboards/pancake/promicro/rules.mk | 28 - keyboards/pancake/readme.md | 12 - keyboards/plaid/config.h | 248 --------- keyboards/plaid/info.json | 113 ---- keyboards/plaid/keymaps/brickbots/config.h | 19 - keyboards/plaid/keymaps/brickbots/keymap.c | 411 -------------- keyboards/plaid/keymaps/brickbots/readme.md | 36 -- keyboards/plaid/keymaps/default/config.h | 19 - keyboards/plaid/keymaps/default/keymap.c | 410 -------------- keyboards/plaid/keymaps/default/readme.md | 35 -- keyboards/plaid/keymaps/thehalfdeafchef/config.h | 19 - keyboards/plaid/keymaps/thehalfdeafchef/keymap.c | 182 ------- keyboards/plaid/keymaps/thehalfdeafchef/readme.md | 5 - keyboards/plaid/plaid.c | 43 -- keyboards/plaid/plaid.h | 68 --- keyboards/plaid/readme.md | 23 - keyboards/plaid/rules.mk | 36 -- keyboards/planck/keymaps/ab/keymap.c | 22 +- keyboards/planck/keymaps/angerthosenear/keymap.c | 11 +- keyboards/planck/keymaps/austin/keymap.c | 13 +- keyboards/planck/keymaps/brandon/keymap.c | 10 +- keyboards/planck/keymaps/chance/keymap.c | 6 +- keyboards/planck/keymaps/charlie/keymap.c | 51 +- keyboards/planck/keymaps/circuit/keymap.c | 10 +- keyboards/planck/keymaps/david/keymap.c | 12 +- keyboards/planck/keymaps/dr_notsokind/keymap.c | 10 +- keyboards/planck/keymaps/dzobert/keymap.c | 10 +- keyboards/planck/keymaps/emilyh/keymap.c | 16 +- keyboards/planck/keymaps/espynn/keymap.c | 20 +- keyboards/planck/keymaps/ishtob/keymap.c | 20 +- keyboards/planck/keymaps/joe/keymap.c | 21 +- keyboards/planck/keymaps/kyle/keymap.c | 12 +- keyboards/planck/keymaps/lucas/keymap.c | 9 +- keyboards/planck/keymaps/matrixman/keymap.c | 7 +- keyboards/planck/keymaps/max/keymap.c | 10 +- keyboards/planck/keymaps/mollat/keymap.c | 4 - keyboards/planck/keymaps/piemod/keymap.c | 46 +- keyboards/planck/keymaps/pvc/keymap.c | 6 +- keyboards/planck/keymaps/that_canadian/keymap.c | 8 +- keyboards/planck/keymaps/zrichard/keymap.c | 6 +- keyboards/planck/rev6/config.h | 1 + keyboards/planck/rev6/rules.mk | 2 +- keyboards/preonic/keymaps/that_canadian/keymap.c | 8 +- keyboards/preonic/rev1/rules.mk | 2 +- keyboards/preonic/rev2/rules.mk | 2 +- keyboards/preonic/rev3/config.h | 1 + keyboards/preonic/rev3/rules.mk | 2 +- keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c | 4 +- .../rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c | 4 +- keyboards/scarletbandana/rules.mk | 2 +- keyboards/sck/neiso/rules.mk | 2 +- .../sentraq/s60_x/keymaps/ansi_qwertz/keymap.c | 14 +- keyboards/sentraq/s60_x/keymaps/hasu/keymap.c | 28 +- keyboards/sentraq/s60_x/keymaps/jpec/keymap.c | 15 +- keyboards/sentraq/s60_x/keymaps/poker/keymap.c | 34 +- keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c | 13 +- keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c | 12 +- keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c | 9 +- keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c | 12 +- keyboards/sentraq/s65_x/keymaps/nall/keymap.c | 10 +- keyboards/spaceman/2_milk/2_milk.c | 16 + keyboards/spaceman/2_milk/2_milk.h | 26 + keyboards/spaceman/2_milk/config.h | 41 ++ keyboards/spaceman/2_milk/info.json | 14 + keyboards/spaceman/2_milk/keymaps/binary/keymap.c | 8 + keyboards/spaceman/2_milk/keymaps/binary/readme.md | 2 + .../spaceman/2_milk/keymaps/copypasta/keymap.c | 8 + .../spaceman/2_milk/keymaps/copypasta/readme.md | 2 + keyboards/spaceman/2_milk/keymaps/default/keymap.c | 8 + .../spaceman/2_milk/keymaps/default/readme.md | 2 + keyboards/spaceman/2_milk/keymaps/emoji/config.h | 2 + keyboards/spaceman/2_milk/keymaps/emoji/keymap.c | 53 ++ keyboards/spaceman/2_milk/keymaps/emoji/readme.md | 39 ++ keyboards/spaceman/2_milk/keymaps/emoji/rules.mk | 2 + .../spaceman/2_milk/keymaps/excessbread/keymap.c | 8 + .../spaceman/2_milk/keymaps/excessbread/readme.md | 2 + .../spaceman/2_milk/keymaps/mikethetiger/keymap.c | 8 + .../spaceman/2_milk/keymaps/mikethetiger/readme.md | 1 + .../spaceman/2_milk/keymaps/mikethetiger/rules.mk | 13 + keyboards/spaceman/2_milk/keymaps/mouse/keymap.c | 8 + keyboards/spaceman/2_milk/keymaps/mouse/readme.md | 2 + keyboards/spaceman/2_milk/readme.md | 19 + keyboards/spaceman/2_milk/rules.mk | 26 + keyboards/spaceman/pancake/config.h | 31 ++ keyboards/spaceman/pancake/feather/config.h | 26 + keyboards/spaceman/pancake/feather/rules.mk | 32 ++ keyboards/spaceman/pancake/info.json | 113 ++++ .../spaceman/pancake/keymaps/default/keymap.c | 90 ++++ .../spaceman/pancake/keymaps/default/readme.md | 3 + keyboards/spaceman/pancake/pancake.c | 16 + keyboards/spaceman/pancake/pancake.h | 44 ++ keyboards/spaceman/pancake/promicro/config.h | 22 + keyboards/spaceman/pancake/promicro/rules.mk | 28 + keyboards/spaceman/pancake/readme.md | 12 + keyboards/subatomic/rules.mk | 2 +- keyboards/tartan/config.h | 246 --------- keyboards/tartan/info.json | 34 -- keyboards/tartan/keymaps/default/keymap.c | 34 -- keyboards/tartan/keymaps/default/readme.md | 1 - keyboards/tartan/readme.md | 25 - keyboards/tartan/rules.mk | 36 -- keyboards/tartan/tartan.c | 16 - keyboards/tartan/tartan.h | 111 ---- .../the_royal/liminal/keymaps/default/keymap.c | 4 +- .../the_royal/liminal/keymaps/default_iso/keymap.c | 2 +- .../minivan/keymaps/like_jis/keymap.c | 2 +- .../thevankeyboards/minivan/keymaps/mjt/keymap.c | 12 +- .../thevankeyboards/roadkit/keymaps/mjt/keymap.c | 6 +- keyboards/tkc1800/config.h | 5 + keyboards/tkc1800/i2c.c | 166 ------ keyboards/tkc1800/i2c.h | 49 -- keyboards/tkc1800/keymaps/default/config.h | 24 - keyboards/tkc1800/keymaps/default/keymap.c | 99 +--- keyboards/tkc1800/keymaps/smt/config.h | 24 - keyboards/tkc1800/keymaps/smt/keymap.c | 95 +--- keyboards/tkc1800/keymaps/via/keymap.c | 99 +--- keyboards/tkc1800/keymaps/wkl/config.h | 24 - keyboards/tkc1800/keymaps/wkl/keymap.c | 100 +--- keyboards/tkc1800/keymaps/yanfali/config.h | 24 - keyboards/tkc1800/keymaps/yanfali/keymap.c | 94 +--- keyboards/tkc1800/rules.mk | 9 +- keyboards/tkc1800/tkc1800.c | 7 + keyboards/treadstone32/keymaps/default/keymap.c | 2 +- keyboards/treadstone32/keymaps/like_jis/keymap.c | 2 +- keyboards/vision_division/keymaps/default/rules.mk | 1 - keyboards/vision_division/rules.mk | 2 +- keyboards/xd60/keymaps/Jos/keymap.c | 7 +- keyboards/xd60/keymaps/cheese/keymap.c | 8 +- keyboards/z150_bh/config.h | 43 ++ keyboards/z150_bh/info.json | 191 +++++++ keyboards/z150_bh/keymaps/default/keymap.c | 48 ++ keyboards/z150_bh/keymaps/default_tkl/keymap.c | 48 ++ keyboards/z150_bh/readme.md | 14 + keyboards/z150_bh/rules.mk | 26 + keyboards/z150_bh/z150_bh.c | 32 ++ keyboards/z150_bh/z150_bh.h | 31 ++ keyboards/z150_blackheart/config.h | 43 -- keyboards/z150_blackheart/info.json | 191 ------- keyboards/z150_blackheart/keymaps/default/keymap.c | 48 -- .../z150_blackheart/keymaps/default_tkl/keymap.c | 48 -- keyboards/z150_blackheart/readme.md | 14 - keyboards/z150_blackheart/rules.mk | 26 - keyboards/z150_blackheart/z150_blackheart.c | 32 -- keyboards/z150_blackheart/z150_blackheart.h | 31 -- keyboards/zinc/config.h | 25 - keyboards/zinc/i2c.c | 162 ------ keyboards/zinc/i2c.h | 49 -- keyboards/zinc/keymaps/default/config.h | 2 - keyboards/zinc/keymaps/default/keymap.c | 26 +- keyboards/zinc/keymaps/default/readme_en.md | 131 +++++ keyboards/zinc/keymaps/default/readme_jp.md | 48 +- keyboards/zinc/keymaps/default/rules.mk | 57 +- keyboards/zinc/keymaps/ginjake/config.h | 2 - keyboards/zinc/keymaps/ginjake/rules.mk | 48 +- keyboards/zinc/keymaps/monks/config.h | 2 - keyboards/zinc/keymaps/monks/keymap.c | 3 +- keyboards/zinc/keymaps/monks/readme_jp.md | 2 +- keyboards/zinc/keymaps/monks/rules.mk | 50 +- keyboards/zinc/keymaps/toshi0383/config.h | 2 - keyboards/zinc/keymaps/toshi0383/rules.mk | 67 ++- keyboards/zinc/readme.md | 6 +- keyboards/zinc/rev1/config.h | 61 ++- keyboards/zinc/rev1/matrix.c | 357 ------------- keyboards/zinc/rev1/rev1.c | 1 - keyboards/zinc/rev1/rev1.h | 15 - keyboards/zinc/rev1/rules.mk | 5 +- keyboards/zinc/rev1/serial_config.h | 18 - keyboards/zinc/rev1/serial_config_simpleapi.h | 8 - keyboards/zinc/rev1/split_scomm.c | 95 ---- keyboards/zinc/rev1/split_scomm.h | 24 - keyboards/zinc/rev1/split_util.c | 70 --- keyboards/zinc/rev1/split_util.h | 19 - keyboards/zinc/reva/config.h | 56 +- keyboards/zinc/reva/matrix.c | 357 ------------- keyboards/zinc/reva/reva.c | 1 - keyboards/zinc/reva/reva.h | 15 - keyboards/zinc/reva/rules.mk | 5 +- keyboards/zinc/reva/serial_config.h | 18 - keyboards/zinc/reva/serial_config_simpleapi.h | 8 - keyboards/zinc/reva/split_scomm.c | 95 ---- keyboards/zinc/reva/split_scomm.h | 24 - keyboards/zinc/reva/split_util.c | 70 --- keyboards/zinc/reva/split_util.h | 19 - keyboards/zinc/rules.mk | 4 - keyboards/zinc/serial.c | 589 --------------------- keyboards/zinc/serial.h | 84 --- keyboards/zinc/zinc.h | 6 +- 558 files changed, 11735 insertions(+), 14334 deletions(-) delete mode 100644 keyboards/2_milk/2_milk.c delete mode 100644 keyboards/2_milk/2_milk.h delete mode 100644 keyboards/2_milk/config.h delete mode 100644 keyboards/2_milk/info.json delete mode 100644 keyboards/2_milk/keymaps/binary/keymap.c delete mode 100644 keyboards/2_milk/keymaps/binary/readme.md delete mode 100644 keyboards/2_milk/keymaps/copypasta/keymap.c delete mode 100644 keyboards/2_milk/keymaps/copypasta/readme.md delete mode 100644 keyboards/2_milk/keymaps/default/keymap.c delete mode 100644 keyboards/2_milk/keymaps/default/readme.md delete mode 100644 keyboards/2_milk/keymaps/emoji/config.h delete mode 100644 keyboards/2_milk/keymaps/emoji/keymap.c delete mode 100644 keyboards/2_milk/keymaps/emoji/readme.md delete mode 100644 keyboards/2_milk/keymaps/emoji/rules.mk delete mode 100644 keyboards/2_milk/keymaps/excessbread/keymap.c delete mode 100644 keyboards/2_milk/keymaps/excessbread/readme.md delete mode 100644 keyboards/2_milk/keymaps/mikethetiger/keymap.c delete mode 100644 keyboards/2_milk/keymaps/mikethetiger/readme.md delete mode 100644 keyboards/2_milk/keymaps/mikethetiger/rules.mk delete mode 100644 keyboards/2_milk/keymaps/mouse/keymap.c delete mode 100644 keyboards/2_milk/keymaps/mouse/readme.md delete mode 100644 keyboards/2_milk/readme.md delete mode 100644 keyboards/2_milk/rules.mk create mode 100644 keyboards/at101_bh/at101_bh.c create mode 100644 keyboards/at101_bh/at101_bh.h create mode 100644 keyboards/at101_bh/config.h create mode 100644 keyboards/at101_bh/info.json create mode 100644 keyboards/at101_bh/keymaps/default/keymap.c create mode 100644 keyboards/at101_bh/readme.md create mode 100644 keyboards/at101_bh/rules.mk delete mode 100644 keyboards/at101_blackheart/at101_blackheart.c delete mode 100644 keyboards/at101_blackheart/at101_blackheart.h delete mode 100644 keyboards/at101_blackheart/config.h delete mode 100644 keyboards/at101_blackheart/info.json delete mode 100644 keyboards/at101_blackheart/keymaps/default/keymap.c delete mode 100644 keyboards/at101_blackheart/readme.md delete mode 100644 keyboards/at101_blackheart/rules.mk create mode 100644 keyboards/dm9records/ergoinu/config.h create mode 100644 keyboards/dm9records/ergoinu/ergoinu.c create mode 100644 keyboards/dm9records/ergoinu/ergoinu.h create mode 100644 keyboards/dm9records/ergoinu/info.json create mode 100644 keyboards/dm9records/ergoinu/keymaps/default/config.h create mode 100644 keyboards/dm9records/ergoinu/keymaps/default/keymap.c create mode 100644 keyboards/dm9records/ergoinu/keymaps/default/rules.mk create mode 100644 keyboards/dm9records/ergoinu/keymaps/default_jis/config.h create mode 100644 keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c create mode 100644 keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk create mode 100644 keyboards/dm9records/ergoinu/matrix.c create mode 100644 keyboards/dm9records/ergoinu/readme.md create mode 100644 keyboards/dm9records/ergoinu/rules.mk create mode 100644 keyboards/dm9records/ergoinu/serial.c create mode 100644 keyboards/dm9records/ergoinu/serial.h create mode 100644 keyboards/dm9records/ergoinu/serial_config.h create mode 100644 keyboards/dm9records/ergoinu/split_util.c create mode 100644 keyboards/dm9records/ergoinu/split_util.h create mode 100644 keyboards/dm9records/plaid/config.h create mode 100644 keyboards/dm9records/plaid/info.json create mode 100644 keyboards/dm9records/plaid/keymaps/brickbots/config.h create mode 100644 keyboards/dm9records/plaid/keymaps/brickbots/keymap.c create mode 100644 keyboards/dm9records/plaid/keymaps/brickbots/readme.md create mode 100644 keyboards/dm9records/plaid/keymaps/default/config.h create mode 100644 keyboards/dm9records/plaid/keymaps/default/keymap.c create mode 100644 keyboards/dm9records/plaid/keymaps/default/readme.md create mode 100644 keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h create mode 100644 keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c create mode 100644 keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md create mode 100644 keyboards/dm9records/plaid/plaid.c create mode 100644 keyboards/dm9records/plaid/plaid.h create mode 100644 keyboards/dm9records/plaid/readme.md create mode 100644 keyboards/dm9records/plaid/rules.mk create mode 100644 keyboards/dm9records/tartan/config.h create mode 100644 keyboards/dm9records/tartan/info.json create mode 100644 keyboards/dm9records/tartan/keymaps/default/keymap.c create mode 100644 keyboards/dm9records/tartan/keymaps/default/readme.md create mode 100644 keyboards/dm9records/tartan/readme.md create mode 100644 keyboards/dm9records/tartan/rules.mk create mode 100644 keyboards/dm9records/tartan/tartan.c create mode 100644 keyboards/dm9records/tartan/tartan.h delete mode 100644 keyboards/ergoinu/config.h delete mode 100644 keyboards/ergoinu/ergoinu.c delete mode 100644 keyboards/ergoinu/ergoinu.h delete mode 100644 keyboards/ergoinu/info.json delete mode 100644 keyboards/ergoinu/keymaps/default/config.h delete mode 100644 keyboards/ergoinu/keymaps/default/keymap.c delete mode 100644 keyboards/ergoinu/keymaps/default/rules.mk delete mode 100644 keyboards/ergoinu/keymaps/default_jis/config.h delete mode 100644 keyboards/ergoinu/keymaps/default_jis/keymap.c delete mode 100644 keyboards/ergoinu/keymaps/default_jis/rules.mk delete mode 100644 keyboards/ergoinu/matrix.c delete mode 100644 keyboards/ergoinu/readme.md delete mode 100644 keyboards/ergoinu/rules.mk delete mode 100644 keyboards/ergoinu/serial.c delete mode 100644 keyboards/ergoinu/serial.h delete mode 100644 keyboards/ergoinu/serial_config.h delete mode 100644 keyboards/ergoinu/split_util.c delete mode 100644 keyboards/ergoinu/split_util.h create mode 100644 keyboards/hhkb/ansi/ansi.c create mode 100644 keyboards/hhkb/ansi/ansi.h create mode 100644 keyboards/hhkb/ansi/config.h create mode 100644 keyboards/hhkb/ansi/hhkb_avr.h create mode 100644 keyboards/hhkb/ansi/info.json create mode 100644 keyboards/hhkb/ansi/keymaps/blakedietz/README.md create mode 100644 keyboards/hhkb/ansi/keymaps/blakedietz/config.h create mode 100644 keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk create mode 100644 keyboards/hhkb/ansi/keymaps/brett/config.h create mode 100644 keyboards/hhkb/ansi/keymaps/brett/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/brett/readme.md create mode 100644 keyboards/hhkb/ansi/keymaps/brett/rules.mk create mode 100644 keyboards/hhkb/ansi/keymaps/cinaeco/README.md create mode 100644 keyboards/hhkb/ansi/keymaps/cinaeco/config.h create mode 100644 keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk create mode 100644 keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/dbroqua/readme.md create mode 100644 keyboards/hhkb/ansi/keymaps/default/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/eric/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/krusli/config.h create mode 100644 keyboards/hhkb/ansi/keymaps/krusli/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/lxol/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/mjt/config.h create mode 100644 keyboards/hhkb/ansi/keymaps/mjt/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/mjt/readme.md create mode 100644 keyboards/hhkb/ansi/keymaps/mjt/rules.mk create mode 100644 keyboards/hhkb/ansi/keymaps/schaeferdev/README.md create mode 100644 keyboards/hhkb/ansi/keymaps/schaeferdev/config.h create mode 100644 keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk create mode 100644 keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c create mode 100644 keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h create mode 100644 keyboards/hhkb/ansi/keymaps/shela/config.h create mode 100644 keyboards/hhkb/ansi/keymaps/shela/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h create mode 100644 keyboards/hhkb/ansi/keymaps/shela/readme.md create mode 100644 keyboards/hhkb/ansi/keymaps/shela/rules.mk create mode 100644 keyboards/hhkb/ansi/keymaps/smt/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md create mode 100644 keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore create mode 100644 keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/via/keymap.c create mode 100644 keyboards/hhkb/ansi/keymaps/via/rules.mk create mode 100644 keyboards/hhkb/ansi/keymaps/xyverz/keymap.c create mode 100644 keyboards/hhkb/ansi/matrix.c create mode 100644 keyboards/hhkb/ansi/readme.md create mode 100644 keyboards/hhkb/ansi/rules.mk delete mode 100644 keyboards/hhkb/config.h delete mode 100644 keyboards/hhkb/hhkb.c delete mode 100644 keyboards/hhkb/hhkb.h delete mode 100644 keyboards/hhkb/hhkb_avr.h delete mode 100644 keyboards/hhkb/info.json create mode 100644 keyboards/hhkb/jp/config.h create mode 100644 keyboards/hhkb/jp/hhkb_avr.h create mode 100644 keyboards/hhkb/jp/info.json create mode 100644 keyboards/hhkb/jp/jp.c create mode 100644 keyboards/hhkb/jp/jp.h create mode 100644 keyboards/hhkb/jp/keymaps/bakingpy/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/bakingpy/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/default/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/default/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/default_mac/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/default_mac/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/dhertz/config.h create mode 100644 keyboards/hhkb/jp/keymaps/dhertz/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/dhertz/keymap.h create mode 100644 keyboards/hhkb/jp/keymaps/dhertz/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md create mode 100644 keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/sh_jp/README.md create mode 100644 keyboards/hhkb/jp/keymaps/sh_jp/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/sh_jp/rules.mk create mode 100644 keyboards/hhkb/jp/keymaps/via/config.h create mode 100644 keyboards/hhkb/jp/keymaps/via/keymap.c create mode 100644 keyboards/hhkb/jp/keymaps/via/rules.mk create mode 100644 keyboards/hhkb/jp/matrix.c create mode 100644 keyboards/hhkb/jp/readme.md create mode 100644 keyboards/hhkb/jp/rules.mk delete mode 100644 keyboards/hhkb/keymaps/bakingpy/keymap.c delete mode 100644 keyboards/hhkb/keymaps/bakingpy/rules.mk delete mode 100644 keyboards/hhkb/keymaps/blakedietz/README.md delete mode 100644 keyboards/hhkb/keymaps/blakedietz/config.h delete mode 100644 keyboards/hhkb/keymaps/blakedietz/keymap.c delete mode 100644 keyboards/hhkb/keymaps/blakedietz/rules.mk delete mode 100644 keyboards/hhkb/keymaps/brett/config.h delete mode 100644 keyboards/hhkb/keymaps/brett/keymap.c delete mode 100644 keyboards/hhkb/keymaps/brett/readme.md delete mode 100644 keyboards/hhkb/keymaps/brett/rules.mk delete mode 100644 keyboards/hhkb/keymaps/cinaeco/README.md delete mode 100644 keyboards/hhkb/keymaps/cinaeco/config.h delete mode 100644 keyboards/hhkb/keymaps/cinaeco/keymap.c delete mode 100644 keyboards/hhkb/keymaps/cinaeco/rules.mk delete mode 100644 keyboards/hhkb/keymaps/dbroqua/keymap.c delete mode 100644 keyboards/hhkb/keymaps/dbroqua/readme.md delete mode 100644 keyboards/hhkb/keymaps/default/keymap.c delete mode 100644 keyboards/hhkb/keymaps/dhertz/config.h delete mode 100644 keyboards/hhkb/keymaps/dhertz/keymap.c delete mode 100644 keyboards/hhkb/keymaps/dhertz/keymap.h delete mode 100644 keyboards/hhkb/keymaps/dhertz/rules.mk delete mode 100644 keyboards/hhkb/keymaps/enoch_jp/keymap.c delete mode 100644 keyboards/hhkb/keymaps/enoch_jp/rules.mk delete mode 100644 keyboards/hhkb/keymaps/eric/keymap.c delete mode 100644 keyboards/hhkb/keymaps/halfqwerty_jp/README.md delete mode 100644 keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c delete mode 100644 keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk delete mode 100644 keyboards/hhkb/keymaps/jp/keymap.c delete mode 100644 keyboards/hhkb/keymaps/jp/rules.mk delete mode 100644 keyboards/hhkb/keymaps/jp_mac/keymap.c delete mode 100644 keyboards/hhkb/keymaps/jp_mac/rules.mk delete mode 100644 keyboards/hhkb/keymaps/krusli/config.h delete mode 100644 keyboards/hhkb/keymaps/krusli/keymap.c delete mode 100644 keyboards/hhkb/keymaps/lxol/keymap.c delete mode 100644 keyboards/hhkb/keymaps/mjt/config.h delete mode 100644 keyboards/hhkb/keymaps/mjt/keymap.c delete mode 100644 keyboards/hhkb/keymaps/mjt/readme.md delete mode 100644 keyboards/hhkb/keymaps/rdg_jp/keymap.c delete mode 100644 keyboards/hhkb/keymaps/rdg_jp/rules.mk delete mode 100644 keyboards/hhkb/keymaps/schaeferdev/README.md delete mode 100644 keyboards/hhkb/keymaps/schaeferdev/config.h delete mode 100644 keyboards/hhkb/keymaps/schaeferdev/keymap.c delete mode 100644 keyboards/hhkb/keymaps/schaeferdev/rules.mk delete mode 100644 keyboards/hhkb/keymaps/sh_jp/README.md delete mode 100644 keyboards/hhkb/keymaps/sh_jp/keymap.c delete mode 100644 keyboards/hhkb/keymaps/sh_jp/rules.mk delete mode 100644 keyboards/hhkb/keymaps/shela/action_pseudo_lut.c delete mode 100644 keyboards/hhkb/keymaps/shela/action_pseudo_lut.h delete mode 100644 keyboards/hhkb/keymaps/shela/config.h delete mode 100644 keyboards/hhkb/keymaps/shela/keymap.c delete mode 100644 keyboards/hhkb/keymaps/shela/keymap_jis2us.h delete mode 100644 keyboards/hhkb/keymaps/shela/readme.md delete mode 100644 keyboards/hhkb/keymaps/shela/rules.mk delete mode 100644 keyboards/hhkb/keymaps/smt/keymap.c delete mode 100644 keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c delete mode 100644 keyboards/hhkb/keymaps/tobiasvl_iso/readme.md delete mode 100644 keyboards/hhkb/keymaps/tominabox1/.gitignore delete mode 100644 keyboards/hhkb/keymaps/tominabox1/keymap.c delete mode 100644 keyboards/hhkb/keymaps/xyverz/keymap.c delete mode 100644 keyboards/hhkb/matrix.c delete mode 100644 keyboards/hhkb/readme.md delete mode 100644 keyboards/hhkb/rules.mk create mode 100644 keyboards/keyboardio/model01/config.h create mode 100644 keyboards/keyboardio/model01/info.json create mode 100644 keyboards/keyboardio/model01/keymaps/default/config.h create mode 100644 keyboards/keyboardio/model01/keymaps/default/keymap.c create mode 100644 keyboards/keyboardio/model01/keymaps/default/readme.md create mode 100644 keyboards/keyboardio/model01/keymaps/dshields/config.h create mode 100644 keyboards/keyboardio/model01/keymaps/dshields/keymap.c create mode 100644 keyboards/keyboardio/model01/keymaps/dshields/readme.md create mode 100644 keyboards/keyboardio/model01/keymaps/tw1t611/config.h create mode 100644 keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c create mode 100644 keyboards/keyboardio/model01/keymaps/tw1t611/readme.md create mode 100644 keyboards/keyboardio/model01/leds.c create mode 100644 keyboards/keyboardio/model01/leds.h create mode 100644 keyboards/keyboardio/model01/matrix.c create mode 100644 keyboards/keyboardio/model01/model01.c create mode 100644 keyboards/keyboardio/model01/model01.h create mode 100644 keyboards/keyboardio/model01/readme.md create mode 100644 keyboards/keyboardio/model01/rules.mk create mode 100644 keyboards/keyboardio/model01/wire-protocol-constants.h create mode 100644 keyboards/keyboardio/readme.md delete mode 100755 keyboards/lily58/i2c.c delete mode 100755 keyboards/lily58/i2c.h create mode 100644 keyboards/lily58/keymaps/chuan/config.h create mode 100644 keyboards/lily58/keymaps/chuan/keymap.c create mode 100644 keyboards/lily58/keymaps/chuan/rules.mk delete mode 100644 keyboards/lily58/lib/glcdfont.c create mode 100644 keyboards/lily58/lib/glcdfont_lily.c delete mode 100755 keyboards/lily58/rev1/split_scomm.c delete mode 100755 keyboards/lily58/rev1/split_scomm.h delete mode 100755 keyboards/lily58/rev1/split_util.h delete mode 100755 keyboards/lily58/serial.h delete mode 100644 keyboards/lily58/serial_config.h delete mode 100755 keyboards/lily58/ssd1306.c delete mode 100755 keyboards/lily58/ssd1306.h delete mode 100644 keyboards/model01/config.h delete mode 100644 keyboards/model01/info.json delete mode 100644 keyboards/model01/keymaps/default/config.h delete mode 100644 keyboards/model01/keymaps/default/keymap.c delete mode 100644 keyboards/model01/keymaps/default/readme.md delete mode 100644 keyboards/model01/keymaps/dshields/config.h delete mode 100644 keyboards/model01/keymaps/dshields/keymap.c delete mode 100644 keyboards/model01/keymaps/dshields/readme.md delete mode 100644 keyboards/model01/keymaps/tw1t611/config.h delete mode 100644 keyboards/model01/keymaps/tw1t611/keymap.c delete mode 100644 keyboards/model01/keymaps/tw1t611/readme.md delete mode 100644 keyboards/model01/leds.c delete mode 100644 keyboards/model01/leds.h delete mode 100644 keyboards/model01/matrix.c delete mode 100644 keyboards/model01/model01.c delete mode 100644 keyboards/model01/model01.h delete mode 100644 keyboards/model01/readme.md delete mode 100644 keyboards/model01/rules.mk delete mode 100644 keyboards/model01/wire-protocol-constants.h create mode 100644 keyboards/omnikey_bh/config.h create mode 100644 keyboards/omnikey_bh/info.json create mode 100644 keyboards/omnikey_bh/keymaps/default/keymap.c create mode 100644 keyboards/omnikey_bh/omnikey_bh.c create mode 100644 keyboards/omnikey_bh/omnikey_bh.h create mode 100644 keyboards/omnikey_bh/readme.md create mode 100644 keyboards/omnikey_bh/rules.mk delete mode 100644 keyboards/omnikey_blackheart/config.h delete mode 100644 keyboards/omnikey_blackheart/info.json delete mode 100644 keyboards/omnikey_blackheart/keymaps/default/keymap.c delete mode 100644 keyboards/omnikey_blackheart/omnikey_blackheart.c delete mode 100644 keyboards/omnikey_blackheart/omnikey_blackheart.h delete mode 100644 keyboards/omnikey_blackheart/readme.md delete mode 100644 keyboards/omnikey_blackheart/rules.mk delete mode 100644 keyboards/pancake/config.h delete mode 100644 keyboards/pancake/feather/config.h delete mode 100644 keyboards/pancake/feather/readme.md delete mode 100644 keyboards/pancake/feather/rules.mk delete mode 100644 keyboards/pancake/info.json delete mode 100644 keyboards/pancake/keymaps/default/keymap.c delete mode 100644 keyboards/pancake/keymaps/default/readme.md delete mode 100644 keyboards/pancake/pancake.c delete mode 100644 keyboards/pancake/pancake.h delete mode 100644 keyboards/pancake/promicro/config.h delete mode 100644 keyboards/pancake/promicro/readme.md delete mode 100644 keyboards/pancake/promicro/rules.mk delete mode 100644 keyboards/pancake/readme.md delete mode 100644 keyboards/plaid/config.h delete mode 100644 keyboards/plaid/info.json delete mode 100644 keyboards/plaid/keymaps/brickbots/config.h delete mode 100644 keyboards/plaid/keymaps/brickbots/keymap.c delete mode 100644 keyboards/plaid/keymaps/brickbots/readme.md delete mode 100644 keyboards/plaid/keymaps/default/config.h delete mode 100644 keyboards/plaid/keymaps/default/keymap.c delete mode 100644 keyboards/plaid/keymaps/default/readme.md delete mode 100644 keyboards/plaid/keymaps/thehalfdeafchef/config.h delete mode 100644 keyboards/plaid/keymaps/thehalfdeafchef/keymap.c delete mode 100644 keyboards/plaid/keymaps/thehalfdeafchef/readme.md delete mode 100644 keyboards/plaid/plaid.c delete mode 100644 keyboards/plaid/plaid.h delete mode 100644 keyboards/plaid/readme.md delete mode 100644 keyboards/plaid/rules.mk create mode 100644 keyboards/spaceman/2_milk/2_milk.c create mode 100644 keyboards/spaceman/2_milk/2_milk.h create mode 100644 keyboards/spaceman/2_milk/config.h create mode 100644 keyboards/spaceman/2_milk/info.json create mode 100644 keyboards/spaceman/2_milk/keymaps/binary/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/binary/readme.md create mode 100644 keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/copypasta/readme.md create mode 100644 keyboards/spaceman/2_milk/keymaps/default/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/default/readme.md create mode 100644 keyboards/spaceman/2_milk/keymaps/emoji/config.h create mode 100644 keyboards/spaceman/2_milk/keymaps/emoji/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/emoji/readme.md create mode 100644 keyboards/spaceman/2_milk/keymaps/emoji/rules.mk create mode 100644 keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/excessbread/readme.md create mode 100644 keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md create mode 100644 keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk create mode 100644 keyboards/spaceman/2_milk/keymaps/mouse/keymap.c create mode 100644 keyboards/spaceman/2_milk/keymaps/mouse/readme.md create mode 100644 keyboards/spaceman/2_milk/readme.md create mode 100644 keyboards/spaceman/2_milk/rules.mk create mode 100644 keyboards/spaceman/pancake/config.h create mode 100644 keyboards/spaceman/pancake/feather/config.h create mode 100644 keyboards/spaceman/pancake/feather/rules.mk create mode 100644 keyboards/spaceman/pancake/info.json create mode 100644 keyboards/spaceman/pancake/keymaps/default/keymap.c create mode 100644 keyboards/spaceman/pancake/keymaps/default/readme.md create mode 100644 keyboards/spaceman/pancake/pancake.c create mode 100644 keyboards/spaceman/pancake/pancake.h create mode 100644 keyboards/spaceman/pancake/promicro/config.h create mode 100644 keyboards/spaceman/pancake/promicro/rules.mk create mode 100644 keyboards/spaceman/pancake/readme.md delete mode 100644 keyboards/tartan/config.h delete mode 100644 keyboards/tartan/info.json delete mode 100644 keyboards/tartan/keymaps/default/keymap.c delete mode 100644 keyboards/tartan/keymaps/default/readme.md delete mode 100644 keyboards/tartan/readme.md delete mode 100644 keyboards/tartan/rules.mk delete mode 100644 keyboards/tartan/tartan.c delete mode 100644 keyboards/tartan/tartan.h delete mode 100644 keyboards/tkc1800/i2c.c delete mode 100644 keyboards/tkc1800/i2c.h delete mode 100644 keyboards/tkc1800/keymaps/default/config.h delete mode 100644 keyboards/tkc1800/keymaps/smt/config.h delete mode 100644 keyboards/tkc1800/keymaps/wkl/config.h delete mode 100644 keyboards/tkc1800/keymaps/yanfali/config.h delete mode 100644 keyboards/vision_division/keymaps/default/rules.mk create mode 100644 keyboards/z150_bh/config.h create mode 100644 keyboards/z150_bh/info.json create mode 100644 keyboards/z150_bh/keymaps/default/keymap.c create mode 100644 keyboards/z150_bh/keymaps/default_tkl/keymap.c create mode 100644 keyboards/z150_bh/readme.md create mode 100644 keyboards/z150_bh/rules.mk create mode 100644 keyboards/z150_bh/z150_bh.c create mode 100644 keyboards/z150_bh/z150_bh.h delete mode 100644 keyboards/z150_blackheart/config.h delete mode 100644 keyboards/z150_blackheart/info.json delete mode 100644 keyboards/z150_blackheart/keymaps/default/keymap.c delete mode 100644 keyboards/z150_blackheart/keymaps/default_tkl/keymap.c delete mode 100644 keyboards/z150_blackheart/readme.md delete mode 100644 keyboards/z150_blackheart/rules.mk delete mode 100644 keyboards/z150_blackheart/z150_blackheart.c delete mode 100644 keyboards/z150_blackheart/z150_blackheart.h delete mode 100644 keyboards/zinc/i2c.c delete mode 100644 keyboards/zinc/i2c.h create mode 100644 keyboards/zinc/keymaps/default/readme_en.md delete mode 100644 keyboards/zinc/rev1/matrix.c delete mode 100644 keyboards/zinc/rev1/serial_config.h delete mode 100644 keyboards/zinc/rev1/serial_config_simpleapi.h delete mode 100644 keyboards/zinc/rev1/split_scomm.c delete mode 100644 keyboards/zinc/rev1/split_scomm.h delete mode 100644 keyboards/zinc/rev1/split_util.c delete mode 100644 keyboards/zinc/rev1/split_util.h delete mode 100644 keyboards/zinc/reva/matrix.c delete mode 100644 keyboards/zinc/reva/serial_config.h delete mode 100644 keyboards/zinc/reva/serial_config_simpleapi.h delete mode 100644 keyboards/zinc/reva/split_scomm.c delete mode 100644 keyboards/zinc/reva/split_scomm.h delete mode 100644 keyboards/zinc/reva/split_util.c delete mode 100644 keyboards/zinc/reva/split_util.h delete mode 100644 keyboards/zinc/serial.c delete mode 100644 keyboards/zinc/serial.h (limited to 'keyboards') diff --git a/keyboards/2_milk/2_milk.c b/keyboards/2_milk/2_milk.c deleted file mode 100644 index 96071c2ad5..0000000000 --- a/keyboards/2_milk/2_milk.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#include "2_milk.h" diff --git a/keyboards/2_milk/2_milk.h b/keyboards/2_milk/2_milk.h deleted file mode 100644 index 7d90d2064f..0000000000 --- a/keyboards/2_milk/2_milk.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - K00, \ - K01 \ -) { \ - { K00 }, \ - { K01 } \ -} diff --git a/keyboards/2_milk/config.h b/keyboards/2_milk/config.h deleted file mode 100644 index e9a104117b..0000000000 --- a/keyboards/2_milk/config.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#pragma once -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xB195 -#define DEVICE_VER 0x0001 -#define MANUFACTURER rionlion100 -#define PRODUCT 2% Milk -#define DESCRIPTION A milk themed 2% Keyboard - -/* key matrix size */ -#define MATRIX_ROWS 2 -#define MATRIX_COLS 1 - -/* Milk default pinout */ -#define DIRECT_PINS { \ - {D4}, \ - {C6} \ -} -#define UNUSED_PINS - -#ifdef RGBLIGHT_ENABLE -#define RGB_DI_PIN B6 -#define RGBLED_NUM 1 -#endif diff --git a/keyboards/2_milk/info.json b/keyboards/2_milk/info.json deleted file mode 100644 index 6dc4eeaf8b..0000000000 --- a/keyboards/2_milk/info.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "keyboard_name": "2% Milk", - "keyboard_folder": "2_milk", - "url": "", - "maintainer": "rionlion100 (Spaceman)", - "width": 1, - "height": 2, - "layouts": { - "LAYOUT": { - "key_count": 2, - "layout": [ {"x": 0, "y": 0 }, {"x": 0, "y": 1 }] - } - } -} diff --git a/keyboards/2_milk/keymaps/binary/keymap.c b/keyboards/2_milk/keymaps/binary/keymap.c deleted file mode 100644 index c8df8e9ff0..0000000000 --- a/keyboards/2_milk/keymaps/binary/keymap.c +++ /dev/null @@ -1,8 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_P0, - KC_P1 - ) -}; diff --git a/keyboards/2_milk/keymaps/binary/readme.md b/keyboards/2_milk/keymaps/binary/readme.md deleted file mode 100644 index 5ebcbd3e58..0000000000 --- a/keyboards/2_milk/keymaps/binary/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# Binary keymap -0 and 1 that's it diff --git a/keyboards/2_milk/keymaps/copypasta/keymap.c b/keyboards/2_milk/keymaps/copypasta/keymap.c deleted file mode 100644 index c82a6ff216..0000000000 --- a/keyboards/2_milk/keymaps/copypasta/keymap.c +++ /dev/null @@ -1,8 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - RCTL(KC_C), - RCTL(KC_V) - ) -}; diff --git a/keyboards/2_milk/keymaps/copypasta/readme.md b/keyboards/2_milk/keymaps/copypasta/readme.md deleted file mode 100644 index 6c2f4e8fbf..0000000000 --- a/keyboards/2_milk/keymaps/copypasta/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# Copy/Paste Keymap -![Picture](https://i.imgur.com/7LMZZrL.png) diff --git a/keyboards/2_milk/keymaps/default/keymap.c b/keyboards/2_milk/keymaps/default/keymap.c deleted file mode 100644 index 1f327eee9a..0000000000 --- a/keyboards/2_milk/keymaps/default/keymap.c +++ /dev/null @@ -1,8 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_Z, - KC_X - ) -}; diff --git a/keyboards/2_milk/keymaps/default/readme.md b/keyboards/2_milk/keymaps/default/readme.md deleted file mode 100644 index 4482bce34a..0000000000 --- a/keyboards/2_milk/keymaps/default/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# Default keymap for 2% Milk -![Picture](https://i.imgur.com/9PsZ6wa.png) diff --git a/keyboards/2_milk/keymaps/emoji/config.h b/keyboards/2_milk/keymaps/emoji/config.h deleted file mode 100644 index 90e4d63102..0000000000 --- a/keyboards/2_milk/keymaps/emoji/config.h +++ /dev/null @@ -1,2 +0,0 @@ -#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC -#define TAPPING_TERM 300 \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/emoji/keymap.c b/keyboards/2_milk/keymaps/emoji/keymap.c deleted file mode 100644 index 024a6a054b..0000000000 --- a/keyboards/2_milk/keymaps/emoji/keymap.c +++ /dev/null @@ -1,53 +0,0 @@ -#include QMK_KEYBOARD_H - -enum tapdance_keycodes { - TD_KEY_1, - TD_KEY_2, -}; - -void dance_key_one (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); // ¯\_(ツ)_/¯ - SEND_STRING(SS_TAP(X_ENTER)); - reset_tap_dance (state); - } else if (state->count == 2) { - cycle_unicode_input_mode(+1); - reset_tap_dance (state); - } -} - -void dance_key_two (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - send_unicode_hex_string("0CA0 005F 0CA0"); // ಠ_ಠ - SEND_STRING(SS_TAP(X_ENTER)); - reset_tap_dance (state); - } else if (state->count == 2) { - send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); // (ノಠ痊ಠ)ノ彡┻━┻ - SEND_STRING(SS_TAP(X_ENTER)); - reset_tap_dance (state); - } else if (state->count == 3) { - send_unicode_hex_string("256D 2229 256E 0028 002D 005F 002D 0029 256D 2229 256E"); // ╭∩╮(-_-)╭∩╮ - SEND_STRING(SS_TAP(X_ENTER)); - reset_tap_dance (state); - } else if (state->count == 4) { - send_unicode_hex_string("0028 3065 FFE3 0020 00B3 FFE3 0029 3065"); // (づ ̄ ³ ̄)づ - SEND_STRING(SS_TAP(X_ENTER)); - reset_tap_dance (state); - } else if (state->count == 5) { - send_unicode_hex_string("0028 FE3A FE39 FE3A 0029"); // (︺︹︺) - SEND_STRING(SS_TAP(X_ENTER)); - reset_tap_dance (state); - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_KEY_1] = ACTION_TAP_DANCE_FN(dance_key_one), - [TD_KEY_2] = ACTION_TAP_DANCE_FN(dance_key_two), -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - TD(TD_KEY_1), - TD(TD_KEY_2) - ), -}; diff --git a/keyboards/2_milk/keymaps/emoji/readme.md b/keyboards/2_milk/keymaps/emoji/readme.md deleted file mode 100644 index 1d5a08730d..0000000000 --- a/keyboards/2_milk/keymaps/emoji/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# Emoji Keymap -![Picture](https://i.imgur.com/1zEZ9Lq.png) - -# Unicode Setup - -Unicode input in QMK works by inputting a sequence of characters to the -OS, sort of like a macro. Unfortunately, the way this is done differs -for each platform. Specifically, each platform requires a different -combination of keys to trigger Unicode input. Therefore, a -corresponding input mode has to be set in QMK. - -Documentation: [Feature Unicode](https://beta.docs.qmk.fm/features/feature_unicode#input-modes) - -On this keymap the default unicode mode it's `UC_LNX`. -You can change it permanently tapping 2 times the KeyOne to select the next mode. - -## Unicode Mode List -- UC_LNX -- UC_OSX -- UC_WIN -- UC_WINC - -# Keymap -To add more functionality to this Minimal Keyboard, -it's implemented the tap dance feature, so pressing the same key -multiples times will produce different emojis. - -## Key One - -- 1 Tap: `¯\_(ツ)_/¯` -- 2 Taps: Switch Unicode Input Type - -## Key Two - -- 1 Tap: `ಠ_ಠ` -- 2 Taps: `(ノಠ痊ಠ)ノ彡┻━┻` -- 3 Taps: `╭∩╮(-_-)╭∩╮` -- 4 Taps: `(づ ̄ ³ ̄)づ` -- 5 Taps: `(︺︹︺)` \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/emoji/rules.mk b/keyboards/2_milk/keymaps/emoji/rules.mk deleted file mode 100644 index 7a64eb9023..0000000000 --- a/keyboards/2_milk/keymaps/emoji/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -UNICODE_ENABLE = yes # Unicode -TAP_DANCE_ENABLE = yes # Tap Dance \ No newline at end of file diff --git a/keyboards/2_milk/keymaps/excessbread/keymap.c b/keyboards/2_milk/keymaps/excessbread/keymap.c deleted file mode 100644 index a01b47f271..0000000000 --- a/keyboards/2_milk/keymaps/excessbread/keymap.c +++ /dev/null @@ -1,8 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_LGUI, - KC_F11 - ) -}; diff --git a/keyboards/2_milk/keymaps/excessbread/readme.md b/keyboards/2_milk/keymaps/excessbread/readme.md deleted file mode 100644 index a6535e62cf..0000000000 --- a/keyboards/2_milk/keymaps/excessbread/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# ExcessBread's keymap -requested by excessbread diff --git a/keyboards/2_milk/keymaps/mikethetiger/keymap.c b/keyboards/2_milk/keymaps/mikethetiger/keymap.c deleted file mode 100644 index 20e2292f08..0000000000 --- a/keyboards/2_milk/keymaps/mikethetiger/keymap.c +++ /dev/null @@ -1,8 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_VOLU, - KC_VOLD - ) -}; diff --git a/keyboards/2_milk/keymaps/mikethetiger/readme.md b/keyboards/2_milk/keymaps/mikethetiger/readme.md deleted file mode 100644 index 677732b057..0000000000 --- a/keyboards/2_milk/keymaps/mikethetiger/readme.md +++ /dev/null @@ -1 +0,0 @@ -# mikethetiger's keymap for 2% Milk diff --git a/keyboards/2_milk/keymaps/mikethetiger/rules.mk b/keyboards/2_milk/keymaps/mikethetiger/rules.mk deleted file mode 100644 index b5f038ef23..0000000000 --- a/keyboards/2_milk/keymaps/mikethetiger/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -# Build Options -# comment out to disable the options. -# -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 -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled -AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below -RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/2_milk/keymaps/mouse/keymap.c b/keyboards/2_milk/keymaps/mouse/keymap.c deleted file mode 100644 index a8ba44fb46..0000000000 --- a/keyboards/2_milk/keymaps/mouse/keymap.c +++ /dev/null @@ -1,8 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_BTN1, - KC_BTN2 - ) -}; diff --git a/keyboards/2_milk/keymaps/mouse/readme.md b/keyboards/2_milk/keymaps/mouse/readme.md deleted file mode 100644 index 8ecb99eddb..0000000000 --- a/keyboards/2_milk/keymaps/mouse/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# left and right mouse buttons -requested by WanderingVagrant diff --git a/keyboards/2_milk/readme.md b/keyboards/2_milk/readme.md deleted file mode 100644 index f3a85458ce..0000000000 --- a/keyboards/2_milk/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# 2% Milk - -![2%Milk](https://i.imgur.com/Ud96uXn.png) - -A 2% Meme board themed around a milk carton - -Keyboard Maintainer: Spaceman AKA:[Rionlion100](https://github.com/rionlion100) -Hardware Availability: [Open Source](https://github.com/Rionlion100/Spaceboards/tree/master/Keyboards/2%25%20Milk) - -Make example for this keyboard (after setting up your build environment): - - make 2_milk:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - -### Credits -+ Case design by Soft -+ PCB by PyroL -+ Name by jetpacktuxedo diff --git a/keyboards/2_milk/rules.mk b/keyboards/2_milk/rules.mk deleted file mode 100644 index 4e6c5f7039..0000000000 --- a/keyboards/2_milk/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled -AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below -RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/at101_bh/at101_bh.c b/keyboards/at101_bh/at101_bh.c new file mode 100644 index 0000000000..3b519373b0 --- /dev/null +++ b/keyboards/at101_bh/at101_bh.c @@ -0,0 +1 @@ +#include "at101_bh.h" diff --git a/keyboards/at101_bh/at101_bh.h b/keyboards/at101_bh/at101_bh.h new file mode 100644 index 0000000000..54655cf60e --- /dev/null +++ b/keyboards/at101_bh/at101_bh.h @@ -0,0 +1,25 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K0000, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, \ + K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, K0308, K0209, K0309, K0009, \ + K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, K0508, K0409, K0509, K0109, \ + K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705, K0606, K0608, K0708, K0609, K0709, \ + K0800, K1101, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805, K0905, K0806, K0807, K0808, K0908, K0809, K0909, \ + K1000, K1100, K1001, K1102, K1005, K1105, K1006, K1106, K1007, K1107, K1008, K1108, K1009 \ +) { \ + { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, KC_NO, K0009 }, \ + { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, KC_NO, K0109 }, \ + { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208, K0209 }, \ + { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308, K0309 }, \ + { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408, K0409 }, \ + { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508, K0509 }, \ + { K0600, K0601, K0602, K0603, K0604, K0605, K0606, KC_NO, K0608, K0609 }, \ + { K0700, K0701, K0702, K0703, K0704, K0705, KC_NO, KC_NO, K0708, K0709 }, \ + { K0800, K0801, K0802, K0803, K0804, K0805, K0806, K0807, K0808, K0809 }, \ + { K0900, K0901, K0902, K0903, K0904, K0905, KC_NO, KC_NO, K0908, K0909 }, \ + { K1000, K1001, KC_NO, KC_NO, KC_NO, K1005, K1006, K1007, K1008, K1009 }, \ + { K1100, K1101, K1102, KC_NO, KC_NO, K1105, K1106, K1107, K1108, KC_NO } \ +} diff --git a/keyboards/at101_bh/config.h b/keyboards/at101_bh/config.h new file mode 100644 index 0000000000..6928118b79 --- /dev/null +++ b/keyboards/at101_bh/config.h @@ -0,0 +1,35 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER blindassassin111 +#define PRODUCT AT101_BH PCB +#define DESCRIPTION Replacement AT101 PCB + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F0, F1, F4, D4, F6, F5, F7, B6, B5, D5, C7, C6 } +#define MATRIX_COL_PINS { D1, D0, B7, B3, B2, B1, B0, E6, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* force n-key rollover*/ +#define FORCE_NKRO diff --git a/keyboards/at101_bh/info.json b/keyboards/at101_bh/info.json new file mode 100644 index 0000000000..1d28dc230b --- /dev/null +++ b/keyboards/at101_bh/info.json @@ -0,0 +1,121 @@ +{ + "keyboard_name": "AT101 BH PCB", + "keyboard_folder": "at101_bh", + "url": "https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html", + "maintainer": "qmk, blindassassin111", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"Print Screen", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"Grave", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"-", "x":11, "y":1.5}, + {"label":"=", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"Keypad /", "x":19.5, "y":1.5}, + {"label":"Keypad *", "x":20.5, "y":1.5}, + {"label":"Keypad -", "x":21.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"LBracket", "x":11.5, "y":2.5}, + {"label":"RBracket]", "x":12.5, "y":2.5}, + {"label":"Backslash", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Page Down", "x":17.25, "y":2.5}, + {"label":"Keypad 7", "x":18.5, "y":2.5}, + {"label":"Keypad 8", "x":19.5, "y":2.5}, + {"label":"Keypad 9", "x":20.5, "y":2.5}, + {"label":"Keypad +", "x":21.5, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":"Semicolon", "x":10.75, "y":3.5}, + {"label":"Quote", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"Keypad 4", "x":18.5, "y":3.5}, + {"label":"Keypad 5", "x":19.5, "y":3.5}, + {"label":"Keypad 6", "x":20.5, "y":3.5}, + {"label":"Keypad =", "x":21.5, "y":3.5}, + {"label":"LShift", "x":0, "y":4.5, "w":1.25}, + {"label":"ISO Backslash", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"Comma", "x":9.25, "y":4.5}, + {"label":"Period", "x":10.25, "y":4.5}, + {"label":"Slash", "x":11.25, "y":4.5}, + {"label":"RShift", "x":12.25, "y":4.5, "w":1.75}, + {"label":"Fn", "x":14, "y":4.5}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Keypad 1", "x":18.5, "y":4.5}, + {"label":"Keypad 2", "x":19.5, "y":4.5}, + {"label":"Keypad 3", "x":20.5, "y":4.5}, + {"label":"Keypad Enter", "x":21.5, "y":4.5, "h":2}, + {"label":"LCtrl", "x":0, "y":5.5, "w":1.25}, + {"label":"LGUI", "x":1.25, "y":5.5, "w":1.25}, + {"label":"LAlt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"RAlt", "x":10, "y":5.5, "w":1.25}, + {"label":"RGUI", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"RCtrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5}, + {"label":"Keypad 0", "x":18.5, "y":5.5, "w":2}, + {"label":"Keypad .", "x":20.5, "y":5.5} + ] + } + } +} diff --git a/keyboards/at101_bh/keymaps/default/keymap.c b/keyboards/at101_bh/keymaps/default/keymap.c new file mode 100644 index 0000000000..086c25e1c7 --- /dev/null +++ b/keyboards/at101_bh/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + 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_SLCK, KC_PAUS, + 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_LSFT,MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI,KC_MENU, KC_RCTL, KC_LEFT,KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + DDRB |= (1 << 4); + DDRD |= (1 << 6) | (1 << 7); + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + PORTD |= (1 << 7); + } else { + PORTD &= ~(1 << 7); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + PORTB |= (1 << 4); + } else { + PORTB &= ~(1 << 4); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + PORTD |= (1 << 6); + } else { + PORTD &= ~(1 << 6); + } +} \ No newline at end of file diff --git a/keyboards/at101_bh/readme.md b/keyboards/at101_bh/readme.md new file mode 100644 index 0000000000..8a9ce2496f --- /dev/null +++ b/keyboards/at101_bh/readme.md @@ -0,0 +1,15 @@ +# AT101 BH PCB + +![AT101 BH PCB](https://deskthority.net/resources/image/48571) + +A replacement PCB for AT101 keyboards. + +Keyboard Maintainer: QMK Community and blindassassin111 +Hardware Supported: AT101 BH PCB +Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html + +Make example for this keyboard (after setting up your build environment): + + make at101_bh:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/at101_bh/rules.mk b/keyboards/at101_bh/rules.mk new file mode 100644 index 0000000000..1930d9f27f --- /dev/null +++ b/keyboards/at101_bh/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/at101_blackheart/at101_blackheart.c b/keyboards/at101_blackheart/at101_blackheart.c deleted file mode 100644 index aa07a78643..0000000000 --- a/keyboards/at101_blackheart/at101_blackheart.c +++ /dev/null @@ -1 +0,0 @@ -#include "at101_blackheart.h" diff --git a/keyboards/at101_blackheart/at101_blackheart.h b/keyboards/at101_blackheart/at101_blackheart.h deleted file mode 100644 index 24ac1b7c54..0000000000 --- a/keyboards/at101_blackheart/at101_blackheart.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef at101_blackheart_H -#define at101_blackheart_H - -#include "quantum.h" - -#define LAYOUT( \ - K0000, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, \ - K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, K0308, K0209, K0309, K0009, \ - K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, K0508, K0409, K0509, K0109, \ - K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705, K0606, K0608, K0708, K0609, K0709, \ - K0800, K1101, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805, K0905, K0806, K0807, K0808, K0908, K0809, K0909, \ - K1000, K1100, K1001, K1102, K1005, K1105, K1006, K1106, K1007, K1107, K1008, K1108, K1009 \ -) { \ - { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, KC_NO, K0009 }, \ - { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, KC_NO, K0109 }, \ - { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208, K0209 }, \ - { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308, K0309 }, \ - { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408, K0409 }, \ - { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508, K0509 }, \ - { K0600, K0601, K0602, K0603, K0604, K0605, K0606, KC_NO, K0608, K0609 }, \ - { K0700, K0701, K0702, K0703, K0704, K0705, KC_NO, KC_NO, K0708, K0709 }, \ - { K0800, K0801, K0802, K0803, K0804, K0805, K0806, K0807, K0808, K0809 }, \ - { K0900, K0901, K0902, K0903, K0904, K0905, KC_NO, KC_NO, K0908, K0909 }, \ - { K1000, K1001, KC_NO, KC_NO, KC_NO, K1005, K1006, K1007, K1008, K1009 }, \ - { K1100, K1101, K1102, KC_NO, KC_NO, K1105, K1106, K1107, K1108, KC_NO } \ -} - -#endif diff --git a/keyboards/at101_blackheart/config.h b/keyboards/at101_blackheart/config.h deleted file mode 100644 index 83814c6486..0000000000 --- a/keyboards/at101_blackheart/config.h +++ /dev/null @@ -1,35 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER blindassassin111 -#define PRODUCT AT101_Blackheart PCB -#define DESCRIPTION Replacement AT101 PCB - -/* key matrix size */ -#define MATRIX_ROWS 12 -#define MATRIX_COLS 10 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { F0, F1, F4, D4, F6, F5, F7, B6, B5, D5, C7, C6 } -#define MATRIX_COL_PINS { D1, D0, B7, B3, B2, B1, B0, E6, D2, D3 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* force n-key rollover*/ -#define FORCE_NKRO diff --git a/keyboards/at101_blackheart/info.json b/keyboards/at101_blackheart/info.json deleted file mode 100644 index 4bef46712d..0000000000 --- a/keyboards/at101_blackheart/info.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "keyboard_name": "AT101 Blackheart PCB", - "keyboard_folder": "at101_blackheart", - "url": "https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html", - "maintainer": "qmk, blindassassin111", - "width": 22.5, - "height": 6.5, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":2, "y":0}, - {"label":"F2", "x":3, "y":0}, - {"label":"F3", "x":4, "y":0}, - {"label":"F4", "x":5, "y":0}, - {"label":"F5", "x":6.5, "y":0}, - {"label":"F6", "x":7.5, "y":0}, - {"label":"F7", "x":8.5, "y":0}, - {"label":"F8", "x":9.5, "y":0}, - {"label":"F9", "x":11, "y":0}, - {"label":"F10", "x":12, "y":0}, - {"label":"F11", "x":13, "y":0}, - {"label":"F12", "x":14, "y":0}, - {"label":"Print Screen", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, - {"label":"Grave", "x":0, "y":1.5}, - {"label":"1", "x":1, "y":1.5}, - {"label":"2", "x":2, "y":1.5}, - {"label":"3", "x":3, "y":1.5}, - {"label":"4", "x":4, "y":1.5}, - {"label":"5", "x":5, "y":1.5}, - {"label":"6", "x":6, "y":1.5}, - {"label":"7", "x":7, "y":1.5}, - {"label":"8", "x":8, "y":1.5}, - {"label":"9", "x":9, "y":1.5}, - {"label":"0", "x":10, "y":1.5}, - {"label":"-", "x":11, "y":1.5}, - {"label":"=", "x":12, "y":1.5}, - {"label":"Backspace", "x":13, "y":1.5, "w":2}, - {"label":"Insert", "x":15.25, "y":1.5}, - {"label":"Home", "x":16.25, "y":1.5}, - {"label":"Page Up", "x":17.25, "y":1.5}, - {"label":"Num Lock", "x":18.5, "y":1.5}, - {"label":"Keypad /", "x":19.5, "y":1.5}, - {"label":"Keypad *", "x":20.5, "y":1.5}, - {"label":"Keypad -", "x":21.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"LBracket", "x":11.5, "y":2.5}, - {"label":"RBracket]", "x":12.5, "y":2.5}, - {"label":"Backslash", "x":13.5, "y":2.5, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.5}, - {"label":"End", "x":16.25, "y":2.5}, - {"label":"Page Down", "x":17.25, "y":2.5}, - {"label":"Keypad 7", "x":18.5, "y":2.5}, - {"label":"Keypad 8", "x":19.5, "y":2.5}, - {"label":"Keypad 9", "x":20.5, "y":2.5}, - {"label":"Keypad +", "x":21.5, "y":2.5}, - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":"Semicolon", "x":10.75, "y":3.5}, - {"label":"Quote", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - {"label":"Keypad 4", "x":18.5, "y":3.5}, - {"label":"Keypad 5", "x":19.5, "y":3.5}, - {"label":"Keypad 6", "x":20.5, "y":3.5}, - {"label":"Keypad =", "x":21.5, "y":3.5}, - {"label":"LShift", "x":0, "y":4.5, "w":1.25}, - {"label":"ISO Backslash", "x":1.25, "y":4.5}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":"Comma", "x":9.25, "y":4.5}, - {"label":"Period", "x":10.25, "y":4.5}, - {"label":"Slash", "x":11.25, "y":4.5}, - {"label":"RShift", "x":12.25, "y":4.5, "w":1.75}, - {"label":"Fn", "x":14, "y":4.5}, - {"label":"Up", "x":16.25, "y":4.5}, - {"label":"Keypad 1", "x":18.5, "y":4.5}, - {"label":"Keypad 2", "x":19.5, "y":4.5}, - {"label":"Keypad 3", "x":20.5, "y":4.5}, - {"label":"Keypad Enter", "x":21.5, "y":4.5, "h":2}, - {"label":"LCtrl", "x":0, "y":5.5, "w":1.25}, - {"label":"LGUI", "x":1.25, "y":5.5, "w":1.25}, - {"label":"LAlt", "x":2.5, "y":5.5, "w":1.25}, - {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, - {"label":"RAlt", "x":10, "y":5.5, "w":1.25}, - {"label":"RGUI", "x":11.25, "y":5.5, "w":1.25}, - {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, - {"label":"RCtrl", "x":13.75, "y":5.5, "w":1.25}, - {"label":"Left", "x":15.25, "y":5.5}, - {"label":"Down", "x":16.25, "y":5.5}, - {"label":"Right", "x":17.25, "y":5.5}, - {"label":"Keypad 0", "x":18.5, "y":5.5, "w":2}, - {"label":"Keypad .", "x":20.5, "y":5.5} - ] - } - } -} diff --git a/keyboards/at101_blackheart/keymaps/default/keymap.c b/keyboards/at101_blackheart/keymaps/default/keymap.c deleted file mode 100644 index 086c25e1c7..0000000000 --- a/keyboards/at101_blackheart/keymaps/default/keymap.c +++ /dev/null @@ -1,53 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - LAYOUT( - 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_SLCK, KC_PAUS, - 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL, - KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_LSFT,MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI,KC_MENU, KC_RCTL, KC_LEFT,KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), - - LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - DDRB |= (1 << 4); - DDRD |= (1 << 6) | (1 << 7); - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - PORTD |= (1 << 7); - } else { - PORTD &= ~(1 << 7); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - PORTB |= (1 << 4); - } else { - PORTB &= ~(1 << 4); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - PORTD |= (1 << 6); - } else { - PORTD &= ~(1 << 6); - } -} \ No newline at end of file diff --git a/keyboards/at101_blackheart/readme.md b/keyboards/at101_blackheart/readme.md deleted file mode 100644 index d435d6955a..0000000000 --- a/keyboards/at101_blackheart/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# AT101 Blackheart PCB - -![AT101 Blackheart PCB](https://deskthority.net/resources/image/48571) - -A replacement PCB for AT101 keyboards. - -Keyboard Maintainer: QMK Community and blindassassin111 -Hardware Supported: AT101 blackheart PCB -Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html - -Make example for this keyboard (after setting up your build environment): - - make at101_blackheart:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/at101_blackheart/rules.mk b/keyboards/at101_blackheart/rules.mk deleted file mode 100644 index 1930d9f27f..0000000000 --- a/keyboards/at101_blackheart/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = halfkay - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 33b3a9d824..361d702c5b 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -102,7 +102,7 @@ enum keyboard_macros { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_LSFT) #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -258,10 +258,6 @@ void persistent_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/atreus62/keymaps/atreus52/keymap.c b/keyboards/atreus62/keymaps/atreus52/keymap.c index c7dcb67653..31a01ccd87 100644 --- a/keyboards/atreus62/keymaps/atreus52/keymap.c +++ b/keyboards/atreus62/keymaps/atreus52/keymap.c @@ -10,6 +10,8 @@ #define KC_RAIS MO(RAISE) #define KC_LOWR MO(LOWER) +#define KC_TGBD TG(BDO) +#define KC_TGRS TG(RESETL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DVORAK] = LAYOUT_kc( @@ -17,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \ NO, A, O, E, U, I, D, H, T, N, S, NO, \ NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \ - NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO + NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO ), [QWERTY] = LAYOUT_kc( @@ -25,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, Q, W, E, R, T, Y, U, I, O, P, NO, \ NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \ NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \ - NO, FN2, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO + NO, TGBD, LALT, LCTL, LOWR, LSFT, BSPC, ENT, SPC, RAIS, LGUI, LEFT, RGHT, NO ), [RAISE] = LAYOUT_kc( @@ -33,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \ NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \ NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \ - NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO + NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TGRS, NO ), [LOWER] = LAYOUT_kc( @@ -49,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \ NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \ NO, T, Z, X, C, V, 8, B, N, M, L, NO, \ - NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO + NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, TGBD, NO ), [RESETL] = LAYOUT( @@ -57,15 +59,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_FN3,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, TG(RESETL),KC_NO ) }; -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer - [3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch (id) { diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c index aad2d643cd..f9234a7b2f 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \ KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ - MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), /* Layer 1: Standard ISO layer */ [KM_QWERTY] = LAYOUT( \ 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_SLCK,KC_PAUS, \ @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \ KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \ - MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,KC_FN1, KC_LEFT,KC_DOWN,KC_RGHT), + MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), /* Layer 2: Media layer */ [KM_MEDIA] = LAYOUT( \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_WAKE,KC_PWR, KC_SLEP, \ @@ -75,10 +75,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(KM_QWERTY) -}; - void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 3dc99319ed..849f4f6077 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -158,12 +158,12 @@ along with this program. If not, see . //#define MAGIC_KEY_SLEEP_LED Z // Audio Click -#define AUDIO_CLICKY +//#define AUDIO_CLICKY // Music Mode Polyphony // NOTE: Must change polyphony_rate to a number higher than 0 in voices.c -#define AUDIO_VOICES -#define PITCH_STANDARD_A 880.0f +//#define AUDIO_VOICES +//#define PITCH_STANDARD_A 880.0f // Mouse keys #define MOUSEKEY_DELAY 0 diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index 41a29b3537..83d55e0f70 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -28,5 +28,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d #MIDI_ENABLE = yes # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c index 0fa1d9d989..0d94eb46c9 100644 --- a/keyboards/clueboard/card/keymaps/default/keymap.c +++ b/keyboards/clueboard/card/keymaps/default/keymap.c @@ -38,6 +38,7 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { +#ifdef AUDIO_ENABLE case SONG_SU: if (record->event.pressed) { PLAY_SONG(tone_startup); @@ -58,7 +59,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; - +#endif default: return true; } diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index 998bb5e0eb..82ee482bed 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -10,7 +10,7 @@ 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 +AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c index c472f78b7d..716ff19abd 100644 --- a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c @@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on // Configure ignore mod tap interrupt per key -bool get_ignore_mod_tap_interrupt(uint16_t keycode) { +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { switch (keycode) { // I don't like how mod tap interrupt feels with these keys specifically when I'm typing case LCTL_T(KC_ESC): diff --git a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c index 7e39908195..ce4876536f 100644 --- a/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c +++ b/keyboards/converter/usb_usb/keymaps/coloneljesus/keymap.c @@ -283,13 +283,9 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, CAPS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP, END, PSCR,SLCK,PAUS, INS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, TILD, TRNS,APP, 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 ), }; -const action_t PROGMEM fn_actions[] = { - [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde -}; - #endif diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 55d51eb08a..0769edf3b9 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -124,7 +124,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } #endif -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case ALT_T(KC_A): return TAPPING_TERM + 100; diff --git a/keyboards/cu75/cu75.c b/keyboards/cu75/cu75.c index 6dc2898454..60c92b708a 100644 --- a/keyboards/cu75/cu75.c +++ b/keyboards/cu75/cu75.c @@ -26,7 +26,7 @@ void matrix_init_kb(void) #ifdef AUDIO_ENABLE audio_init(); - PLAY_NOTE_ARRAY(test_sound, false, STACCATO); + PLAY_SONG(test_sound); // Fix port B5 cbi(DDRB, 5); sbi(PORTB, 5); diff --git a/keyboards/dm9records/ergoinu/config.h b/keyboards/dm9records/ergoinu/config.h new file mode 100644 index 0000000000..dfc8a52930 --- /dev/null +++ b/keyboards/dm9records/ergoinu/config.h @@ -0,0 +1,109 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Takuya Urakawa + +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 . +*/ + +#pragma once + +#include "config_common.h" +#include + +/* USB Device descriptor parameter + VID & PID are lisenced from microchip sublisence program, Don't use other project! */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEE60 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Dm9Records +#define PRODUCT ergoinu +#define DESCRIPTION An (Not Portable But Small) Ergonomic split keyboard + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#define USE_SERIAL + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2 } + +// wiring of each half +#define MATRIX_COLS 7 +#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, F5, F4 } + +/* 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 DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B6 + +#define RGBLED_NUM 7 + +#ifndef IOS_DEVICE_ENABLE + #if RGBLED_NUM <= 7 + #define RGBLIGHT_LIMIT_VAL 255 + #define RGBLIGHT_VAL_STEP 17 + #endif +#else + #define RGBLIGHT_LIMIT_VAL 90 + #define RGBLIGHT_VAL_STEP 4 +#endif + +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) + #define USB_MAX_POWER_CONSUMPTION 500 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * 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 diff --git a/keyboards/dm9records/ergoinu/ergoinu.c b/keyboards/dm9records/ergoinu/ergoinu.c new file mode 100644 index 0000000000..b43ab17c8b --- /dev/null +++ b/keyboards/dm9records/ergoinu/ergoinu.c @@ -0,0 +1,5 @@ +#include "ergoinu.h" + +void matrix_init_kb(void) { + matrix_init_user(); +}; diff --git a/keyboards/dm9records/ergoinu/ergoinu.h b/keyboards/dm9records/ergoinu/ergoinu.h new file mode 100644 index 0000000000..43249a8440 --- /dev/null +++ b/keyboards/dm9records/ergoinu/ergoinu.h @@ -0,0 +1,44 @@ +/* +Copyright 2018 Takuya Urakawa + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +#include "ws2812.h" +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L07, L08, L09, L10, L11, L12, L13, R07, R08, R09, R10, R11, R12, R13, \ + L14, L15, L16, L17, L18, L19, R14, R15, R16, R17, R18, R19, R20, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, R27,\ + L26, L27, L28, L29, L30, R28, R29, R30, R31, R32 \ + ) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L07, L08, L09, L10, L11, L12, L13 }, \ + { L14, KC_NO, L15, L16, L17, L18, L19 }, \ + { L20, KC_NO, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L26, L27, L28, L29, L30}, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R13, R12, R11, R10, R09, R08, R07 }, \ + { R20, R19, R18, R17, R16, R15, R14 }, \ + { R27, R26, R25, R24, R23, R22, R21 }, \ + { KC_NO, KC_NO, R32, R31, R30, R29, R28 } \ + } + diff --git a/keyboards/dm9records/ergoinu/info.json b/keyboards/dm9records/ergoinu/info.json new file mode 100644 index 0000000000..3627049a5e --- /dev/null +++ b/keyboards/dm9records/ergoinu/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "Ergoinu", + "url": "", + "maintainer": "hsgw(Takuya Urakawa)", + "width": 18, + "height": 5.4, + "layouts": { + "LAYOUT": { + "key_count": 64, + "layout": [ + { "x": 0, "y": 0.6, "label": "ESC" }, + { "x": 1, "y": 0.4, "label": "1" }, + { "x": 2, "y": 0.4, "label": "2" }, + { "x": 3, "y": 0.25, "label": "3" }, + { "x": 4, "y": 0, "label": "4" }, + { "x": 5, "y": 0.25, "label": "5" }, + { "x": 6, "y": 0.4, "label": "6" }, + + { "x": 11, "y": 0.4, "label": "7" }, + { "x": 12, "y": 0.25, "label": "8" }, + { "x": 13, "y": 0, "label": "9" }, + { "x": 14, "y": 0.25, "label": "0" }, + { "x": 15, "y": 0.4, "label": "MINUS" }, + { "x": 16, "y": 0.4, "label": "EQUAL" }, + { "x": 17, "y": 0.6, "label": "BACKSLASH" }, + + { "x": 0, "y": 1.6, "label": "DELETE" }, + { "x": 1, "y": 1.4, "label": "TAB" }, + { "x": 2, "y": 1.4, "label": "Q" }, + { "x": 3, "y": 1.25, "label": "W" }, + { "x": 4, "y": 1, "label": "E" }, + { "x": 5, "y": 1.25, "label": "R" }, + { "x": 6, "y": 1.4, "label": "T" }, + + { "x": 11, "y": 1.4, "label": "Y" }, + { "x": 12, "y": 1.25, "label": "U" }, + { "x": 13, "y": 1, "label": "I" }, + { "x": 14, "y": 1.25, "label": "O" }, + { "x": 15, "y": 1.4, "label": "P" }, + { "x": 16, "y": 1.4, "label": "LBRACKET" }, + { "x": 17, "y": 1.6, "label": "RBRACKET" }, + + { "x": 0.25, "y": 2.6, "w": 1.75, "label": "LCTRL" }, + { "x": 2, "y": 2.4, "label": "A" }, + { "x": 3, "y": 2.25, "label": "S" }, + { "x": 4, "y": 2, "label": "D" }, + { "x": 5, "y": 2.25, "label": "F" }, + { "x": 6, "y": 2.4, "label": "G" }, + + { "x": 11, "y": 2.4, "label": "H" }, + { "x": 12, "y": 2.25, "label": "J" }, + { "x": 13, "y": 2, "label": "K" }, + { "x": 14, "y": 2.25, "label": "L" }, + { "x": 15, "y": 2.4, "label": "SEMICOLON" }, + { "x": 16, "y": 2.4, "label": "QUOTE" }, + { "x": 17, "y": 2.6, "label": "GRAVE" }, + + { "x": 0.25, "y": 3.6, "w": 1.75, "label": "LSHIFT" }, + { "x": 2, "y": 3.4, "label": "Z" }, + { "x": 3, "y": 3.25, "label": "X" }, + { "x": 4, "y": 3, "label": "C" }, + { "x": 5, "y": 3.25, "label": "V" }, + { "x": 6, "y": 3.4, "label": "B" }, + + { "x": 11, "y": 3.4, "label": "N" }, + { "x": 12, "y": 3.25, "label": "M" }, + { "x": 13, "y": 3, "label": "COMMA" }, + { "x": 14, "y": 3.25, "label": "DOT" }, + { "x": 15, "y": 3.4, "label": "SLASH" }, + { "x": 16, "y": 3.4, "label": "RSHIFT" }, + { "x": 17, "y": 3.6, "label": "RSHIFT" }, + + { "x": 3, "y": 4.25, "label": "MO(META)" }, + { "x": 4, "y": 4, "label": "LALT" }, + { "x": 5, "y": 4.25, "label": "LGUI" }, + { "x": 6, "y": 4.4, "label": "ENT" }, + { "x": 7, "y": 4.4, "w": 1.5, "label": "SPACE" }, + + { "x": 9.5, "y": 4.4, "w": 1.5, "label": "ENTER" }, + { "x": 11, "y": 4.4, "label": "BACKSPACE" }, + { "x": 12, "y": 4.25, "label": "RGUI" }, + { "x": 13, "y": 4, "label": "RALT" }, + { "x": 14, "y": 4.25, "label": "MO(META)" } + ] + } + } +} diff --git a/keyboards/dm9records/ergoinu/keymaps/default/config.h b/keyboards/dm9records/ergoinu/keymaps/default/config.h new file mode 100644 index 0000000000..bb266f25e7 --- /dev/null +++ b/keyboards/dm9records/ergoinu/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Takuya Urakawa + +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 . +*/ + +#pragma once + +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/dm9records/ergoinu/keymaps/default/keymap.c b/keyboards/dm9records/ergoinu/keymaps/default/keymap.c new file mode 100644 index 0000000000..7f1be4796c --- /dev/null +++ b/keyboards/dm9records/ergoinu/keymaps/default/keymap.c @@ -0,0 +1,101 @@ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#define JA_CLON KC_QUOT // : and + +#define JA_AT KC_LBRC // @ and ` +#define JA_HAT KC_EQL // ^ and ~ +#define JA_ENUN KC_RO // \ and _ (EN mark and UNder score) +#define JA_ENVL KC_JYEN // \ and | (EN mark and Vertical Line) +#define JA_LBRC KC_RBRC // [ and { +#define JA_RBRC KC_BSLS // ] and } + +enum LAYER_NO { + BASE = 0, + META, + CONF +}; + +enum CUSTOM_KEYCODES { + RGB_RST = SAFE_RANGE, + RGB_TYPE, +}; + +// Fillers to make layering more clear +#define ______ KC_TRNS +#define XXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( \ + 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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRV, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, \ + MO(META),KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, KC_RALT, MO(META) \ + ), + + [META] = LAYOUT( \ + MO(CONF),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_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, KC_SLCK, KC_PSCR, KC_HOME, KC_END, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PAUS, KC_PGUP, KC_UP, KC_PGDN, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_LEFT, KC_DOWN, KC_RGHT, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ + ), + [CONF] = LAYOUT( \ + ______, RGB_TYPE,RGB_MOD, RGB_VAI, RGB_HUI, RGB_HUI, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ + RGB_RST, RGB_TOG, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_HUD, 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 \ + ) +}; + +bool enableLEDTypeAnime = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case RGB_RST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + enableLEDTypeAnime = false; + rgblight_step(); + } + #endif + return false; + case RGB_TYPE: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(1); + enableLEDTypeAnime = !enableLEDTypeAnime; + } + #endif + return false; + default: + break; + } + #ifdef RGBLIGHT_ENABLE + if(enableLEDTypeAnime) { + rgblight_mode_noeeprom(1); + uint16_t hue = (rgblight_config.hue + 5) % 360; + rgblight_sethsv_noeeprom(hue, rgblight_config.sat, rgblight_config.val); + } + #endif + + return true; +} + +void matrix_init_user(void) { +} diff --git a/keyboards/dm9records/ergoinu/keymaps/default/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default/rules.mk new file mode 100644 index 0000000000..b2eff12b04 --- /dev/null +++ b/keyboards/dm9records/ergoinu/keymaps/default/rules.mk @@ -0,0 +1,29 @@ + +# 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 +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# ergoinu configs +DISABLE_PROMICRO_LEDs = yes + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) diff --git a/keyboards/dm9records/ergoinu/keymaps/default_jis/config.h b/keyboards/dm9records/ergoinu/keymaps/default_jis/config.h new file mode 100644 index 0000000000..bb266f25e7 --- /dev/null +++ b/keyboards/dm9records/ergoinu/keymaps/default_jis/config.h @@ -0,0 +1,24 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Takuya Urakawa + +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 . +*/ + +#pragma once + +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c b/keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c new file mode 100644 index 0000000000..3a1a88f47c --- /dev/null +++ b/keyboards/dm9records/ergoinu/keymaps/default_jis/keymap.c @@ -0,0 +1,101 @@ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#define JA_CLON KC_QUOT // : and + +#define JA_AT KC_LBRC // @ and ` +#define JA_HAT KC_EQL // ^ and ~ +#define JA_ENUN KC_RO // \ and _ (EN mark and UNder score) +#define JA_ENVL KC_JYEN // \ and | (EN mark and Vertical Line) +#define JA_LBRC KC_RBRC // [ and { +#define JA_RBRC KC_BSLS // ] and } + +enum LAYER_NO { + BASE = 0, + META, + CONF +}; + +enum CUSTOM_KEYCODES { + RGB_RST = SAFE_RANGE, + RGB_TYPE, +}; + +// Fillers to make layering more clear +#define ______ KC_TRNS +#define XXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JA_HAT, KC_JYEN, \ + KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JA_AT, JA_LBRC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JA_CLON, JA_RBRC, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, \ + MO(META),KC_LALT, KC_ZKHK, KC_BSPC, KC_SPC, KC_ENT, KC_BSPC, KC_MHEN, KC_KANA, MO(META) \ + ), + + + [META] = LAYOUT( \ + MO(CONF),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_CAPS, ______, KC_UP, ______, ______, ______, ______, ______, ______, KC_SLCK, KC_PSCR, KC_HOME, KC_END, \ + ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, ______, ______, ______, KC_PAUS, KC_PGUP, KC_UP, KC_PGDN, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_LEFT, KC_DOWN, KC_RGHT, \ + ______, ______, KC_RGUI, KC_DEL, KC_ENT, ______, KC_DEL, KC_HENK, KC_LGUI, ______ \ + ), + [CONF] = LAYOUT( \ + ______, RGB_TYPE,RGB_MOD, RGB_VAI, RGB_HUI, RGB_HUI, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ + RGB_RST, RGB_TOG, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_HUD, 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 \ + ) +}; + +bool enableLEDTypeAnime = false; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case RGB_RST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + enableLEDTypeAnime = false; + rgblight_step(); + } + #endif + return false; + case RGB_TYPE: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(1); + enableLEDTypeAnime = !enableLEDTypeAnime; + } + #endif + return false; + default: + break; + } + #ifdef RGBLIGHT_ENABLE + if(enableLEDTypeAnime) { + rgblight_mode_noeeprom(1); + uint16_t hue = (rgblight_config.hue + 5) % 360; + rgblight_sethsv_noeeprom(hue, rgblight_config.sat, rgblight_config.val); + } + #endif + return true; +} + +void matrix_init_user(void) { +} diff --git a/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk new file mode 100644 index 0000000000..92dde90ff1 --- /dev/null +++ b/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk @@ -0,0 +1,29 @@ + +# 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 = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# ergoinu configs +DISABLE_PROMICRO_LEDs = yes + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) diff --git a/keyboards/dm9records/ergoinu/matrix.c b/keyboards/dm9records/ergoinu/matrix.c new file mode 100644 index 0000000000..4a80cf9f24 --- /dev/null +++ b/keyboards/dm9records/ergoinu/matrix.c @@ -0,0 +1,292 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "quantum.h" + +#include "serial.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; +uint8_t is_master = 0 ; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +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); +static uint8_t matrix_master_scan(void); + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + setPinOutput(B0); + setPinOutput(D5); + + #ifdef DISABLE_PROMICRO_LEDs + writePinHigh(B0); + writePinHigh(D5); + #endif + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + is_master = has_usb(); + + 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); + + 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 { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +int serial_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + int ret=serial_update_buffers(); + if (ret ) { +#ifndef DISABLE_PROMICRO_LEDs + if(ret==2) writePinLow(B0); +#endif + return 1; + } +#ifndef DISABLE_PROMICRO_LEDs + writePinHigh(B0); +#endif + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} + +uint8_t matrix_scan(void) { + if (is_master) { + matrix_master_scan(); + }else{ + matrix_slave_scan(); + + int offset = (isLeftHand) ? ROWS_PER_HAND : 0; + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[offset+i] = serial_master_buffer[i]; + } + + matrix_scan_quantum(); + } + return 1; +} + + +uint8_t matrix_master_scan(void) { + + int ret = _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_master_buffer[i] = matrix[offset+i]; + } + + if( serial_transaction() ) { +#ifndef DISABLE_PROMICRO_LEDs + // turn on the indicator led when halves are disconnected + writePinLow(D5); +#endif + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { +#ifndef DISABLE_PROMICRO_LEDs + // turn off the indicator led on no error + writePinHigh(D5); +#endif + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + 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; +} + +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); + } +} + +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); +} diff --git a/keyboards/dm9records/ergoinu/readme.md b/keyboards/dm9records/ergoinu/readme.md new file mode 100644 index 0000000000..de0a1c6c97 --- /dev/null +++ b/keyboards/dm9records/ergoinu/readme.md @@ -0,0 +1,21 @@ +ErgoInu +=== + +![ergoinu](https://i.imgur.com/4CCM8Vl.jpg) + +An (Not Portable But Small) Ergonomic Split Keyboard. + +Keyboard Maintainer: [hsgw](https://github.com/hsgw/) [twitter](https://twitter.com/hsgw) +Hardware Supported: Pro Micro +Hardware Availability & Repository: [https://github.com/hsgw/ergoinu](https://github.com/hsgw/ergoinu) + +Make example for this keyboard (after setting up your build environment): + + make dm9records/ergoinu:default + + (or) + + make dm9records/ergoinu:default_jis + + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/dm9records/ergoinu/rules.mk b/keyboards/dm9records/ergoinu/rules.mk new file mode 100644 index 0000000000..493046ffa4 --- /dev/null +++ b/keyboards/dm9records/ergoinu/rules.mk @@ -0,0 +1,49 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change 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 +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SUBPROJECT_rev1 = no +USE_I2C = no # i2c is not supported +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes +SRC += matrix.c serial.c split_util.c + +# ergoinu configs +DISABLE_PROMICRO_LEDs = yes + +ifneq ($(strip $(ERGOINU)),) + ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) + DISABLE_PROMICRO_LEDs = no + endif +endif + +ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) + OPT_DEFS += -DDISABLE_PROMICRO_LEDs +endif diff --git a/keyboards/dm9records/ergoinu/serial.c b/keyboards/dm9records/ergoinu/serial.c new file mode 100644 index 0000000000..5919415877 --- /dev/null +++ b/keyboards/dm9records/ergoinu/serial.c @@ -0,0 +1,295 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifdef USE_SERIAL + +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// Serial pulse period in microseconds. +#define SELECT_SERIAL_SPEED 1 +#if SELECT_SERIAL_SPEED == 0 + // Very High speed + #define SERIAL_DELAY 4 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 10 // cycles +#elif SELECT_SERIAL_SPEED == 1 + // High speed + #define SERIAL_DELAY 6 // micro sec + #define READ_WRITE_START_ADJUST 23 // cycles + #define READ_WRITE_WIDTH_ADJUST 10 // cycles +#elif SELECT_SERIAL_SPEED == 2 + // Middle speed + #define SERIAL_DELAY 12 // micro sec + #define READ_WRITE_START_ADJUST 25 // cycles + #define READ_WRITE_WIDTH_ADJUST 10 // cycles +#elif SELECT_SERIAL_SPEED == 3 + // Low speed + #define SERIAL_DELAY 24 // micro sec + #define READ_WRITE_START_ADJUST 25 // cycles + #define READ_WRITE_WIDTH_ADJUST 10 // cycles +#elif SELECT_SERIAL_SPEED == 4 + // Very Low speed + #define SERIAL_DELAY 50 // micro sec + #define READ_WRITE_START_ADJUST 25 // cycles + #define READ_WRITE_WIDTH_ADJUST 10 // cycles +#else +#error Illegal Serial Speed +#endif + + +#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) +#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) + +#define SLAVE_INT_WIDTH 1 +#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + +#define SLAVE_DATA_CORRUPT (1<<0) +volatile uint8_t status = 0; + +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static +void serial_delay_half1(void) { + _delay_us(SERIAL_DELAY_HALF1); +} + +inline static +void serial_delay_half2(void) { + _delay_us(SERIAL_DELAY_HALF2); +} + +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void serial_master_init(void) { + serial_output(); + serial_high(); +} + +void serial_slave_init(void) { + serial_input_with_pullup(); + +#if SERIAL_PIN_MASK == _BV(PD0) + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +#elif SERIAL_PIN_MASK == _BV(PD2) + // Enable INT2 + EIMSK |= _BV(INT2); + // Trigger on falling edge of INT2 + EICRA &= ~(_BV(ISC20) | _BV(ISC21)); +#else + #error unknown SERIAL_PIN_MASK value +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static +void sync_recv(void) { + for (int i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static +uint8_t serial_read_byte(void) { + uint8_t byte = 0; + _delay_sub_us(READ_WRITE_START_ADJUST); + for ( uint8_t i = 0; i < 8; ++i) { + serial_delay_half1(); // read the middle of pulses + byte = (byte << 1) | serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + return byte; +} + +// Sends a byte with MSB ordering +static +void serial_write_byte(uint8_t data) { + uint8_t b = 1<<7; + while( b ) { + if(data & b) { + serial_high(); + } else { + serial_low(); + } + b >>= 1; + serial_delay(); + } + serial_low(); // sync_send() / senc_recv() need raise edge +} + +// interrupt handle to be used by the slave device +ISR(SERIAL_PIN_INTERRUPT) { + serial_output(); + + // slave send phase + uint8_t checksum = 0; + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + sync_send(); + serial_write_byte(serial_slave_buffer[i]); + checksum += serial_slave_buffer[i]; + } + sync_send(); + serial_write_byte(checksum); + + // slave switch to input + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 + + // slave recive phase + uint8_t checksum_computed = 0; + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + sync_recv(); + serial_master_buffer[i] = serial_read_byte(); + checksum_computed += serial_master_buffer[i]; + } + sync_recv(); + uint8_t checksum_received = serial_read_byte(); + + if ( checksum_computed != checksum_received ) { + status |= SLAVE_DATA_CORRUPT; + } else { + status &= ~SLAVE_DATA_CORRUPT; + } + + sync_recv(); //weit master output to high +} + +inline +bool serial_slave_DATA_CORRUPT(void) { + return status & SLAVE_DATA_CORRUPT; +} + +// Copies the serial_slave_buffer to the master and sends the +// serial_master_buffer to the slave. +// +// Returns: +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers(void) { + // this code is very time dependent, so we need to disable interrupts + cli(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH); + + // wait for the slaves response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + sei(); + return 1; + } + + // master recive phase + // if the slave is present syncronize with it + + uint8_t checksum_computed = 0; + // receive data from the slave + for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { + sync_recv(); + serial_slave_buffer[i] = serial_read_byte(); + checksum_computed += serial_slave_buffer[i]; + } + sync_recv(); + uint8_t checksum_received = serial_read_byte(); + + if (checksum_computed != checksum_received) { + serial_output(); + serial_high(); + sei(); + return 2; + } + + // master switch to output + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); // 3 + serial_delay_half1(); //4 + + // master send phase + uint8_t checksum = 0; + + for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { + sync_send(); + serial_write_byte(serial_master_buffer[i]); + checksum += serial_master_buffer[i]; + } + sync_send(); + serial_write_byte(checksum); + + // always, release the line when not in use + sync_send(); + + sei(); + return 0; +} + +#endif diff --git a/keyboards/dm9records/ergoinu/serial.h b/keyboards/dm9records/ergoinu/serial.h new file mode 100644 index 0000000000..67cf06ac6b --- /dev/null +++ b/keyboards/dm9records/ergoinu/serial.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +// //////////////////////////////////////////// +// Need Soft Serial defines in serial_config.h +// //////////////////////////////////////////// +// ex. +// #define SERIAL_PIN_DDR DDRD +// #define SERIAL_PIN_PORT PORTD +// #define SERIAL_PIN_INPUT PIND +// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2 +// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2 +// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +// #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +// Buffers for master - slave communication +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); +bool serial_slave_data_corrupt(void); diff --git a/keyboards/dm9records/ergoinu/serial_config.h b/keyboards/dm9records/ergoinu/serial_config.h new file mode 100644 index 0000000000..a16db684ca --- /dev/null +++ b/keyboards/dm9records/ergoinu/serial_config.h @@ -0,0 +1,11 @@ +#pragma once + +/* Soft Serial defines */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND +#define SERIAL_PIN_MASK _BV(PD2) +#define SERIAL_PIN_INTERRUPT INT2_vect + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/dm9records/ergoinu/split_util.c b/keyboards/dm9records/ergoinu/split_util.c new file mode 100644 index 0000000000..0cbc2c69c4 --- /dev/null +++ b/keyboards/dm9records/ergoinu/split_util.c @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" + +#include "serial.h" + +volatile bool isLeftHand = true; + +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 + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { + serial_master_init(); +} + +static void keyboard_slave_setup(void) { + serial_slave_init(); +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); diff --git a/keyboards/dm9records/plaid/config.h b/keyboards/dm9records/plaid/config.h new file mode 100644 index 0000000000..4d7bedee5f --- /dev/null +++ b/keyboards/dm9records/plaid/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 Takuya Urakawa (dm9records.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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +#define VENDOR_ID 0x16c0 +#define PRODUCT_ID 0x27db +#define DEVICE_VER 0x0002 +#define MANUFACTURER dm9records +#define PRODUCT Plaid +#define DESCRIPTION 12x4 ortholinear keyboard with through hole components + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B4, B5, B3, D4 } +#define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define USB_MAX_POWER_CONSUMPTION 100 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* + * 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 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/dm9records/plaid/info.json b/keyboards/dm9records/plaid/info.json new file mode 100644 index 0000000000..318154d7de --- /dev/null +++ b/keyboards/dm9records/plaid/info.json @@ -0,0 +1,113 @@ +{ + "keyboard_name": "Plaid // Through Hole", + "keyboard_folder": "dm9records/plaid", + "url": "https://github.com/hsgw/plaid", + "maintainer": "hsgw(Takuya Urakawa)", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_plaid_mit": { + "key_count": 47, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 2, "x": 5, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + }, + "LAYOUT_plaid_grid": { + "key_count": 48, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + } + } +} diff --git a/keyboards/dm9records/plaid/keymaps/brickbots/config.h b/keyboards/dm9records/plaid/keymaps/brickbots/config.h new file mode 100644 index 0000000000..5733b9e4b0 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/brickbots/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c new file mode 100644 index 0000000000..20b6eac682 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c @@ -0,0 +1,411 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum plaid_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + EXT_PLV, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0 +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// array of keys considered modifiers for led purposes +const uint16_t modifiers[] = { + KC_LCTL, + KC_RCTL, + KC_LALT, + KC_RALT, + KC_LSFT, + KC_RSFT, + KC_LGUI, + KC_RGUI, + LOWER, + RAISE +}; + +//Setup consts for LED modes +#define LEDMODE_ON 1 //always on +#define LEDMODE_OFF 0 //always off +#define LEDMODE_MODS 2 //On with modifiers +#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress +#define LEDMODE_KEY 4 //On with any keypress, off with key release +#define LEDMODE_ENTER 5 // On with enter key + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ltrl | Rctl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_plaid_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, 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 , + KC_LCTL, KC_RCTL, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_plaid_grid( + 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 , + KC_LCTL, KC_RALT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_plaid_grid( + 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 , + KC_LCTL, KC_RALT, 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] = LAYOUT_plaid_grid( + 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_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 Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* 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] = LAYOUT_plaid_grid( + 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 | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + RESET,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,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, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +//Setup config struct for LED +typedef union { + uint32_t raw; + struct { + uint8_t red_mode :8; + uint8_t green_mode :8; + }; +} led_config_t; +led_config_t led_config; + +//Set leds to saved state during powerup +void keyboard_post_init_user(void) { + // Call the post init code. + led_config.raw = eeconfig_read_user(); + + if(led_config.red_mode == LEDMODE_ON) { + writePinHigh(LED_RED); + } + + if(led_config.green_mode == LEDMODE_ON) { + writePinHigh(LED_GREEN); + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LEDMODE_ON; + led_config.green_mode = LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + eeconfig_update_user(led_config.raw); +} + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { + switch (led_mode) { + case LEDMODE_MODS: + for (int i=0;ievent.pressed) { + writePinHigh(led); + } + else { + writePinLow(led); + } + } + } + break; + case LEDMODE_BLINKIN: + if (record->event.pressed) { + if(rand() % 2 == 1) { + if(rand() % 2 == 0) { + writePinLow(led); + } + else { + writePinHigh(led); + } + } + } + break; + case LEDMODE_KEY: + if (record->event.pressed) { + writePinHigh(led); + return; + } + else { + writePinLow(led); + return; + } + break; + case LEDMODE_ENTER: + if (keycode==KC_ENT) { + writePinHigh(led); + } + else { + writePinLow(led); + } + break; + + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* If the either led mode is keypressed based, call the led updater + then let it fall through the keypress handlers. Just to keep + the logic out of this procedure */ + if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_RED, led_config.red_mode, keycode, record); + } + if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + 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) { + layer_off(_PLOVER); + } + return false; + break; + case LED_1: + if (record->event.pressed) { + if (led_config.red_mode==LEDMODE_ON) { + led_config.red_mode=LEDMODE_OFF; + writePinLow(LED_RED); + } + else { + led_config.red_mode=LEDMODE_ON; + writePinHigh(LED_RED); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_2: + if (record->event.pressed) { + if (led_config.green_mode==LEDMODE_ON) { + led_config.green_mode=LEDMODE_OFF; + writePinLow(LED_GREEN); + } + else { + led_config.green_mode=LEDMODE_ON; + writePinHigh(LED_GREEN); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_3: + led_config.red_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_4: + led_config.green_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_5: + led_config.red_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_6: + led_config.green_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_7: + led_config.red_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_8: + led_config.green_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_9: + led_config.red_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_0: + led_config.green_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; + } + return true; +} diff --git a/keyboards/dm9records/plaid/keymaps/brickbots/readme.md b/keyboards/dm9records/plaid/keymaps/brickbots/readme.md new file mode 100644 index 0000000000..48a12fa8bb --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/brickbots/readme.md @@ -0,0 +1,36 @@ +# Brickbots keymap for plaid +Original copyright 2019 Takuya Urakawa (dm9records.com) +LED Support added by Richard Sutherland (rich@brickbots.com) + +This layout is based on the Planck layout, with esc/tab swapped and an extra +ctrl key in the bottom left corner. It includes an adjust layer (6) +accessible by holding the lower and raise modifiers (MO3 and MO4) together. +The adjustment layer is used to set the behavior of the two LEDs: + +**Modifier Mode:** +Activates when any modifier (shift, alt, os, MO) key is held +down. LED turns off when key is release + +**Blinkinlights Mode:** +Random chance of state change on each keystroke. + +**Keypress Mode:** +On for any keypress as long as the key is pressed + +**Carriage Mode:** +Turns on when enter is pressed, turns off when any next key is pressed + +To set the behavior of an LED, and save it to eeprom, hold the +raise/lower keys together to access the adjust layer, then use +the keys indicated below to set the behaviors + +* q = Toggle Red LED state, deactivates any other modes +* w = Toggle Green LED state, deactivates any other modes +* e = Set RED LED to modifier mode +* r = Set GREEN LED to modifier mode +* t = Set RED LED to Blinkinlights mode +* y = set GREEN LED to Blinkinlights mode +* u = set RED LED to Keypress mode +* i = set GREEN LED to Keypress mode +* o = set RED LED to Carriage mode +* p = set GREEN LED to Carriage mode diff --git a/keyboards/dm9records/plaid/keymaps/default/config.h b/keyboards/dm9records/plaid/keymaps/default/config.h new file mode 100644 index 0000000000..5733b9e4b0 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/dm9records/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c new file mode 100644 index 0000000000..6a858a4a73 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/default/keymap.c @@ -0,0 +1,410 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#include QMK_KEYBOARD_H + + +enum plaid_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + EXT_PLV, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0 +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +// array of keys considered modifiers for led purposes +const uint16_t modifiers[] = { + KC_LCTL, + KC_RCTL, + KC_LALT, + KC_RALT, + KC_LSFT, + KC_RSFT, + KC_LGUI, + KC_RGUI, + LOWER, + RAISE +}; + +//Setup consts for LED modes +#define LEDMODE_ON 1 //always on +#define LEDMODE_OFF 0 //always off +#define LEDMODE_MODS 2 //On with modifiers +#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress +#define LEDMODE_KEY 4 //On with any keypress, off with key release +#define LEDMODE_ENTER 5 // On with enter key + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_plaid_grid( + 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 , + KC_LCTL, KC_RALT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_plaid_grid( + 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 , + KC_LCTL, KC_RALT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_plaid_grid( + 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 , + KC_LCTL, KC_RALT, 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] = LAYOUT_plaid_grid( + 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_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 Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + 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_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* 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] = LAYOUT_plaid_grid( + 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 | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + RESET,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,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, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +//Setup config struct for LED +typedef union { + uint32_t raw; + struct { + uint8_t red_mode :8; + uint8_t green_mode :8; + }; +} led_config_t; +led_config_t led_config; + +//Set leds to saved state during powerup +void keyboard_post_init_user(void) { + // Call the post init code. + led_config.raw = eeconfig_read_user(); + + if(led_config.red_mode == LEDMODE_ON) { + writePinHigh(LED_RED); + } + + if(led_config.green_mode == LEDMODE_ON) { + writePinHigh(LED_GREEN); + } +} + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LEDMODE_ON; + led_config.green_mode = LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + eeconfig_update_user(led_config.raw); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { + switch (led_mode) { + case LEDMODE_MODS: + for (int i=0;ievent.pressed) { + writePinHigh(led); + } + else { + writePinLow(led); + } + } + } + break; + case LEDMODE_BLINKIN: + if (record->event.pressed) { + if(rand() % 2 == 1) { + if(rand() % 2 == 0) { + writePinLow(led); + } + else { + writePinHigh(led); + } + } + } + break; + case LEDMODE_KEY: + if (record->event.pressed) { + writePinHigh(led); + return; + } + else { + writePinLow(led); + return; + } + break; + case LEDMODE_ENTER: + if (keycode==KC_ENT) { + writePinHigh(led); + } + else { + writePinLow(led); + } + break; + + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + /* If the either led mode is keypressed based, call the led updater + then let it fall through the keypress handlers. Just to keep + the logic out of this procedure */ + if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_RED, led_config.red_mode, keycode, record); + } + if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { + led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + 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) { + layer_off(_PLOVER); + } + return false; + break; + case LED_1: + if (record->event.pressed) { + if (led_config.red_mode==LEDMODE_ON) { + led_config.red_mode=LEDMODE_OFF; + writePinLow(LED_RED); + } + else { + led_config.red_mode=LEDMODE_ON; + writePinHigh(LED_RED); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_2: + if (record->event.pressed) { + if (led_config.green_mode==LEDMODE_ON) { + led_config.green_mode=LEDMODE_OFF; + writePinLow(LED_GREEN); + } + else { + led_config.green_mode=LEDMODE_ON; + writePinHigh(LED_GREEN); + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_3: + led_config.red_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_4: + led_config.green_mode=LEDMODE_MODS; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_5: + led_config.red_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_6: + led_config.green_mode=LEDMODE_BLINKIN; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_7: + led_config.red_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_8: + led_config.green_mode=LEDMODE_KEY; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_9: + led_config.red_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; + case LED_0: + led_config.green_mode=LEDMODE_ENTER; + eeconfig_update_user(led_config.raw); + return false; + break; + } + return true; +} diff --git a/keyboards/dm9records/plaid/keymaps/default/readme.md b/keyboards/dm9records/plaid/keymaps/default/readme.md new file mode 100644 index 0000000000..5a08a1fff3 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/default/readme.md @@ -0,0 +1,35 @@ +# The default keymap for plaid +Original copyright 2019 Takuya Urakawa (dm9records.com) +LED Support added by Richard Sutherland (rich@brickbots.com) + +This layout is based on the Planck layout, and includes an adjust layer (6) +accessible by holding the lower and raise modifiers (MO3 and MO4) together. +The adjustment layer is used to set the behavior of the two LEDs: + +**Modifier Mode:** +Activates when any modifier (shift, alt, os, MO) key is held +down. LED turns off when key is release + +**Blinkinlights Mode:** +Random chance of state change on each keystroke. + +**Keypress Mode:** +On for any keypress as long as the key is pressed + +**Carriage Mode:** +Turns on when enter is pressed, turns off when any next key is pressed + +To set the behavior of an LED, and save it to eeprom, hold the +raise/lower keys together to access the adjust layer, then use +the keys indicated below to set the behaviors + +* q = Toggle Red LED state, deactivates any other modes +* w = Toggle Green LED state, deactivates any other modes +* e = Set RED LED to modifier mode +* r = Set GREEN LED to modifier mode +* t = Set RED LED to Blinkinlights mode +* y = set GREEN LED to Blinkinlights mode +* u = set RED LED to Keypress mode +* i = set GREEN LED to Keypress mode +* o = set RED LED to Carriage mode +* p = set GREEN LED to Carriage mode diff --git a/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h new file mode 100644 index 0000000000..4bcbc6f673 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Ian Canino (ian@thecommittedbug.io) + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c new file mode 100644 index 0000000000..bdf6c54c31 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c @@ -0,0 +1,182 @@ +#include QMK_KEYBOARD_H + +enum plaid_layers { + _QWERTY, + _DVORAK, + _COLEMAK, + _LOWER, + _RAISE, + _FUNCTION, +}; + +enum plaid_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LED }; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define LED_ON 1 +#define LED_OFF 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LS/( | Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), + + /* Colemak + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LS/( | Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | + * `-----------------------------------------------------------------------------------' + */ + + [_COLEMAK] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | + * `-----------------------------------------------------------------------------------' + */ + + [_DVORAK] = LAYOUT_planck_mit(KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), + + /* LOWER + * ,----------------------------------------------------------------------------. + * | | | MPRV | MPLY | MNXT | | | | PGUP| UP | PGDN|PSCR | + * |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+ + * | | | MUTE | VOLD | VOLU | | | | LEFT| DOWN|RIGHT| | + * |------+------+------+------+------+-----+-----+-----+-----+-----+-----+-----+ + * | | | MAIL | WBAK | WFWD | | | | HOME| | END | | + * |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+ + * | | | | | | DEL | | | | | | + * `----------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_planck_mit(KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_MAIL, KC_WBAK, KC_WFWD, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + /* RAISE + * ,--------------------------------------------------------------------------------. + * | NLCK | 1 | 2 | 3 | - | | | | ! | # | $ | + | + * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ + * | / | 4 | 5 | 6 | + | | | | % | ! | ! | = | + * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ + * | * | 7 | 8 | 9 | , | | | | _ | - | @ | ~ | + * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ + * | | 0 | . | Ent | = | | | | | | ` | + * `--------------------------------------------------------------------------------' + */ + + [_RAISE] = LAYOUT_planck_mit(KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_DLR, KC_PLUS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_PERC, KC_ASTR, KC_AMPR, KC_EQL, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PCMM, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_MINS, KC_AT, KC_TILDE, KC_NO, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV), + + /* Function (Lower + Raise) + * ,-----------------------------------------------------------------------------------------------------------------------. + * | RESET| LCA_T(F1) | LCA_T(F2) | LCA_T(F3) | LCA_T(F4) | LCA_T(F5) | LCA_T(F6) | LCA_T(F7) | | | | | + * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ + * | | | | | | QWERTY | DVORAK | COLEMAK | | | | | + * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ + * | | | | | | | | | | | | | + * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ + * | | | | | | LED | | | | | | + * `-----------------------------------------------------------------------------------------------------------------------' + */ + + [_FUNCTION] = LAYOUT_planck_mit(RESET, LCA_T(KC_F1), LCA_T(KC_F2), LCA_T(KC_F3), LCA_T(KC_F4), LCA_T(KC_F5), LCA_T(KC_F6), LCA_T(KC_F7), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QWERTY, DVORAK, COLEMAK, 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, LED, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)}; + +// constants to toggle LED behavior + +// Setup config struct for LED +typedef union { + uint32_t raw; + struct { + bool red_mode : 1; + bool green_mode : 1; + }; +} led_config_t; +led_config_t led_config; + +void keyboard_post_init_user(void) { led_config.raw = eeconfig_read_user(); } + +void eeconfig_init_user(void) { // EEPROM is getting reset! + led_config.raw = 0; + led_config.red_mode = LED_ON; + led_config.green_mode = LED_ON; + eeconfig_update_user(led_config.raw); + eeconfig_update_user(led_config.raw); +} + +// When LOWER and RAISE are held together, go to the FUNCTION layer +uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FUNCTION); } + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _LOWER: + writePinHigh(LED_RED); + break; + case _RAISE: + writePinHigh(LED_GREEN); + break; + default: + writePinLow(LED_GREEN); + writePinLow(LED_RED); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LED: + if (record->event.pressed) { + if (led_config.red_mode == LED_ON && led_config.green_mode == LED_ON) { + led_config.red_mode = LED_OFF; + led_config.green_mode = LED_OFF; + } else if (led_config.red_mode == LED_OFF && led_config.green_mode == LED_OFF) { + led_config.red_mode = LED_ON; + led_config.green_mode = LED_ON; + } + } + eeconfig_update_user(led_config.raw); + return false; + break; + } + return true; +} diff --git a/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md new file mode 100644 index 0000000000..bd09965b55 --- /dev/null +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/readme.md @@ -0,0 +1,5 @@ +![Plaid Layout Image](https://i.imgur.com/WnVnwEG.png) + +# The Half Deaf Chef Plaid Layout + +Opinionated keymaps optimized for programmers. The Left and Right Shift tap as parenthesis and the bracket keys are to either side of the layer keys (LOWER, RAISE). A 'right-side' up number pad in a layer with a complementary 'symbol' pad on the opposite side. An additional layer is provided to switch to virtual console on Linux based systems running xorg. These changes are propagated among all the layouts. diff --git a/keyboards/dm9records/plaid/plaid.c b/keyboards/dm9records/plaid/plaid.c new file mode 100644 index 0000000000..28f56d7f93 --- /dev/null +++ b/keyboards/dm9records/plaid/plaid.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ +#include "plaid.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/dm9records/plaid/plaid.h b/keyboards/dm9records/plaid/plaid.h new file mode 100644 index 0000000000..d791cf7c00 --- /dev/null +++ b/keyboards/dm9records/plaid/plaid.h @@ -0,0 +1,68 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_plaid_mit( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_plaid_grid( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + LAYOUT_plaid_grid( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + ) + +#define KEYMAP LAYOUT_plaid_grid +#define LAYOUT_ortho_4x12 LAYOUT_plaid_grid +#define LAYOUT_planck_mit LAYOUT_plaid_mit +#define LAYOUT_kc_ortho_4x12 KC_KEYMAP +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP + +#define LED_RED C5 +#define LED_GREEN C4 diff --git a/keyboards/dm9records/plaid/readme.md b/keyboards/dm9records/plaid/readme.md new file mode 100644 index 0000000000..79621deec8 --- /dev/null +++ b/keyboards/dm9records/plaid/readme.md @@ -0,0 +1,23 @@ +# plaid // Through Hole + +![plaid](https://i.imgur.com/tTi9yR9h.jpg) + +12x4 ortholinear keyboard with only through hole components. + +Keyboard Maintainer: [hsgw](https://github.com/hsgw) +Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/plaid) +Hardware Availability: Group buy in r/mk + +Make example for this keyboard (after setting up your build environment): + make dm9records/plaid:default + +Flashing example for this keyboard: + + make dm9records/plaid:default:flash + +## Bootloader +use usbasploader in my repository. +https://github.com/hsgw/USBaspLoader/tree/plaid + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dm9records/plaid/rules.mk b/keyboards/dm9records/plaid/rules.mk new file mode 100644 index 0000000000..7c4112c9aa --- /dev/null +++ b/keyboards/dm9records/plaid/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/dm9records/tartan/config.h b/keyboards/dm9records/tartan/config.h new file mode 100644 index 0000000000..ee4393e53a --- /dev/null +++ b/keyboards/dm9records/tartan/config.h @@ -0,0 +1,246 @@ +/* +Copyright 2019 Takuya Urakawa (dm9records.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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +#define VENDOR_ID 0x16c0 +#define PRODUCT_ID 0x27db +#define DEVICE_VER 0x0001 +#define MANUFACTURER dm9records +#define PRODUCT Tartan +#define DESCRIPTION 60% keyboard with through hole components + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B4, B5, B3, B0, C0 } +#define MATRIX_COL_PINS { D7, D6, D5, D4, B1, B2, C1, C2, C3, C5, D1, D0, C4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * 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 */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_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_HELP H +//#define MAGIC_KEY_HELP_ALT 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 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#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 B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#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 + +/* + * 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 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/dm9records/tartan/info.json b/keyboards/dm9records/tartan/info.json new file mode 100644 index 0000000000..ff0ddfdf9d --- /dev/null +++ b/keyboards/dm9records/tartan/info.json @@ -0,0 +1,34 @@ +{ + "keyboard_name": "Tartan # Through Hole", + "keyboard_folder": "dm9records/tartan", + "url": "https://github.com/hsgw/tartan", + "maintainer": "hsgw(Takuya Urakawa)", + "width": 13, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs": { + "key_count": 62, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":1}, {"label":"", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"BS", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso_split_bs": { + "key_count": 63, + "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "key_count": 64, + "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/dm9records/tartan/keymaps/default/keymap.c b/keyboards/dm9records/tartan/keymaps/default/keymap.c new file mode 100644 index 0000000000..6224b4e615 --- /dev/null +++ b/keyboards/dm9records/tartan/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL + ), + [1] = LAYOUT_60_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/dm9records/tartan/keymaps/default/readme.md b/keyboards/dm9records/tartan/keymaps/default/readme.md new file mode 100644 index 0000000000..c829d53103 --- /dev/null +++ b/keyboards/dm9records/tartan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Tartan diff --git a/keyboards/dm9records/tartan/readme.md b/keyboards/dm9records/tartan/readme.md new file mode 100644 index 0000000000..b8439ed229 --- /dev/null +++ b/keyboards/dm9records/tartan/readme.md @@ -0,0 +1,25 @@ +# Tartan # Through Hole + +![tartan](https://i.imgur.com/1qSrVcs.jpg) + +A 60% keyboard with only through hole components. + +* Keyboard Maintainer: [hsgw](https://github.com/hsgw) +* Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/tartan) +* Hardware Availability: https://5z6p.com/products/tartan/ + +Make example for this keyboard (after setting up your build environment): + + make dm9records/tartan:default + +Flash firmware: + + // In bootloader mode + make dm9records/tartan:default:flash + +## Bootloader +use usbasploader in my repository. +https://github.com/hsgw/USBaspLoader/tree/plaid + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dm9records/tartan/rules.mk b/keyboards/dm9records/tartan/rules.mk new file mode 100644 index 0000000000..8113001918 --- /dev/null +++ b/keyboards/dm9records/tartan/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = USBasp + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift +LAYOUTS_HAS_RGB = no diff --git a/keyboards/dm9records/tartan/tartan.c b/keyboards/dm9records/tartan/tartan.c new file mode 100644 index 0000000000..b702633cc9 --- /dev/null +++ b/keyboards/dm9records/tartan/tartan.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ +#include "tartan.h" diff --git a/keyboards/dm9records/tartan/tartan.h b/keyboards/dm9records/tartan/tartan.h new file mode 100644 index 0000000000..e990088894 --- /dev/null +++ b/keyboards/dm9records/tartan/tartan.h @@ -0,0 +1,111 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, KC_NO, k4b, KC_NO } \ +} + +#define LAYOUT_60_ansi_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, KC_NO } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k4c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, k4c } \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, KC_NO, k4b, KC_NO } \ +} + +#define LAYOUT_60_iso_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, KC_NO } \ +} + +#define LAYOUT_60_iso_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k4c, \ + k40, k41, k42, k43, k44, k45, k46, k47 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, k4c } \ +} + +#define LAYOUT_all LAYOUT_60_iso_split_bs_rshift diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index 7f7f20ed3b..078131da7c 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk @@ -23,7 +23,7 @@ COMMAND_ENABLE = yes # 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 = yes # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/ergodox_stm32/keymaps/default/keymap.c b/keyboards/ergodox_stm32/keymaps/default/keymap.c index dcf8d15b7b..04a12962e3 100644 --- a/keyboards/ergodox_stm32/keymaps/default/keymap.c +++ b/keyboards/ergodox_stm32/keymaps/default/keymap.c @@ -9,10 +9,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = TT(1) -}; - layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = get_highest_layer(state); diff --git a/keyboards/ergoinu/config.h b/keyboards/ergoinu/config.h deleted file mode 100644 index dfc8a52930..0000000000 --- a/keyboards/ergoinu/config.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2018 Takuya Urakawa - -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 . -*/ - -#pragma once - -#include "config_common.h" -#include - -/* USB Device descriptor parameter - VID & PID are lisenced from microchip sublisence program, Don't use other project! */ -#define VENDOR_ID 0x04D8 -#define PRODUCT_ID 0xEE60 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Dm9Records -#define PRODUCT ergoinu -#define DESCRIPTION An (Not Portable But Small) Ergonomic split keyboard - -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 - -#define USE_SERIAL - -/* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 10 -#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2 } - -// wiring of each half -#define MATRIX_COLS 7 -#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, F5, F4 } - -/* 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 DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* ws2812 RGB LED */ -#define RGB_DI_PIN B6 - -#define RGBLED_NUM 7 - -#ifndef IOS_DEVICE_ENABLE - #if RGBLED_NUM <= 7 - #define RGBLIGHT_LIMIT_VAL 255 - #define RGBLIGHT_VAL_STEP 17 - #endif -#else - #define RGBLIGHT_LIMIT_VAL 90 - #define RGBLIGHT_VAL_STEP 4 -#endif - -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 - -#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) - #define USB_MAX_POWER_CONSUMPTION 500 -#else - // fix iPhone and iPad power adapter issue - // iOS device need lessthan 100 - #define USB_MAX_POWER_CONSUMPTION 100 -#endif - -/* - * 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 diff --git a/keyboards/ergoinu/ergoinu.c b/keyboards/ergoinu/ergoinu.c deleted file mode 100644 index b43ab17c8b..0000000000 --- a/keyboards/ergoinu/ergoinu.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "ergoinu.h" - -void matrix_init_kb(void) { - matrix_init_user(); -}; diff --git a/keyboards/ergoinu/ergoinu.h b/keyboards/ergoinu/ergoinu.h deleted file mode 100644 index 43249a8440..0000000000 --- a/keyboards/ergoinu/ergoinu.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2018 Takuya Urakawa - -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 . -*/ - -#pragma once - -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -#include "ws2812.h" -#endif - -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L07, L08, L09, L10, L11, L12, L13, R07, R08, R09, R10, R11, R12, R13, \ - L14, L15, L16, L17, L18, L19, R14, R15, R16, R17, R18, R19, R20, \ - L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, R27,\ - L26, L27, L28, L29, L30, R28, R29, R30, R31, R32 \ - ) { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L07, L08, L09, L10, L11, L12, L13 }, \ - { L14, KC_NO, L15, L16, L17, L18, L19 }, \ - { L20, KC_NO, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, L26, L27, L28, L29, L30}, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R13, R12, R11, R10, R09, R08, R07 }, \ - { R20, R19, R18, R17, R16, R15, R14 }, \ - { R27, R26, R25, R24, R23, R22, R21 }, \ - { KC_NO, KC_NO, R32, R31, R30, R29, R28 } \ - } - diff --git a/keyboards/ergoinu/info.json b/keyboards/ergoinu/info.json deleted file mode 100644 index 81f53fd255..0000000000 --- a/keyboards/ergoinu/info.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "keyboard_name": "Ergoinu", - "url": "", - "maintainer": "hsgw", - "width": 18, - "height": 5.4, - "layouts": { - "LAYOUT": { - "key_count": 64, - "layout": [ - { "x": 0, "y": 0.6, "label": "ESC" }, - { "x": 1, "y": 0.4, "label": "1" }, - { "x": 2, "y": 0.4, "label": "2" }, - { "x": 3, "y": 0.25, "label": "3" }, - { "x": 4, "y": 0, "label": "4" }, - { "x": 5, "y": 0.25, "label": "5" }, - { "x": 6, "y": 0.4, "label": "6" }, - - { "x": 11, "y": 0.4, "label": "7" }, - { "x": 12, "y": 0.25, "label": "8" }, - { "x": 13, "y": 0, "label": "9" }, - { "x": 14, "y": 0.25, "label": "0" }, - { "x": 15, "y": 0.4, "label": "MINUS" }, - { "x": 16, "y": 0.4, "label": "EQUAL" }, - { "x": 17, "y": 0.6, "label": "BACKSLASH" }, - - { "x": 0, "y": 1.6, "label": "DELETE" }, - { "x": 1, "y": 1.4, "label": "TAB" }, - { "x": 2, "y": 1.4, "label": "Q" }, - { "x": 3, "y": 1.25, "label": "W" }, - { "x": 4, "y": 1, "label": "E" }, - { "x": 5, "y": 1.25, "label": "R" }, - { "x": 6, "y": 1.4, "label": "T" }, - - { "x": 11, "y": 1.4, "label": "Y" }, - { "x": 12, "y": 1.25, "label": "U" }, - { "x": 13, "y": 1, "label": "I" }, - { "x": 14, "y": 1.25, "label": "O" }, - { "x": 15, "y": 1.4, "label": "P" }, - { "x": 16, "y": 1.4, "label": "LBRACKET" }, - { "x": 17, "y": 1.6, "label": "RBRACKET" }, - - { "x": 0.25, "y": 2.6, "w": 1.75, "label": "LCTRL" }, - { "x": 2, "y": 2.4, "label": "A" }, - { "x": 3, "y": 2.25, "label": "S" }, - { "x": 4, "y": 2, "label": "D" }, - { "x": 5, "y": 2.25, "label": "F" }, - { "x": 6, "y": 2.4, "label": "G" }, - - { "x": 11, "y": 2.4, "label": "H" }, - { "x": 12, "y": 2.25, "label": "J" }, - { "x": 13, "y": 2, "label": "K" }, - { "x": 14, "y": 2.25, "label": "L" }, - { "x": 15, "y": 2.4, "label": "SEMICOLON" }, - { "x": 16, "y": 2.4, "label": "QUOTE" }, - { "x": 17, "y": 2.6, "label": "GRAVE" }, - - { "x": 0.25, "y": 3.6, "w": 1.75, "label": "LSHIFT" }, - { "x": 2, "y": 3.4, "label": "Z" }, - { "x": 3, "y": 3.25, "label": "X" }, - { "x": 4, "y": 3, "label": "C" }, - { "x": 5, "y": 3.25, "label": "V" }, - { "x": 6, "y": 3.4, "label": "B" }, - - { "x": 11, "y": 3.4, "label": "N" }, - { "x": 12, "y": 3.25, "label": "M" }, - { "x": 13, "y": 3, "label": "COMMA" }, - { "x": 14, "y": 3.25, "label": "DOT" }, - { "x": 15, "y": 3.4, "label": "SLASH" }, - { "x": 16, "y": 3.4, "label": "RSHIFT" }, - { "x": 17, "y": 3.6, "label": "RSHIFT" }, - - { "x": 3, "y": 4.25, "label": "MO(META)" }, - { "x": 4, "y": 4, "label": "LALT" }, - { "x": 5, "y": 4.25, "label": "LGUI" }, - { "x": 6, "y": 4.4, "label": "ENT" }, - { "x": 7, "y": 4.4, "w": 1.5, "label": "SPACE" }, - - { "x": 9.5, "y": 4.4, "w": 1.5, "label": "ENTER" }, - { "x": 11, "y": 4.4, "label": "BACKSPACE" }, - { "x": 12, "y": 4.25, "label": "RGUI" }, - { "x": 13, "y": 4, "label": "RALT" }, - { "x": 14, "y": 4.25, "label": "MO(META)" } - ] - } - } -} diff --git a/keyboards/ergoinu/keymaps/default/config.h b/keyboards/ergoinu/keymaps/default/config.h deleted file mode 100644 index bb266f25e7..0000000000 --- a/keyboards/ergoinu/keymaps/default/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2018 Takuya Urakawa - -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 . -*/ - -#pragma once - -#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergoinu/keymaps/default/keymap.c b/keyboards/ergoinu/keymaps/default/keymap.c deleted file mode 100644 index 7f1be4796c..0000000000 --- a/keyboards/ergoinu/keymaps/default/keymap.c +++ /dev/null @@ -1,101 +0,0 @@ -#include QMK_KEYBOARD_H - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - -#define JA_CLON KC_QUOT // : and + -#define JA_AT KC_LBRC // @ and ` -#define JA_HAT KC_EQL // ^ and ~ -#define JA_ENUN KC_RO // \ and _ (EN mark and UNder score) -#define JA_ENVL KC_JYEN // \ and | (EN mark and Vertical Line) -#define JA_LBRC KC_RBRC // [ and { -#define JA_RBRC KC_BSLS // ] and } - -enum LAYER_NO { - BASE = 0, - META, - CONF -}; - -enum CUSTOM_KEYCODES { - RGB_RST = SAFE_RANGE, - RGB_TYPE, -}; - -// Fillers to make layering more clear -#define ______ KC_TRNS -#define XXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [BASE] = LAYOUT( \ - 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_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRV, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, \ - MO(META),KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_ENT, KC_BSPC, KC_RGUI, KC_RALT, MO(META) \ - ), - - [META] = LAYOUT( \ - MO(CONF),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_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, KC_SLCK, KC_PSCR, KC_HOME, KC_END, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PAUS, KC_PGUP, KC_UP, KC_PGDN, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_LEFT, KC_DOWN, KC_RGHT, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ \ - ), - [CONF] = LAYOUT( \ - ______, RGB_TYPE,RGB_MOD, RGB_VAI, RGB_HUI, RGB_HUI, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ - RGB_RST, RGB_TOG, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_HUD, 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 \ - ) -}; - -bool enableLEDTypeAnime = false; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case RGB_RST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - } - #endif - break; - case RGB_MOD: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - enableLEDTypeAnime = false; - rgblight_step(); - } - #endif - return false; - case RGB_TYPE: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(1); - enableLEDTypeAnime = !enableLEDTypeAnime; - } - #endif - return false; - default: - break; - } - #ifdef RGBLIGHT_ENABLE - if(enableLEDTypeAnime) { - rgblight_mode_noeeprom(1); - uint16_t hue = (rgblight_config.hue + 5) % 360; - rgblight_sethsv_noeeprom(hue, rgblight_config.sat, rgblight_config.val); - } - #endif - - return true; -} - -void matrix_init_user(void) { -} diff --git a/keyboards/ergoinu/keymaps/default/rules.mk b/keyboards/ergoinu/keymaps/default/rules.mk deleted file mode 100644 index b2eff12b04..0000000000 --- a/keyboards/ergoinu/keymaps/default/rules.mk +++ /dev/null @@ -1,29 +0,0 @@ - -# 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 -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# ergoinu configs -DISABLE_PROMICRO_LEDs = yes - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) diff --git a/keyboards/ergoinu/keymaps/default_jis/config.h b/keyboards/ergoinu/keymaps/default_jis/config.h deleted file mode 100644 index bb266f25e7..0000000000 --- a/keyboards/ergoinu/keymaps/default_jis/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert -Copyright 2018 Takuya Urakawa - -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 . -*/ - -#pragma once - -#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ergoinu/keymaps/default_jis/keymap.c b/keyboards/ergoinu/keymaps/default_jis/keymap.c deleted file mode 100644 index 3a1a88f47c..0000000000 --- a/keyboards/ergoinu/keymaps/default_jis/keymap.c +++ /dev/null @@ -1,101 +0,0 @@ -#include QMK_KEYBOARD_H - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - -#define JA_CLON KC_QUOT // : and + -#define JA_AT KC_LBRC // @ and ` -#define JA_HAT KC_EQL // ^ and ~ -#define JA_ENUN KC_RO // \ and _ (EN mark and UNder score) -#define JA_ENVL KC_JYEN // \ and | (EN mark and Vertical Line) -#define JA_LBRC KC_RBRC // [ and { -#define JA_RBRC KC_BSLS // ] and } - -enum LAYER_NO { - BASE = 0, - META, - CONF -}; - -enum CUSTOM_KEYCODES { - RGB_RST = SAFE_RANGE, - RGB_TYPE, -}; - -// Fillers to make layering more clear -#define ______ KC_TRNS -#define XXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [BASE] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JA_HAT, KC_JYEN, \ - KC_DEL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JA_AT, JA_LBRC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JA_CLON, JA_RBRC, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, \ - MO(META),KC_LALT, KC_ZKHK, KC_BSPC, KC_SPC, KC_ENT, KC_BSPC, KC_MHEN, KC_KANA, MO(META) \ - ), - - - [META] = LAYOUT( \ - MO(CONF),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_CAPS, ______, KC_UP, ______, ______, ______, ______, ______, ______, KC_SLCK, KC_PSCR, KC_HOME, KC_END, \ - ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, ______, ______, ______, KC_PAUS, KC_PGUP, KC_UP, KC_PGDN, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_LEFT, KC_DOWN, KC_RGHT, \ - ______, ______, KC_RGUI, KC_DEL, KC_ENT, ______, KC_DEL, KC_HENK, KC_LGUI, ______ \ - ), - [CONF] = LAYOUT( \ - ______, RGB_TYPE,RGB_MOD, RGB_VAI, RGB_HUI, RGB_HUI, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, XXXXXX, \ - RGB_RST, RGB_TOG, RGB_RMOD, RGB_VAD, RGB_HUD, RGB_HUD, 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 \ - ) -}; - -bool enableLEDTypeAnime = false; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case RGB_RST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - } - #endif - break; - case RGB_MOD: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - enableLEDTypeAnime = false; - rgblight_step(); - } - #endif - return false; - case RGB_TYPE: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(1); - enableLEDTypeAnime = !enableLEDTypeAnime; - } - #endif - return false; - default: - break; - } - #ifdef RGBLIGHT_ENABLE - if(enableLEDTypeAnime) { - rgblight_mode_noeeprom(1); - uint16_t hue = (rgblight_config.hue + 5) % 360; - rgblight_sethsv_noeeprom(hue, rgblight_config.sat, rgblight_config.val); - } - #endif - return true; -} - -void matrix_init_user(void) { -} diff --git a/keyboards/ergoinu/keymaps/default_jis/rules.mk b/keyboards/ergoinu/keymaps/default_jis/rules.mk deleted file mode 100644 index 92dde90ff1..0000000000 --- a/keyboards/ergoinu/keymaps/default_jis/rules.mk +++ /dev/null @@ -1,29 +0,0 @@ - -# 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 = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -# ergoinu configs -DISABLE_PROMICRO_LEDs = yes - -# Uncomment these for debugging -# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) -# $(info -- OPT_DEFS=$(OPT_DEFS)) -# $(info ) diff --git a/keyboards/ergoinu/matrix.c b/keyboards/ergoinu/matrix.c deleted file mode 100644 index 4a80cf9f24..0000000000 --- a/keyboards/ergoinu/matrix.c +++ /dev/null @@ -1,292 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "quantum.h" - -#include "serial.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -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); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - -void matrix_init(void) { - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - setPinOutput(B0); - setPinOutput(D5); - - #ifdef DISABLE_PROMICRO_LEDs - writePinHigh(B0); - writePinHigh(D5); - #endif - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - 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); - - 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 { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - int ret=serial_update_buffers(); - if (ret ) { -#ifndef DISABLE_PROMICRO_LEDs - if(ret==2) writePinLow(B0); -#endif - return 1; - } -#ifndef DISABLE_PROMICRO_LEDs - writePinHigh(B0); -#endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} - -uint8_t matrix_scan(void) { - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[offset+i] = serial_master_buffer[i]; - } - - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_master_buffer[i] = matrix[offset+i]; - } - - if( serial_transaction() ) { -#ifndef DISABLE_PROMICRO_LEDs - // turn on the indicator led when halves are disconnected - writePinLow(D5); -#endif - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { -#ifndef DISABLE_PROMICRO_LEDs - // turn off the indicator led on no error - writePinHigh(D5); -#endif - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - 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; -} - -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); - } -} - -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); -} diff --git a/keyboards/ergoinu/readme.md b/keyboards/ergoinu/readme.md deleted file mode 100644 index 06e0cf352e..0000000000 --- a/keyboards/ergoinu/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -ErgoInu -=== - -![ergoinu](https://i.imgur.com/4CCM8Vl.jpg) - -An (Not Portable But Small) Ergonomic Split Keyboard. - -Keyboard Maintainer: [hsgw](https://github.com/hsgw/) [twitter](https://twitter.com/hsgw) -Hardware Supported: Pro Micro -Hardware Availability & Repository: [https://github.com/hsgw/ergoinu](https://github.com/hsgw/ergoinu) - -Make example for this keyboard (after setting up your build environment): - - make ergoinu:default - - (or) - - make ergoinu:default_jis - - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/ergoinu/rules.mk b/keyboards/ergoinu/rules.mk deleted file mode 100644 index 6f5debe00c..0000000000 --- a/keyboards/ergoinu/rules.mk +++ /dev/null @@ -1,51 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# Build Options -# change 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 -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = no -USE_I2C = no # i2c is not supported -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes -SRC += matrix.c serial.c split_util.c - -DEFAULT_FOLDER = ergoinu - -# ergoinu configs -DISABLE_PROMICRO_LEDs = yes - -ifneq ($(strip $(ERGOINU)),) - ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) - DISABLE_PROMICRO_LEDs = no - endif -endif - -ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) - OPT_DEFS += -DDISABLE_PROMICRO_LEDs -endif diff --git a/keyboards/ergoinu/serial.c b/keyboards/ergoinu/serial.c deleted file mode 100644 index 5919415877..0000000000 --- a/keyboards/ergoinu/serial.c +++ /dev/null @@ -1,295 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifdef USE_SERIAL - -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// Serial pulse period in microseconds. -#define SELECT_SERIAL_SPEED 1 -#if SELECT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #define READ_WRITE_START_ADJUST 23 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 50 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#else -#error Illegal Serial Speed -#endif - - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH 1 -#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input_with_pullup(); - -#if SERIAL_PIN_MASK == _BV(PD0) - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -#elif SERIAL_PIN_MASK == _BV(PD2) - // Enable INT2 - EIMSK |= _BV(INT2); - // Trigger on falling edge of INT2 - EICRA &= ~(_BV(ISC20) | _BV(ISC21)); -#else - #error unknown SERIAL_PIN_MASK value -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static -void sync_recv(void) { - for (int i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - _delay_sub_us(READ_WRITE_START_ADJUST); - for ( uint8_t i = 0; i < 8; ++i) { - serial_delay_half1(); // read the middle of pulses - byte = (byte << 1) | serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 1<<7; - while( b ) { - if(data & b) { - serial_high(); - } else { - serial_low(); - } - b >>= 1; - serial_delay(); - } - serial_low(); // sync_send() / senc_recv() need raise edge -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - serial_output(); - - // slave send phase - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - sync_send(); - serial_write_byte(serial_slave_buffer[i]); - checksum += serial_slave_buffer[i]; - } - sync_send(); - serial_write_byte(checksum); - - // slave switch to input - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 - - // slave recive phase - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - sync_recv(); - serial_master_buffer[i] = serial_read_byte(); - checksum_computed += serial_master_buffer[i]; - } - sync_recv(); - uint8_t checksum_received = serial_read_byte(); - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } - - sync_recv(); //weit master output to high -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH); - - // wait for the slaves response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - sei(); - return 1; - } - - // master recive phase - // if the slave is present syncronize with it - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - sync_recv(); - serial_slave_buffer[i] = serial_read_byte(); - checksum_computed += serial_slave_buffer[i]; - } - sync_recv(); - uint8_t checksum_received = serial_read_byte(); - - if (checksum_computed != checksum_received) { - serial_output(); - serial_high(); - sei(); - return 2; - } - - // master switch to output - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); // 3 - serial_delay_half1(); //4 - - // master send phase - uint8_t checksum = 0; - - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - sync_send(); - serial_write_byte(serial_master_buffer[i]); - checksum += serial_master_buffer[i]; - } - sync_send(); - serial_write_byte(checksum); - - // always, release the line when not in use - sync_send(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/ergoinu/serial.h b/keyboards/ergoinu/serial.h deleted file mode 100644 index 67cf06ac6b..0000000000 --- a/keyboards/ergoinu/serial.h +++ /dev/null @@ -1,24 +0,0 @@ -#pragma once - -#include - -// //////////////////////////////////////////// -// Need Soft Serial defines in serial_config.h -// //////////////////////////////////////////// -// ex. -// #define SERIAL_PIN_DDR DDRD -// #define SERIAL_PIN_PORT PORTD -// #define SERIAL_PIN_INPUT PIND -// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2 -// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2 -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); diff --git a/keyboards/ergoinu/serial_config.h b/keyboards/ergoinu/serial_config.h deleted file mode 100644 index a16db684ca..0000000000 --- a/keyboards/ergoinu/serial_config.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -/* Soft Serial defines */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD2) -#define SERIAL_PIN_INTERRUPT INT2_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/ergoinu/split_util.c b/keyboards/ergoinu/split_util.c deleted file mode 100644 index 0cbc2c69c4..0000000000 --- a/keyboards/ergoinu/split_util.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#include "serial.h" - -volatile bool isLeftHand = true; - -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 - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - serial_master_init(); -} - -static void keyboard_slave_setup(void) { - serial_slave_init(); -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); diff --git a/keyboards/ergotravel/keymaps/ckofy/keymap.c b/keyboards/ergotravel/keymaps/ckofy/keymap.c index 691d4aa943..b9a2c140d8 100644 --- a/keyboards/ergotravel/keymaps/ckofy/keymap.c +++ b/keyboards/ergotravel/keymaps/ckofy/keymap.c @@ -18,17 +18,6 @@ enum custom_keycodes { ADJUST, }; -/* Fn keys */ - -enum { - - F_SFT = 0, - F_ALT, - F_CTRL, - F_NUMPAD -// F_LOWER, -// F_RAISE, -}; #define KC_ KC_TRNS #define KC_XXXX KC_NO @@ -57,8 +46,8 @@ enum { #define KC_UDO LCTL(KC_Z) #define KC_CUT LCTL(KC_X) #define KC_SVE LCTL(KC_S) -#define KC_OSH F(F_SFT) -#define KC_OCTL F(F_CTRL) +#define KC_OSH OSM(MOD_LSFT) +#define KC_OCTL OSM(MOD_LCTL) #define KC_NUMP TT(_NUMPAD) #define KC_SHESC MT(MOD_LSFT,KC_ESC) #define KC_SHENT MT(MOD_RSFT,KC_ENT) @@ -142,14 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) - ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) - ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) -}; - - - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case COLEMAK: diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c index d7d8316c66..770fe723b5 100644 --- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c @@ -65,9 +65,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FL] = LAYOUT( KC_GRAVE,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_DELETE, \ - KC_TRNS,F(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ + KC_TRNS,TG(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, \ KC_TRNS,KC_MUTE,KC__VOLDOWN,KC__VOLUP,KC_TRNS,KC_TRNS,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,F(3),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,TG(3),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,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_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), /* @@ -106,8 +106,6 @@ enum function_id { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(1), // Toggle Arrow Layer overlay - [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), diff --git a/keyboards/gh60/satan/keymaps/denolfe/keymap.c b/keyboards/gh60/satan/keymaps/denolfe/keymap.c index 98fcd9b989..a70c409fe8 100644 --- a/keyboards/gh60/satan/keymaps/denolfe/keymap.c +++ b/keyboards/gh60/satan/keymaps/denolfe/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_END, KC_MPRV, KC_MNXT, KC_MPLY, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_HOME, LCTL(KC_LEFT), LCTL(KC_END), LCTL(KC_RIGHT), KC_TRNS, RESET, \ - KC_TRNS, KC_TRNS, F(9), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_TRNS, KC_TRNS, LM(2, MOD_LSFT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), #endif [_SL] = LAYOUT_60_ansi( @@ -99,7 +99,6 @@ const uint16_t PROGMEM fn_actions[] = { [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), #endif - [9] = ACTION_LAYER_MODS(2, MOD_LSFT) }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c index 602bdd157b..94d9289cdc 100644 --- a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c +++ b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/keymap.c @@ -29,7 +29,6 @@ TRAN #define TT_SYM MO(_SYM) #define TT_MOV LT(_MOV,KC_BSPC) #define TT_NUM MO(_NUM) -#define SSFT ACTION_MODS_ONESHOT(MOD_LSFT) enum macro_keycodes { DHPASTE=1, diff --git a/keyboards/hhkb/ansi/ansi.c b/keyboards/hhkb/ansi/ansi.c new file mode 100644 index 0000000000..cefc4e0690 --- /dev/null +++ b/keyboards/hhkb/ansi/ansi.c @@ -0,0 +1 @@ +#include "ansi.h" \ No newline at end of file diff --git a/keyboards/hhkb/ansi/ansi.h b/keyboards/hhkb/ansi/ansi.h new file mode 100644 index 0000000000..28e8d2fef8 --- /dev/null +++ b/keyboards/hhkb/ansi/ansi.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ + K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ + K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ + K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ + K35, K36, K37, K57, K56) \ + \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, KC_NO }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, KC_NO }, \ + { K70, K71, K72, K73, K74, K75, K76, KC_NO } \ +} + +#define LAYOUT_60_hhkb LAYOUT diff --git a/keyboards/hhkb/ansi/config.h b/keyboards/hhkb/ansi/config.h new file mode 100644 index 0000000000..689fd55681 --- /dev/null +++ b/keyboards/hhkb/ansi/config.h @@ -0,0 +1,104 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4848 // HH = happy hacking +#define PRODUCT_ID 0x0001 // ANSI HHKB +#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 */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +#define TAPPING_TERM 200 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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 + +#ifdef HHKB_RN42_ENABLE +// rn42 support -- acquired from the tmk repo. This is almost certainly not +// integrated with qmk in the correct way. + +#define SUART_OUT_PORT PORTD +#define SUART_OUT_BIT 0 +#define SUART_IN_PIN PIND +#define SUART_IN_BIT 1 + +#ifdef __AVR_ATmega32U4__ + /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ + #define UCSR1D _SFR_MEM8(0xCB) + #define RTSEN 0 + #define CTSEN 1 + + #define SERIAL_UART_BAUD 115200 + #define SERIAL_UART_DATA UDR1 + #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) + #define SERIAL_UART_RXD_VECT USART1_RX_vect + #define SERIAL_UART_TXD_READY (UCSR1A&(1<>8); /* baud rate */ \ + UCSR1B |= (1< +#include +#include +#include +#include + + +// Timer resolution check +#if (1000000/TIMER_RAW_FREQ > 20) +# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." +#endif + + +/* + * HHKB Matrix I/O + * + * row: HC4051[A,B,C] selects scan row0-7 + * row-ext: [En0,En1] row extention for JP + * col: LS145[A,B,C,D] selects scan col0-7 and enable(D) + * key: on: 0/off: 1 + * prev: hysteresis control: assert(1) when previous key state is on + */ + + +#if defined(__AVR_ATmega32U4__) +/* + * For TMK HHKB alt controller(ATMega32U4) + * + * row: PB0-2 + * col: PB3-5,6 + * key: PD7(pull-uped) + * prev: PB7 + * power: PD4(L:off/H:on) + * row-ext: PC6,7 for HHKB JP(active low) + */ +static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); } +static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); } +static inline bool KEY_STATE(void) { return (PIND & (1<<7)); } +static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } +static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } +#ifdef HHKB_POWER_SAVING +static inline void KEY_POWER_ON(void) { + DDRB = 0xFF; PORTB = 0x40; // change pins output + DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on + /* Without this wait you will miss or get false key events. */ + _delay_ms(5); // wait for powering up +} +static inline void KEY_POWER_OFF(void) { + /* input with pull-up consumes less than without it when pin is open. */ + DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up + DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off +} +static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); } +#else +static inline void KEY_POWER_ON(void) {} +static inline void KEY_POWER_OFF(void) {} +static inline bool KEY_POWER_STATE(void) { return true; } +#endif +static inline void KEY_INIT(void) +{ + /* row,col,prev: output */ + DDRB = 0xFF; + PORTB = 0x40; // unable + /* key: input with pull-up */ + DDRD &= ~0x80; + PORTD |= 0x80; + + KEY_UNABLE(); + KEY_PREV_OFF(); + + KEY_POWER_OFF(); +} +static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) +{ + PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); + +} + + +#elif defined(__AVR_AT90USB1286__) +/* + * For Teensy++(AT90USB1286) + * + * HHKB pro HHKB pro2 + * row: PB0-2 (6-8) (5-7) + * col: PB3-5,6 (9-12) (8-11) + * key: PE6(pull-uped) (4) (3) + * prev: PE7 (5) (4) + * + * TODO: convert into 'staitc inline' function + */ +#define KEY_INIT() do { \ + DDRB |= 0x7F; \ + DDRE |= (1<<7); \ + DDRE &= ~(1<<6); \ + PORTE |= (1<<6); \ +} while (0) +#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \ + (((COL) & 0x07)<<3) | \ + ((ROW) & 0x07)) +#define KEY_ENABLE() (PORTB &= ~(1<<6)) +#define KEY_UNABLE() (PORTB |= (1<<6)) +#define KEY_STATE() (PINE & (1<<6)) +#define KEY_PREV_ON() (PORTE |= (1<<7)) +#define KEY_PREV_OFF() (PORTE &= ~(1<<7)) +#define KEY_POWER_ON() +#define KEY_POWER_OFF() +#define KEY_POWER_STATE() true + + +#else +# error "define code for matrix scan" +#endif + + +#if 0 +// For ATMega328P with V-USB +// +// #elif defined(__AVR_ATmega328P__) +// Ports for V-USB +// key: PB0(pull-uped) +// prev: PB1 +// row: PB2-4 +// col: PC0-2,3 +// power: PB5(Low:on/Hi-z:off) +#define KEY_INIT() do { \ + DDRB |= 0x3E; \ + DDRB &= ~(1<<0); \ + PORTB |= 1<<0; \ + DDRC |= 0x0F; \ + KEY_UNABLE(); \ + KEY_PREV_OFF(); \ +} while (0) +#define KEY_SELECT(ROW, COL) do { \ + PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \ + PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \ +} while (0) +#define KEY_ENABLE() (PORTC &= ~(1<<3)) +#define KEY_UNABLE() (PORTC |= (1<<3)) +#define KEY_STATE() (PINB & (1<<0)) +#define KEY_PREV_ON() (PORTB |= (1<<1)) +#define KEY_PREV_OFF() (PORTB &= ~(1<<1)) +// Power supply switching +#define KEY_POWER_ON() do { \ + KEY_INIT(); \ + PORTB &= ~(1<<5); \ + _delay_ms(1); \ +} while (0) +#define KEY_POWER_OFF() do { \ + DDRB &= ~0x3F; \ + PORTB &= ~0x3F; \ + DDRC &= ~0x0F; \ + PORTC &= ~0x0F; \ +} while (0) +#endif diff --git a/keyboards/hhkb/ansi/info.json b/keyboards/hhkb/ansi/info.json new file mode 100644 index 0000000000..a36f1d44c8 --- /dev/null +++ b/keyboards/hhkb/ansi/info.json @@ -0,0 +1,73 @@ +{ + "keyboard_name": "HHKB", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "!", "x": 1, "y": 0 }, + { "label": "@", "x": 2, "y": 0 }, + { "label": "#", "x": 3, "y": 0 }, + { "label": "$", "x": 4, "y": 0 }, + { "label": "%", "x": 5, "y": 0 }, + { "label": "^", "x": 6, "y": 0 }, + { "label": "&", "x": 7, "y": 0 }, + { "label": "*", "x": 8, "y": 0 }, + { "label": "(", "x": 9, "y": 0 }, + { "label": ")", "x": 10, "y": 0 }, + { "label": "_", "x": 11, "y": 0 }, + { "label": "+", "x": 12, "y": 0 }, + { "label": "|", "x": 13, "y": 0 }, + { "label": "~", "x": 14, "y": 0 }, + { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{", "x": 11.5, "y": 1 }, + { "label": "}", "x": 12.5, "y": 1 }, + { "label": "Delete", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ":", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Return", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "Fn", "x": 14, "y": 3 }, + { "label": "", "x": 1.5, "y": 4 }, + { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, + { "x": 4, "y": 4, "w": 6 }, + { "label": "", "x": 10, "y": 4, "w": 1.5 }, + { "label": "", "x": 11.5, "y": 4 } + ] + } + } +} diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/README.md b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md new file mode 100644 index 0000000000..4dff47a6e8 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/README.md @@ -0,0 +1,134 @@ +# QMK HHKB Keymap: blakedietz + + + + +This is my (Blake Dietz's) own take on a QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. A lot of the + functionality was inspired by the ergodox ez default layout. + +## Dependencies + +### macOS + +```bash +brew tap osx-cross/avr +brew install avr-libc +brew install dfu-programmer +``` + +### Windows/Linux + +[Build Environment Setup](https://github.com/jackhumbert/qmk_firmware/wiki#build-environment-setup) + +## Flashing + +You will need to make sure that you have something that you can use to press the button on the alternate controller in +order to put it into boot mode. + +From the hhkb directory run the following: + +```bash +make clean +make hhkb:blakedietz:dfu +``` + +Press the button on the alternate controller to put the board into boot mode. + +You'll see an output similar to the following: + +```bash +make hhkb:blakedietz:dfu + +Making hhkb with keymap blakedietz and target dfu + +avr-gcc (GCC) 6.2.0 +Copyright (C) 2016 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +Size before: + text data bss dec hex filename + 0 22162 0 22162 5692 hhkb_blakedietz.hex + +Compiling: keyboards/hhkb/keymaps/blakedietz/keymap.c [OK] +Compiling: ./tmk_core/common/command.c [OK] +Linking: .build/hhkb_blakedietz.elf [OK] +Creating load file for Flash: .build/hhkb_blakedietz.hex [OK] + +Size after: + text data bss dec hex filename + 0 22162 0 22162 5692 hhkb_blakedietz.hex + +dfu-programmer: no device present. +Error: Bootloader not found. Trying again in 5s. +dfu-programmer: no device present. +Error: Bootloader not found. Trying again in 5s. +Bootloader Version: 0x00 (0) +Erasing flash... Success +Checking memory from 0x0 to 0x6FFF... Empty. +Checking memory from 0x0 to 0x56FF... Empty. +0% 100% Programming 0x5700 bytes... +[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success +0% 100% Reading 0x7000 bytes... +[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success +Validating... Success +0x5700 bytes written into 0x7000 bytes memory (77.68%). +``` + +### Layers + +#### Default + +##### A more "standard" layout + +This layout places tilde in the standard location. Backspace is moved to the two upper-right-most keys and pipe +is put back where it belongs (where backspace is on the default hhkb2 keymapping). + +##### Hyper key + + + +This layout throws out the HHKB's control key in favor of a Hyper key. Ctrl is instead placed on the z and / keys and +can be activated with a long press. I find that this is far more ergonomic as it's less of a reach and it allows you to +alternate to either hand when you need to use `ctrl` as a modifier. + +The hyper key can be held for hyper and tapped for escape. You'll find that this is quite nice for vim. + +Enter is also a hyper key. This allows for symmetry between control and enter. Hold for hyper, tap for enter. + +##### Tap to Hold + +###### CTL, ALT, GUI + +Since the HHKB does not have three super/meta keys, these keys were moved to pinky, ring and middle finger for ctrl, alt/ + option and super respectively. This is closer to home row which I've found causes less strain. + +The Alt and Super keys are instead replaced with layer toggle keys to go to dev and mouse mode respectively. + +###### Space + +Hold space to switch to dev mode. This will put you on a layer to have vim like arrow functionality on h,j,k and l. Use +this in editors that don't have vim keybindings. + +### Dev + +The Dev layer can be activated holding space or hitting the HHKB's Alt key. This will put you in a mode +where all function keys are available and left, right, up and down are mapped to their vim equivalents. The function + keys are mapped in such a way that you can use them for debugging. Typically I map debugging functions in all IDEs to + the following for a seamless debugging experience (e.g. jumping from Intellij to chrome dev tools and back): + + - f1 -> step over + - f2 -> step into + - f3 -> step out + - f4 -> continue + - f5 -> set break point on current line + +### Media + +The media layer can be activated by pressing and holding the semi-colon. I've also placed the play and pause key on the +apostrophe key in the media layer. This allows you to easily roll your pinky from the media toggle (semi-colon) to the +play/pause key in one fluid motion. + +I've also tried to logically map next/previous track along with volume up/down vim behavior. In vim since middle finger +goes up on k and index finger goes down on j, next/prev track is k/j respectively. ,/m changes volume up/down +respectively while toggled to the media layer. diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/config.h b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h new file mode 100644 index 0000000000..e0d2bce0f1 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/config.h @@ -0,0 +1,24 @@ +// Based off of this section: +// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file +#ifndef CONFIG_BLAKEDIETZ_H +#define CONFIG_BLAKEDIETZ_H + +// Bring in original defaults +#include "../../config.h" + +// Define mousekey settings +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_TIME_TO_MAX 5 +#define MOUSEKEY_WHEEL_DELAY 0 + +// Set up tapdance functionality +//#define TAPPING_TOGGLE 1 +// TAPPING_TERM is set in config.h this defaults to 200 + +// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when +// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) +#define IGNORE_MOD_TAP_INTERRUPT + +#endif diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c new file mode 100644 index 0000000000..a9146a4a08 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/keymap.c @@ -0,0 +1,125 @@ +#include QMK_KEYBOARD_H + +// Layer names +#define BASE 0 +#define DEV 1 +#define MOUSE 2 +#define MEDIA 3 + +// Required for leader function. Measured in ms +// #define LEADER_TIMEOUT 300 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |Lead| + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | \ | + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | Esc/Hyper | A | S | D | F | G | H | J | K | L |;/Media| ' | Enter | | | + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + | Shift | Z/Ctl | X/Alt | C/Gui | V | B | N | M | ,/Gui | ./Alt | //Ctl | Shift | Dev | | | + |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| + TODO: Maybe add a photoshop layer for when I need to hold spacebar down. Maybe just make it a layer that you + |------+------+-----------------------+------+------| + | Dev |Mouse | ******* Space ******* | Dev |Mouse | + |------+------+-----------------------+------+------| + */ + + [BASE] = LAYOUT( // 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_BSPC, KC_LEAD, + 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, + ALL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MEDIA, KC_SCLN), KC_QUOT, ALL_T(KC_ENT), + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, KC_N, KC_M, GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, TG(DEV), + TG(DEV), TG(MOUSE), LT(DEV, KC_SPC), TG(MOUSE), TG(DEV)), + + /* Layer DEV: DEV mode (DEV Fn) + TODO: Add a cmd/tab function to the developer layer for quick switching between different applications when debugging + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | F1 | F2 | F3 | F4 | F5 | Left | Down | Up | Right | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [DEV] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Layer MOUSE: MOUSE mode (MOUSE Fn) + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [MOUSE] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Layer MEDIA: mode (Hold Semi-colon) + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | | | | | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | Previous | Next | | Play/Pause | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | | | | | | | | Volume Down | Volume Up | Mute | | | | | | + |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [MEDIA] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; + +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; +}; diff --git a/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk new file mode 100644 index 0000000000..7d97e7a524 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/blakedietz/rules.mk @@ -0,0 +1,3 @@ +TAP_DANCE_ENABLE = no +UNICODE_ENABLE = no +LEADER_ENABLE = yes diff --git a/keyboards/hhkb/ansi/keymaps/brett/config.h b/keyboards/hhkb/ansi/keymaps/brett/config.h new file mode 100644 index 0000000000..b9a61e10a7 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/brett/config.h @@ -0,0 +1,17 @@ +#pragma once + +// Define mousekey settings +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_TIME_TO_MAX 5 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define LSPO_KEY KC_9 +#define RSPC_KEY KC_0 +#define LSPO_MOD KC_LSHIFT +#define RSPC_MOD KC_RSHIFT + +// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when +// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/hhkb/ansi/keymaps/brett/keymap.c b/keyboards/hhkb/ansi/keymaps/brett/keymap.c new file mode 100644 index 0000000000..1201146b00 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/brett/keymap.c @@ -0,0 +1,119 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * Brettm12345 HHKB Layout + */ +#include QMK_KEYBOARD_H +#include "brett.h" + +enum layers { + BASE = 0, + HHKB = 1, + PROG = 2, + MOUSE = 3 +}; + +// Tap for tab hold for MOUSE +#define TAB_MOUSE LT(MOUSE, KC_TAB) + +// Tap for space hold for PROG +#define SPACE_PROG LT(PROG, KC_SPC) + +// Tap for ESC hold for CTRL +#define CTL_ESC CTL_T(KC_ESC) + +// Tab for ; hold for PROG +#define PROG_SCLN LT(PROG, KC_SCLN) + +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 | [ | ] | Backspace | * | + |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---| + | Control | A | S | D | F | G | H | J | K | L | ; | ' | Return | ****** | * | + |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---| + | LShift | Z | X | C | V | B | N | M | , | . | / | RShift | HHKB | ****** | * | + |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---| + + |------+------+----------------------------+------+------| + | LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt | + |------+------+----------------------------+------+------| + */ + + [BASE] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + TAB_MOUSE, 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, PROG_SCLN, KC_QUOT, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(HHKB), + KC_LALT, KC_LGUI, SPACE_PROG, KC_RGUI, KC_RALT), + + /* HHKB Level: Function Layer + |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| + | Flash | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| + | Caps | Calc | Mail | Media | Browser | My PC | Browser | u | i | o | Print | [ | ] | Backsp | * | + | | | | Player | Refresh | | Favorites | | | | Screen | | | | | + |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| + | Control | Prev | Next | Find | f | g | Browser | Browser | Browser | Browser | ; | ' | Exec | ****** | * | + | | | | | | | Back | Home | Search | Forward | | | | | | + |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| + | LShift | Vol+ | Vol- | Mute | Select | b | n | m | , | Again | Browser Search | RShift | HHKB | ****** | * | + |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| + + |------+------+----------------------+------+------| + | Menu | LGUI | ******* Play ******* | RGUI | Menu | + |------+------+----------------------+------+------| + */ + [HHKB] = LAYOUT( + FLASH, 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_CALC, KC_MAIL, KC_MSEL, KC_WREF, KC_MYCM, KC_WFAV, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_BSPC, + KC_TRNS, KC_MPRV, KC_MNXT, KC_FIND, KC_TRNS, KC_TRNS, KC_WBAK, KC_WHOM, KC_WSCH, KC_WFWD, KC_TRNS, KC_TRNS, KC_EXEC, + KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_SLCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AGIN, KC_WSCH, KC_TRNS, KC_TRNS, + KC_MENU, KC_TRNS, KC_MPLY, KC_TRNS, KC_MENU), + + + /* Programming Level: Symbols Layer + |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| + | Esc | TTY 1 | TTY 2 | TTY 3 | TTY 4 | TTY 5 | TTY 6 | TTY 7 | TTY 8 | TTY 9 | TTY 10 | TTY 11 | TTY 12 | \ | ` | + |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| + | Tab/Mouse | => | @ | >>= | =<< | ‖ | <> | <|> | <*> | <@> | |> | <$ | $> | Backsp | * | + |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| + | Toggle Mouse | -> | * | <$> | <#> | && | Left | Down | Up | Right | :: | ` | Return | ****** | * | + |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| + | LShift | z | x | c | v | b | n | m | <- | -> | <> | Shift | HHKB | ****** | * | + |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| + + |------+------+----------------------------+------+------| + | LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt | + |------+------+----------------------------+------+------| + */ + [PROG] = LAYOUT( + KC_GESC, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), LCA(KC_F6), LCA(KC_F7), LCA(KC_F8), LCA(KC_F9), LCA(KC_F10), LCA(KC_F11), LCA(KC_F12), KC_TRNS, KC_TRNS, + KC_TRNS, FAT_ARROW, KC_AT, BIND, BIND_FLIPPED, OR, CONCAT, ALT, APPLY, FLAP, PIPE, VOID_LEFT, VOID_RIGHT, KC_TRNS, + TG(MOUSE), SKINNY_ARROW, KC_ASTR, MAP, MAP_FLIPPED, AND, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, DOUBLE_COLON, KC_GRV, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, REVERSE_ARROW, SKINNY_ARROW, CONCAT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + + /* Mouse Level: Mouse Layer + |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| + | Esc | Speed 1 | Speed 2 | Speed 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| + | Mouse(Tab) | Q | Up | Button3 | Button4 | Button5 | Y | U | Button3 | Button4 | Button5 | [ | ] | Backsp | * | + |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| + | Control(Esc) | Left | Down | Right | Button1 | Button2 | SLeft | SDown | SUp | SRight | Button1 | Button2 | Control(Return) | ****** | * | + |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| + | LShift(() | Z | X | C | V | B | N | M | Button5 | Button4 | Button3 | RShift()) | HHKB | ****** | * | + |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| + + |---------+---------+----------------------------+---------+---------| + | LAlt([) | LGUI({) | ******* Space/Prog ******* | RGUI(}) | RAlt(]) | + |---------+---------+----------------------------+---------+---------| + */ + [MOUSE] = LAYOUT( + KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MS_U, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, + TG(MOUSE), KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN1, KC_BTN2, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; diff --git a/keyboards/hhkb/ansi/keymaps/brett/readme.md b/keyboards/hhkb/ansi/keymaps/brett/readme.md new file mode 100644 index 0000000000..fd07b155fb --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/brett/readme.md @@ -0,0 +1,13 @@ +# Generated Keymap Layout + +This layout was generated by the QMK API. You can find the JSON data used to +generate this keymap in the file layers.json. + +To make use of this file you will need follow the following steps: + +* Download or Clone QMK Firmware: +* Extract QMK Firmware to a location on your hard drive +* Copy this folder into %s +* You are now ready to compile or use your keymap with the source + +More information can be found in the QMK docs: \ No newline at end of file diff --git a/keyboards/hhkb/ansi/keymaps/brett/rules.mk b/keyboards/hhkb/ansi/keymaps/brett/rules.mk new file mode 100644 index 0000000000..88f57515f1 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/brett/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = yes +TAP_DANCE_ENABLE = no +LEADER_ENABLE = no +UNICODE_ENABLE = no diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/README.md b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md new file mode 100644 index 0000000000..c1c48e6093 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/README.md @@ -0,0 +1,23 @@ +# QMK Keyboard Firmware for HHKB + +## Modifications + +### HHKB Fn Layer + +Added some Media keys. + +### Utility Layer (SpaceFN) + +Hold `Space` for: + +- Vi-style direction keys. +- WASD-style mouse keys. +- Dynamic macro playback on `1` and `2`. +- Qwerty/Colemak/Dvorak layout selection on `-`, `=` and `\ ` + +### Dynamic Macros + +Hold `q` and press: + +- `1` or `2` to record macro 1 or 2. +- `s` to stop recording. diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/config.h b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h new file mode 100644 index 0000000000..c7b4c784c0 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h @@ -0,0 +1,20 @@ +#ifndef CONFIG_CINAECO_H +#define CONFIG_CINAECO_H + +#include "../../config.h" + +#undef MANUFACTURER +#undef PRODUCT +#undef DESCRIPTION +#define MANUFACTURER QMK +#define PRODUCT HHKB QMK cinaeco +#define DESCRIPTION HHKB on QMK Firmware with cinaeco keymap + +// Increase "Tap" detection window. Avoid missing 'q' or 'z' when typing slowly. +#undef TAPPING_TERM +#define TAPPING_TERM 230 + +// Uncomment to enable NKRO by default. May cause issues with KVM switches. +//#define FORCE_NKRO + +#endif diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c new file mode 100644 index 0000000000..c27e37d8a0 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/keymap.c @@ -0,0 +1,178 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * cinaeco's HHKB Layout + */ +#include QMK_KEYBOARD_H + +// Layers. +#define QWER 0 +#define COLE 1 +#define DVOR 2 +#define HHKB 3 +#define UTIL 4 +#define MREC 5 + +// Easier-to-read Layer Arrays. +#define ____ KC_TRNS + +enum hhkb_keycodes +{ + DYNAMIC_MACRO_RANGE = SAFE_RANGE, +}; + +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWER Layer: Qwerty Default + * + * ,--------------------------------------------------------------. + * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| + * |--------------------------------------------------------------| + * |Tab |Q/MREC| W| E| R| T| Y| U| I| O| P| [| ]|Backs| + * |--------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Ent/Ctrl| + * |--------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * `--------------------------------------------------------------' + * |Alt|Gui | Space/UTIL |Gui |Alt| + * `-------------------------------------------' + * + */ + + [QWER] = LAYOUT( + 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, LT(MREC, 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, CTL_T(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(HHKB), + KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), + + /* COLE Layer: Colemak + * + * ,--------------------------------------------------------------. + * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| + * |--------------------------------------------------------------| + * |Tab |Q/MREC| W| F| P| G| J| L| U| Y| ;| [| ]|Backs| + * |--------------------------------------------------------------| + * |Ctrl | A| R| S| T| D| H| N| E| I| O| '|Ent/Ctrl| + * |--------------------------------------------------------------| + * |Shift | Z| X| C| V| K| B| M| ,| .| /|Shift |Fn0| + * `--------------------------------------------------------------' + * |Alt|Gui | Space/UTIL |Gui |Alt| + * `-------------------------------------------' + * + */ + + [COLE] = LAYOUT( + 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, LT(MREC, KC_Q), KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, CTL_T(KC_ENT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_K, KC_B, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), + KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), + + /* DVOR Layer: Dvorak + * + * ,--------------------------------------------------------------. + * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| + * |--------------------------------------------------------------| + * |Tab |'/MREC| ,| .| P| Y| F| G| C| R| L| /| =|Backs| + * |--------------------------------------------------------------| + * |Ctrl | A| O| E| U| I| D| H| T| N| S| -|Ent/Ctrl| + * |--------------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift |Fn0| + * `--------------------------------------------------------------' + * |Alt|Gui | Space/UTIL |Gui |Alt| + * `-------------------------------------------' + * + */ + + [DVOR] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + KC_TAB, LT(MREC, 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_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, CTL_T(KC_ENT), + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), + KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), + + /* HHKB Layer: HHKB mode (HHKB Fn) + * + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps |PLA|PRV|NXT| | | | |Psc|Slk|Pus|Up | |Backs| + * |-----------------------------------------------------------| + * | |VoD|VoU|Mut|Ejc| | *| /|Hom|PgU|Lef|Rig|Enter | + * |-----------------------------------------------------------| + * | | | | | | | +| -|End|PgD|Dow| | | + * `-----------------------------------------------------------' + * | | | |STOP | | + * `-------------------------------------------' + */ + + [HHKB] = LAYOUT( + 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_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC, + ____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + ____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____, + ____, ____, ____, KC_MSTP, ____), + + /* UTIL Layer: Extra utilities + * + * ,-------------------------------------------------------------. + * |DFU|PLY1|PLY2| | | | | | | | |QWE|COL|DVO|DBG| + * |-------------------------------------------------------------| + * | |MLB |M-Up|MRB|MwU| |Hom|PgD|PgU|End| | | | | + * |-------------------------------------------------------------| + * | |M-Lt|M-Dn|M-R|MwD| |LEF|DOW|UP |RIG| | | | + * |-------------------------------------------------------------| + * | | | | | |SPC| | | | | | | | + * `-------------------------------------------------------------' + * | | | | | | + * `-------------------------------------------' + * + */ + + [UTIL] = LAYOUT( + RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG, + ____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, + ____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, + ____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____), + + /* MREC Layer: Record macros with `q` + * + * ,-------------------------------------------------------------. + * | |REC1|REC2| | | | | | | | | | | | | + * |-------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-------------------------------------------------------------| + * | | |RSTP| | | | | | | | | | | + * |-------------------------------------------------------------| + * | | | | | | | | | | | | | | + * `-------------------------------------------------------------' + * | | | | | | + * `-------------------------------------------' + * + */ + + [MREC] = LAYOUT( + ____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, + ____, ____, ____, ____, ____) + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + +// For Dynamic Macros. +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + if (!process_record_dynamic_macro(keycode, record)) + { + return false; + } + return true; +} diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk new file mode 100644 index 0000000000..a85669aa2f --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk @@ -0,0 +1,20 @@ +# cinaeco's HHKB firmware + +# 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. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c new file mode 100644 index 0000000000..e230a87fb2 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/dbroqua/keymap.c @@ -0,0 +1,89 @@ +/* + * dbroqua HHKB Layout + */ +#include QMK_KEYBOARD_H + +enum planck_layers { + _DEFAULT, + _ALTERNATE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE layer: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | + * +-----------------------------------------------------------------------------------------+ + * | Alt | Gui | Space | Gui |RCtrl| + * `----------------------------------------------------------------´ + */ + [_DEFAULT] = LAYOUT( + 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, MO(_FN), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RCTL), + /* Alternamte layer: swap alt/gui + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | + * +-----------------------------------------------------------------------------------------+ + * | Gui | Alt | Space | AltGr |RCtrl| + * `----------------------------------------------------------------´ + */ + [_ALTERNATE] = LAYOUT( + 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, MO(_FN), + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RCTL), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * |-----------------------------------------------------------------------------------------+ + * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute|Eject| | * | / | Home| PgUp| Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | | + * +-----------------------------------------------------------------------------------------+ + * | | | Adjust | Stop | | + * `----------------------------------------------------------------´ + */ + [_FN] = LAYOUT( + 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_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + DF(_DEFAULT), DF(_ALTERNATE), KC_TRNS, KC_MSTP, KC_TRNS)}; + +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; +}; diff --git a/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md new file mode 100644 index 0000000000..3b8950fee0 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/dbroqua/readme.md @@ -0,0 +1,26 @@ +# Dbroqua Layout + +* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01 + +## Switch layout + +Default bottom layer: + +* LALT / LGUI / SPACE / RGUI / RCTRL + +Alternate bottom layer: + +* LGUI / LALT / SPACE / RALT / RCTRL + +To switch from default to alternate (or alternate to default) simple press FN + (LALT/LGUI). + + +## Media keys : + +* fn + a = vol_dn +* fn + s = vol_up +* fn + d = mute +* fn + z = previous song +* fn + x = play/pause +* fn + c = next song +* fn + (RGUI/RALT) = stop diff --git a/keyboards/hhkb/ansi/keymaps/default/keymap.c b/keyboards/hhkb/ansi/keymaps/default/keymap.c new file mode 100644 index 0000000000..c63ef6a579 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define HHKB 1 + +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] = LAYOUT( // default layer + 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, MO(HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, 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] = LAYOUT( + 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)}; diff --git a/keyboards/hhkb/ansi/keymaps/eric/keymap.c b/keyboards/hhkb/ansi/keymaps/eric/keymap.c new file mode 100644 index 0000000000..bf788b2ffd --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/eric/keymap.c @@ -0,0 +1,73 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define HHKB 1 + +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] = LAYOUT( // default layer + 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, MO(HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), + + /* Layer HHKB: HHKB mode (HHKB Fn) + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | PgU | Up | PgD | Hm | & | ~ | | | | Psc | Up | Del | Backs | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | Lef | Dow | Rig | En | * | | | PgU | Hom | Lef | Rig | Enter | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | _ | + | ( | ) | | | | | PgD | End | Dow | | | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [HHKB] = LAYOUT( + 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_F12, KC_INS, KC_DEL, + KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; + +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; +}; diff --git a/keyboards/hhkb/ansi/keymaps/krusli/config.h b/keyboards/hhkb/ansi/keymaps/krusli/config.h new file mode 100644 index 0000000000..af2fb9d8a5 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/krusli/config.h @@ -0,0 +1 @@ +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/hhkb/ansi/keymaps/krusli/keymap.c b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c new file mode 100644 index 0000000000..af6102f108 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/krusli/keymap.c @@ -0,0 +1,75 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define HHKB 1 + +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] = LAYOUT( // default layer + 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, MO(HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, 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] = LAYOUT( + 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)}; + +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; +}; diff --git a/keyboards/hhkb/ansi/keymaps/lxol/keymap.c b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c new file mode 100644 index 0000000000..462a980471 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/lxol/keymap.c @@ -0,0 +1,200 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * lxol HHKB Layout + */ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define WIN 1 +#define HHKB 2 +#define RGUILEV 3 +#define LGUILEV 4 +#define RALTLEV 5 +#define LALTLEV 6 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0: 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 | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Contro | A | S | D | F | G | H | J | K | L | ; | ' | RCtl/Ent | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + + |------+------+-------+------+------| + | LAlt | LGUI | Space | RGUI | RAlt | + |------+------+-------+------+------| + */ + + [BASE] = LAYOUT( // layer 0 : default + + 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, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, 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(HHKB), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), + + /* Layer 1: 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] = LAYOUT( + 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), + + /* Layer LGUI: All keys with RGUI modifier + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + + |------+------+-------+------+------| + | LAlt | LGUI | Space | RGUI | RAlt | + |------+------+-------+------+------| + */ + + [RGUILEV] = LAYOUT( // Right GUI layer by KC_L + + RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV), + RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC), + RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT), + RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS, + KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), + + /* Layer LGUI: All keys with LGUI modifier + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + + |------+------+-------+------+------| + | LAlt | LGUI | Space | LGUI | RAlt | + |------+------+-------+------+------| + */ + + [LGUILEV] = LAYOUT( // Right GUI layer by KC_L + + LGUI(KC_ESC), LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV), + LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC), + LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), MT(MOD_RCTL, KC_ENT), + KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS, + KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), + + /* Layer LALT: All keys with RALT modifier + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + + |------+------+-------+------+------| + | LAlt | LGUI | Space | RGUI | RAlt | + |------+------+-------+------+------| + */ + + [RALTLEV] = LAYOUT( // Right ALT layer by KC_L + + RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV), + RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC), + RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), MT(MOD_RCTL, KC_ENT), + RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS, + KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), + + /* Layer LALT: All keys with LALT modifier + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| + + |------+------+-------+------+------| + | LAlt | LGUI | Space | LGUI | RAlt | + |------+------+-------+------+------| + */ + + [LALTLEV] = LAYOUT( // Right ALT layer by KC_L + + LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV), + LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC), + LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), MT(MOD_RCTL, KC_ENT), + KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS, + KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), + + /* Layer WIN: Win layer + |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| + | Contro | A | S | D | F | G | H | J | K | L | ; | ' | RCtl/Ent | | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| + | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| + + |------+------+-------+------+------| + | LGui | LAlt | Space | RGui | Ralt | + |------+------+-------+------+------| + */ + + [WIN] = LAYOUT( // BASE level with swapped GUI/ALT + + 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, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, MT(MOD_RCTL, 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(HHKB), + KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; + +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; +}; diff --git a/keyboards/hhkb/ansi/keymaps/mjt/config.h b/keyboards/hhkb/ansi/keymaps/mjt/config.h new file mode 100644 index 0000000000..3b8f2e676c --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/mjt/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#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 + +/* + * 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 diff --git a/keyboards/hhkb/ansi/keymaps/mjt/keymap.c b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c new file mode 100644 index 0000000000..b62676edd9 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/mjt/keymap.c @@ -0,0 +1,112 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_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, +}; + + +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] = LAYOUT( // 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] = LAYOUT( + 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] = LAYOUT( + 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] = LAYOUT( + 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 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_dynamic_macro(macro_kc, record)) + { + return false; + } + + return true; +} diff --git a/keyboards/hhkb/ansi/keymaps/mjt/readme.md b/keyboards/hhkb/ansi/keymaps/mjt/readme.md new file mode 100644 index 0000000000..ff575ce247 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/mjt/readme.md @@ -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. diff --git a/keyboards/hhkb/ansi/keymaps/mjt/rules.mk b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk new file mode 100644 index 0000000000..9e6797ed30 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/mjt/rules.mk @@ -0,0 +1 @@ +DYNAMIC_MACRO_ENABLE = yes diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md new file mode 100644 index 0000000000..15b87c498d --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/README.md @@ -0,0 +1,36 @@ + # QMK HHKB Keymap: schaeferdev + +This is my QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. + + +## Movement Layer + +The main difference from the Default layer is the introduction of a Movement layer than can be used by holding the right command button. This layer enables to move the mouse and scroll using Page up and Page down. Additionally it allows to use Arrow-keys in VIM-like fashion on hjkl. + +I prefer this movement to the default HHKB FN layer as it allows all my fingers to remain on the home row. + +## Minor Changes + +- swapped Y and Z (as I am German and used to the different order). +- changed position of Delete Key +- both ` and ~ + + +## Setup (for macOS) +```bash +brew tap osx-cross/avr +brew install avr-gcc +brew install dfu-programmer +``` + + +## Flashing + +```bash +make clean +make hhkb:schaeferdev:dfu +``` + + +## Troubleshooting +For some reason I ran into the issue that my CMD key no longer recognized. I am not entirely sure what caused this but the problem occured regardless of the layout I flashed (was also broken for the default hhkb layout). I was able to fix this issue by resetting EEPROM of the keyboard. The easiest way to do this is probably to use the QMK Toolbox. diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h new file mode 100644 index 0000000000..b3c799bb82 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/config.h @@ -0,0 +1,9 @@ +// Based off of this section: +// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file +#pragma once + +// Define mousekey settings +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 4 +#define MOUSEKEY_MAX_SPEED 1 +#define MOUSEKEY_TIME_TO_MAX 70 \ No newline at end of file diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c new file mode 100644 index 0000000000..ea6da450cf --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/keymap.c @@ -0,0 +1,76 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define HHKB 1 +#define MOVEMENT 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backs |Backs| + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + |Ctrl/ESC| A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + |------+------+-----------------------+------+------| + | LAlt | LGUI | ******* Space ******* | MOUSE| RAlt | + |------+------+-----------------------+------+------| + */ + + [BASE] = LAYOUT( // default layer + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + 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, KC_ENT, + KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), + KC_LALT, KC_LCMD, /* */ KC_SPC, /* */ MO(MOVEMENT), KC_RALT), + + /* Layer HHKB: HHKB mode (HHKB Fn) + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | DEL | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | | | | | | + | - | End | PgD | Dow | | | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [HHKB] = LAYOUT( + 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_DEL, 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), + + /* Layer MOUSE: MOUSE mode (MOUSE Fn) + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | `~ |ACC1 |ACC2 |ACC3 | | | | | | | | | | DEL | DEL | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | |MBTN2| | up | | PgU| | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | |MBTN1|right|down |left| PgD| <- | down arrow | up arrow | -> | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | |MBTN3| | | | | | ~ (N) | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [MOVEMENT] = LAYOUT( + KC_GRV, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN2, KC_TRNS, KC_MS_U, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; \ No newline at end of file diff --git a/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk new file mode 100644 index 0000000000..35591533cc --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/schaeferdev/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes \ No newline at end of file diff --git a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c new file mode 100644 index 0000000000..a15f5e5e0b --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.c @@ -0,0 +1,143 @@ +#include "quantum.h" +#include "command.h" +#include "action_pseudo_lut.h" + +static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE]; + +/* + * Pseudo layout action. + * This action converts a keycode in order to output the character according to the keymap you specified + * still your keyboard layout recognized wrongly on your OS. + * Memo: Using other layer keymap to get keycode + */ +void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) { + uint8_t prev_shift; + uint16_t keycode; + uint16_t pseudo_keycode; + + /* get keycode from keymap you specified */ + keycode = keymap_key_to_keycode(base_keymap_id, record->event.key); + + prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); + + if (record->event.pressed) { + /* when magic commands entered, keycode does not converted */ + if (IS_COMMAND()) { + if (prev_shift) { + add_shift_bit(keycode); + } + register_code(keycode); + return; + } + + if (prev_shift) { + pseudo_keycode = convert_keycode(keymap, keycode, true); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + add_shift_bit(keycode); + + if (IS_LSFT(pseudo_keycode)) { + register_code(QK_LSFT ^ pseudo_keycode); + } else { + /* delete shift mod temporarily */ + del_mods(prev_shift); + send_keyboard_report(); + register_code(pseudo_keycode); + add_mods(prev_shift); + send_keyboard_report(); + } + } else { + pseudo_keycode = convert_keycode(keymap, keycode, false); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + + if (IS_LSFT(pseudo_keycode)) { + add_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + register_code(QK_LSFT ^ pseudo_keycode); + /* on Windows, prevent key repeat to avoid unintended output */ + unregister_code(QK_LSFT ^ pseudo_keycode); + del_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + } else { + register_code(pseudo_keycode); + } + } + } else { + if (get_shift_bit(keycode)) { + del_shift_bit(keycode); + pseudo_keycode = convert_keycode(keymap, keycode, true); + } else { + pseudo_keycode = convert_keycode(keymap, keycode, false); + } + dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode); + + if (IS_LSFT(pseudo_keycode)) { + unregister_code(QK_LSFT ^ pseudo_keycode); + } else { + unregister_code(pseudo_keycode); + } + } +} + +uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded) +{ + uint16_t pseudo_keycode; + + switch (keycode) { + case KC_A ... KC_CAPSLOCK: +#if defined(__AVR__) + if (shift_modded) { + pseudo_keycode = pgm_read_word(&keymap[keycode][1]); + } else { + pseudo_keycode = pgm_read_word(&keymap[keycode][0]); + } +#else + if (shift_modded) { + pseudo_keycode = keymap[keycode][1]; + } else { + pseudo_keycode = keymap[keycode][0]; + } +#endif + /* if undefined, use got keycode as it is */ + if (pseudo_keycode == 0x00) { + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + } + break; + default: + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + break; + } + return pseudo_keycode; +} + +uint8_t get_shift_bit(uint16_t keycode) { + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7)); + } else { + dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode); + return 0; + } +} + +void add_shift_bit(uint16_t keycode) { + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7)); + } else { + dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode); + } +} + +void del_shift_bit(uint16_t keycode) { + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7)); + } else { + dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode); + } +} diff --git a/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h new file mode 100644 index 0000000000..681252440f --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/action_pseudo_lut.h @@ -0,0 +1,15 @@ +#ifndef ACTION_PSEUDO_LUT_H +#define ACTION_PSEUDO_LUT_H + +#define SHIFT_BIT_SIZE (0xE7 / 8 + 1) // 1bit per 1key + +#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT) + +void action_pseudo_lut(keyrecord_t *, uint8_t, const uint16_t (*)[2]); +uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool); + +uint8_t get_shift_bit(uint16_t); +void add_shift_bit(uint16_t); +void del_shift_bit(uint16_t); + +#endif diff --git a/keyboards/hhkb/ansi/keymaps/shela/config.h b/keyboards/hhkb/ansi/keymaps/shela/config.h new file mode 100644 index 0000000000..08cc1fb46e --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_SHELA_H +#define CONFIG_SHELA_H + +#include "../../config.h" + +#undef TAPPING_TERM +#define TAPPING_TERM 230 + +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TIMEOUT 2000 + +#endif diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap.c b/keyboards/hhkb/ansi/keymaps/shela/keymap.c new file mode 100644 index 0000000000..3971e8f945 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap.c @@ -0,0 +1,186 @@ +/* + * HHKB Pro 2 US Layout for shela + */ +#include QMK_KEYBOARD_H +#include "keymap_jis2us.h" +#include "action_pseudo_lut.h" + +enum keymap_layout +{ + BASE = 0, + PSEUDO_US, + DVORAK, + MOUSE, + TENKEY, + HHKB, + SPACE_FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | BSp | + * |-----------------------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------| + * | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | + * `-----------------------------------------------------------------------------------------' + * |LAlt | LGui | SpaceFN | RGui |RAlt | + * `-----------------------------------------------------------------' + */ + [BASE] = + LAYOUT(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_GRV, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_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, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), + KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), + + /* Layer 1: Pseudo US Layout Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | BSp | + * |-----------------------------------------------------------------------------------------| + * | Tab | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | + * |-----------------------------------------------------------------------------------------| + * | Control | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Enter | + * |-----------------------------------------------------------------------------------------| + * | Shift | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Shift | Fn0 | + * `-----------------------------------------------------------------------------------------' + * |LGui | Fn3 | SpaceFN | Fn4 |RGui | + * `-----------------------------------------------------------------' + */ + [PSEUDO_US] = + LAYOUT(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC, + KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, + KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, + KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB), + KC_LGUI, MT(MOD_LALT, KC_MHEN), LT(SPACE_FN, KC_SPACE), MT(MOD_RALT, KC_KANA), KC_RGUI), + + /* Layer 2: Dvorak Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ` | BSp | + * |-----------------------------------------------------------------------------------------| + * | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | + * |-----------------------------------------------------------------------------------------| + * | Control | A | O | E | U | I | D | H | T | N | S | - | Enter | + * |-----------------------------------------------------------------------------------------| + * | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn0 | + * `-----------------------------------------------------------------------------------------' + * |LAlt | LGui | SpaceFN | RGui |RAlt | + * `-----------------------------------------------------------------' + */ + [DVORAK] = + LAYOUT(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, + KC_TAB, 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_BSLS, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), + KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), + + /* Layer 3: Mouse layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | + * |-----------------------------------------------------------------------------------------| + * | | | | | | | MwL | MwD | MwU | MwR | | | | | + * |-----------------------------------------------------------------------------------------| + * | | | | | | | McL | McD | McU | McR | | | | + * |-----------------------------------------------------------------------------------------| + * | | | | | | | Mb1 | Mb2 | Mb3 | | | | Fn0 | + * `-----------------------------------------------------------------------------------------' + * | | | Mb1 | | | + * `-----------------------------------------------------------------' + */ + [MOUSE] = + LAYOUT(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_NO, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_NO, KC_NO, KC_TRNS, MO(HHKB), + KC_TRNS, KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS), + + /* Layer 4: Tenkey layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | | | | | | | | | | / | * | - | | BSp | + * |-----------------------------------------------------------------------------------------| + * | | | | | | | | | | 7 | 8 | 9 | + | | + * |-----------------------------------------------------------------------------------------| + * | | | | | | | | | | 4 | 5 | 6 | Enter | + * |-----------------------------------------------------------------------------------------| + * | | | | | | | | | 1 | 2 | 3 | + | Fn0 | + * `-----------------------------------------------------------------------------------------' + * | | | SpaceFN | 0 | . | + * `-----------------------------------------------------------------' + */ + [TENKEY] = + LAYOUT(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, KC_BSPC, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_PENT, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, MO(HHKB), + KC_TRNS, KC_TRNS, LT(SPACE_FN, KC_SPACE), KC_KP_0, KC_PDOT), + + /* Layer 5: HHKB mode (HHKB Fn) + * ,-----------------------------------------------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + * |-----------------------------------------------------------------------------------------| + * | Caps | Fn5 | Fn6 | Fn7 | Fn8 | Fn9 | | | Psc | Slk | Pus | Up | | BSp | + * |-----------------------------------------------------------------------------------------| + * | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | + * |-----------------------------------------------------------------------------------------| + * | | | | | | | + | - | End | PgD | Dow | | | + * `-----------------------------------------------------------------------------------------' + * | | | | | | + * `-----------------------------------------------------------------' + */ + [HHKB] = + LAYOUT(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, DF(BASE), DF(PSEUDO_US), DF(MOUSE), DF(TENKEY), DF(DVORAK), 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), + + /* Layer 6: SpaceFN + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Del | + * |-----------------------------------------------------------------------------------------| + * | | Hom | Up | End | | | | Hom | End | | Psc | Slk | Pau | Ins | + * |-----------------------------------------------------------------------------------------| + * | | Lef | Dow | Rig | PgU | | Lef | Dow | Up | Rig | | | | + * |-----------------------------------------------------------------------------------------| + * | | | | PgD | | Spc | | PgD | PgU | | | | | + * `-----------------------------------------------------------------------------------------' + * | | | | | | + * `-----------------------------------------------------------------' + */ + [SPACE_FN] = + LAYOUT(KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, + KC_TRNS, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_PGDN, KC_NO, KC_SPC, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +/* + * user defined action function + */ +enum function_id +{ + PSEUDO_US_FUNCTION, +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + + switch (id) + { + case PSEUDO_US_FUNCTION: + action_pseudo_lut(record, BASE, keymap_jis2us); + break; + } +} + +/* + * Fn action definition + */ +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), +}; diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h new file mode 100644 index 0000000000..edc1e6d869 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h @@ -0,0 +1,32 @@ +#ifndef LAYOUT_JIS2US_H +#define LAYOUT_JIS2US_H + +/* keymap for convert from JIS to US */ +const uint16_t PROGMEM keymap_jis2us[][2] = { + [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ + + [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */ + [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */ + [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */ + [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */ + [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */ + [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */ + [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */ + [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */ + [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */ + [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */ + [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */ + [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */ + [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */ + [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */ + [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */ + [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */ + [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */ + [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */ + [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */ + [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */ + [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */ + [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */ +}; + +#endif diff --git a/keyboards/hhkb/ansi/keymaps/shela/readme.md b/keyboards/hhkb/ansi/keymaps/shela/readme.md new file mode 100644 index 0000000000..5a06a83632 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/readme.md @@ -0,0 +1,14 @@ +# Shela's HHKB Layout + +Layer 0: US Layout +Layer 1: Pseudo US Layout +Layer 2: Dvorak Layout +Layer 3: Mouse +Layer 4: Tenkey +Layer 5: HHKB Fn Key +Layer 6: SpaceFN + +## Pseudo US Layout + +On japanese Windows, HHKB Professional 2 US layout model recognized wrongly as JIS layout without changing OS settings. +But, you can use HHKB like a US layout keyboard as it is. diff --git a/keyboards/hhkb/ansi/keymaps/shela/rules.mk b/keyboards/hhkb/ansi/keymaps/shela/rules.mk new file mode 100644 index 0000000000..d0586bda68 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/shela/rules.mk @@ -0,0 +1 @@ +SRC += action_pseudo_lut.c diff --git a/keyboards/hhkb/ansi/keymaps/smt/keymap.c b/keyboards/hhkb/ansi/keymaps/smt/keymap.c new file mode 100644 index 0000000000..e1d8bae2e4 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/smt/keymap.c @@ -0,0 +1,172 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _HHKB 3 + +enum planck_keycodes +{ + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + HHKB +}; + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) +#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer QWERTY: Qwerty 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 | Fn | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + + |------+------+-----------------------+------+------| + | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | + |------+------+-----------------------+------+------| + */ + + [_QWERTY] = LAYOUT( // Qwerty layer + 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, MEH_GRV, + HPR_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, SFT_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(_HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), + + /* Layer COLEMAK: Colemak Layer + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | Backs | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Cont | A | R | S | T | D | H | N | E | I | O | ' | Ent | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Shift | Z | X | C | V | B | K | M | , | . | / | Shift | Fn | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + + |------+------+-----------------------+------+------| + | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | + |------+------+-----------------------+------+------| + */ + + [_COLEMAK] = LAYOUT( // Colemak layer + 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, MEH_GRV, + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, SFT_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), + + /* Layer DVORAK: Dvorak Layer + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | \ | ` | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | Backs | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Cont | A | O | E | U | I | D | H | T | N | S | - | Ent | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn | | | + |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| + + |------+------+-----------------------+------+------| + | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | + |------+------+-----------------------+------+------| + */ + + [_DVORAK] = LAYOUT( // Dvorak layer + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, MEH_GRV, + HPR_TAB, 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_BSPC, + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, SFT_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_HHKB), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, 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 | | | + |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----| + | | | Qwt | Cmk | Dvk | | + | - | End | PgD | Dow | | | | | + |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [_HHKB] = LAYOUT( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_BSPC, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______)}; + +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; +}; + +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; + } + return true; +} diff --git a/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c new file mode 100644 index 0000000000..68e23b45df --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +#define SPACE_FN LT(1, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( // default layer + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_RBRC, 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_NUHS, 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, KC_NUBS, + KC_LALT, KC_LGUI, SPACE_FN, KC_RGUI, KC_RALT), + + [1] = LAYOUT( + 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_INS, KC_DEL, + KC_CAPS, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______) +}; diff --git a/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md new file mode 100644 index 0000000000..0da9d96ee4 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/tobiasvl_iso/readme.md @@ -0,0 +1,22 @@ +# tobiasvl's ISO layout for HHKB + +This is my attempt to adapt my regular 60% Norwegian ISO layout to the physical HHKB layout, on the Happy Hacking Keyboard Pro 2 keyboard with the alternate QMK-compatible Hasu controller. + +## Base layer + +![HHKB ISO](https://i.imgur.com/8n4Kixw.png) + +The following changes have been made from standard HHKB: + +* The ] and \ keys are swapped so they're in the ISO locations, but a row higher. Whether or not this is a good idea depends heavily on what specific language layout you're using, but it makes sense for Norwegian, I think. +* The Fn key is replaced with the ISO key (ie. "non-US backslash"). It's gotta go somewhere! +* The spacebar doubles as space when tapped and Fn when held (ie. SpaceFN). This is a personal preference, but my second and more traditional choice would probably be to replace right GUI/Super with Fn. +* Grave Escape has been added (shift + Esc produces ~). + +## Function layer + +This is just how I personally prefer to set up my function layer, and doesn't have anything to do with ISO. You probably want to swap out this wholesale for your own function layer. + +* Navigation is moved: Arrow keys on WASD, Page Up and Page Down on QE, Home and End on the right (I have them to the left of the vertical Enter on ISO layouts). +* Grave Escape has been added (Fn + Esc produces \`). +* No media keys or anything. I don't use them. diff --git a/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore new file mode 100644 index 0000000000..4b8c99bfb8 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/tominabox1/.gitignore @@ -0,0 +1,3 @@ +*.h +matrix.c +rules.mk diff --git a/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c new file mode 100644 index 0000000000..d7aea97736 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/tominabox1/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H +#include "tominabox1.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, TD(TD_SFT_CPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2)), + + [1] = LAYOUT(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_INS, KC_DEL, KC_CAPS, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT(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, RESET, 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_TRNS), + + [3] = LAYOUT(KC_GESC, KC_EXLM, KC_EML, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, 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_TRNS, KC_NO, KC_TRNS) +}; diff --git a/keyboards/hhkb/ansi/keymaps/via/keymap.c b/keyboards/hhkb/ansi/keymaps/via/keymap.c new file mode 100644 index 0000000000..bdbd32898a --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_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 | + |------+------+-----------------------+------+------| + */ + + [0] = LAYOUT( // default layer + 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, MO(1), + KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, 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 | | | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + + */ + + [1] = LAYOUT( + 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 + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/hhkb/ansi/keymaps/via/rules.mk b/keyboards/hhkb/ansi/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..eebaede979 --- /dev/null +++ b/keyboards/hhkb/ansi/keymaps/xyverz/keymap.c @@ -0,0 +1,137 @@ +/* +Xyverz's HHKB layout + +Rev 0.1, initial commit. + +This is my initial keymap for the HHKB with Hasu's alternate controller. +The default layer is Dvorak, with Qwerty and Colemak being optional. +Will probably add to it later, but for now I'm going to enjoy this as it is. +*/ + +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _DV, + _CM, + _FL, +}; + +enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; + +#define FN_TAB LT(_FL, KC_TAB) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * _QW: Qwerty Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| + * |-----------------------------------------------------------| + * |Fn/Tb| Q| W| E| R| T| Y| U| I| O| P| [| ]|BkSpc| + * |-----------------------------------------------------------| + * |Control| A| S| D| F| G| H| J| K| L| ;| '| Return| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |Fn| + * |-----------------------------------------------------------| + * | |Alt |Gui | Space |Gui |Alt | | + * `-----------------------------------------------------------' + */ + /* Layer 0: Qwerty */ + [_QW] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , + FN_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, MO(_FL), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT + ), + + /* + * _DV: Dvorak Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \ |Del| + * |-----------------------------------------------------------| + * |Fn/Tb| '| ,| .| P| Y| F| G| C| R| L| /| =|BkSpc| + * |-----------------------------------------------------------| + * |Control| A| O| E| U| I| D| H| T| N| S| -| Return| + * |-----------------------------------------------------------| + * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift |Fn| + * |-----------------------------------------------------------| + * | |Alt |Gui | Space |Gui |Alt | | + * `-----------------------------------------------------------' + */ + /* Layer 1: Dvorak */ + [_DV] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + FN_TAB, 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_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_FL), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT + ), + + /* + * _CM: Colemak Layer + * ,-----------------------------------------------------------. + * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| + * |-----------------------------------------------------------| + * |Fn/Tb| Q| W| F| P| G| J| L| U| Y| ;| [| ]|BkSpc| + * |-----------------------------------------------------------| + * |Control| A| R| S| T| D| H| N| E| I| O| '| Return| + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift |Fn| + * |-----------------------------------------------------------| + * | |Alt |Gui | Space |Gui |Alt | | + * `-----------------------------------------------------------' + */ + /* Layer 2: Colemak */ + [_CM] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , + FN_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT + ), + + /* + * _FL: Function Layer + * ,-----------------------------------------------------------. + * |Grv |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RST| + * |-----------------------------------------------------------| + * | | |_QW|_DV|_CM| | |PgU| Up|PgD|PSc|SLk|Pau| | + * |-----------------------------------------------------------| + * | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | | + * |-----------------------------------------------------------| + * |CAPS | |Mut|VlD|VlU| |End| | | | | | | + * |-----------------------------------------------------------| + * | | | | Ins | | | | + * `-----------------------------------------------------------' + */ + /* Layer 3: Functions */ + [_FL] = LAYOUT( + 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, _______, RESET , + _______, _______, QWERTY, DVORAK, COLEMAK, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, + KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ), + +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DVORAK: + set_single_persistent_default_layer(_DV); + return false; + case QWERTY: + set_single_persistent_default_layer(_QW); + return false; + case COLEMAK: + set_single_persistent_default_layer(_CM); + return false; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c new file mode 100644 index 0000000000..f22e69f6b0 --- /dev/null +++ b/keyboards/hhkb/ansi/matrix.c @@ -0,0 +1,211 @@ +/* +Copyright 2011 Jun Wako + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "timer.h" +#include "matrix.h" +#include "hhkb_avr.h" +#include +#include "suspend.h" +#include "lufa.h" + + +// matrix power saving +#define MATRIX_POWER_SAVE 10000 +static uint32_t matrix_last_modified = 0; + +// matrix state buffer(1:on, 0:off) +static matrix_row_t *matrix; +static matrix_row_t *matrix_prev; +static matrix_row_t _matrix0[MATRIX_ROWS]; +static matrix_row_t _matrix1[MATRIX_ROWS]; + + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ +#ifdef DEBUG + debug_enable = true; + debug_keyboard = true; +#endif + + KEY_INIT(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; + for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; + matrix = _matrix0; + matrix_prev = _matrix1; +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +uint8_t matrix_scan(void) +{ + uint8_t *tmp; + + tmp = matrix_prev; + matrix_prev = matrix; + matrix = tmp; + + // power on + if (!KEY_POWER_STATE()) KEY_POWER_ON(); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + KEY_SELECT(row, col); + _delay_us(5); + + // Not sure this is needed. This just emulates HHKB controller's behaviour. + if (matrix_prev[row] & (1< 20/(1000000/TIMER_RAW_FREQ)) { + matrix[row] = matrix_prev[row]; + } + + _delay_us(5); + KEY_PREV_OFF(); + KEY_UNABLE(); + + // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. + // This takes 25us or more to make sure KEY_STATE returns to idle state. + + _delay_us(75); + + } + if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); + } + // power off + if (KEY_POWER_STATE() && + (USB_DeviceState == DEVICE_STATE_Suspended || + USB_DeviceState == DEVICE_STATE_Unattached ) && + timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) { + KEY_POWER_OFF(); + suspend_power_down(); + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_modified(void) +{ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + if (matrix[i] != matrix_prev[i]) + return true; + } + return false; +} + +inline +bool matrix_has_ghost(void) +{ + return false; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & (1<= 0; --r) { + count += bitpop16(matrix_get_row(r)); + } + return count; +} + +void matrix_power_up(void) { + KEY_POWER_ON(); +} +void matrix_power_down(void) { + KEY_POWER_OFF(); +} diff --git a/keyboards/hhkb/ansi/readme.md b/keyboards/hhkb/ansi/readme.md new file mode 100644 index 0000000000..495aa4c3f7 --- /dev/null +++ b/keyboards/hhkb/ansi/readme.md @@ -0,0 +1,14 @@ +HHKB Alternate Controller +=== + +An alternative controler for the HHKB designed by hasu. + +Keyboard Maintainer: QMK Community +Hardware Supported: HHKB Alternate Controller +Hardware Availability: https://geekhack.org/index.php?topic=12047.0 + +Make example for this keyboard (after setting up your build environment): + + make hhkb/ansi:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/hhkb/ansi/rules.mk b/keyboards/hhkb/ansi/rules.mk new file mode 100644 index 0000000000..a367ef48d1 --- /dev/null +++ b/keyboards/hhkb/ansi/rules.mk @@ -0,0 +1,71 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +CUSTOM_MATRIX = yes # Custom matrix file for the HHKB +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = yes # MIDI controls +# UNICODE_ENABLE = yes # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + + +# HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. + +# Either uncomment the HHKB_RN42_ENABLE line above, or run make enabling the +# feature. Be sure to clean any existing build before trying to enable rn42 +# support. For example: +# +# make hhkb-keymap-clean +# make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes + +# project specific files +SRC = matrix.c + +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif + + +# debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION +# debug-on: all + +# debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT +# debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) +# debug-off: all + +LAYOUTS = 60_hhkb diff --git a/keyboards/hhkb/config.h b/keyboards/hhkb/config.h deleted file mode 100644 index fc747a6e94..0000000000 --- a/keyboards/hhkb/config.h +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#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 - -/* 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 - -#ifdef HHKB_RN42_ENABLE -// rn42 support -- acquired from the tmk repo. This is almost certainly not -// integrated with qmk in the correct way. - -#define SUART_OUT_PORT PORTD -#define SUART_OUT_BIT 0 -#define SUART_IN_PIN PIND -#define SUART_IN_BIT 1 - -#ifdef __AVR_ATmega32U4__ - /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ - #define UCSR1D _SFR_MEM8(0xCB) - #define RTSEN 0 - #define CTSEN 1 - - #define SERIAL_UART_BAUD 115200 - #define SERIAL_UART_DATA UDR1 - #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) - #define SERIAL_UART_RXD_VECT USART1_RX_vect - #define SERIAL_UART_TXD_READY (UCSR1A&(1<>8); /* baud rate */ \ - UCSR1B |= (1< -#include -#include -#include -#include - - -// Timer resolution check -#if (1000000/TIMER_RAW_FREQ > 20) -# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." -#endif - - -/* - * HHKB Matrix I/O - * - * row: HC4051[A,B,C] selects scan row0-7 - * row-ext: [En0,En1] row extention for JP - * col: LS145[A,B,C,D] selects scan col0-7 and enable(D) - * key: on: 0/off: 1 - * prev: hysteresis control: assert(1) when previous key state is on - */ - - -#if defined(__AVR_ATmega32U4__) -/* - * For TMK HHKB alt controller(ATMega32U4) - * - * row: PB0-2 - * col: PB3-5,6 - * key: PD7(pull-uped) - * prev: PB7 - * power: PD4(L:off/H:on) - * row-ext: PC6,7 for HHKB JP(active low) - */ -static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); } -static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); } -static inline bool KEY_STATE(void) { return (PIND & (1<<7)); } -static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } -static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } -#ifdef HHKB_POWER_SAVING -static inline void KEY_POWER_ON(void) { - DDRB = 0xFF; PORTB = 0x40; // change pins output - DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on - /* Without this wait you will miss or get false key events. */ - _delay_ms(5); // wait for powering up -} -static inline void KEY_POWER_OFF(void) { - /* input with pull-up consumes less than without it when pin is open. */ - DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up - DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off -} -static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); } -#else -static inline void KEY_POWER_ON(void) {} -static inline void KEY_POWER_OFF(void) {} -static inline bool KEY_POWER_STATE(void) { return true; } -#endif -static inline void KEY_INIT(void) -{ - /* row,col,prev: output */ - DDRB = 0xFF; - PORTB = 0x40; // unable - /* key: input with pull-up */ - DDRD &= ~0x80; - PORTD |= 0x80; -#ifdef HHKB_JP - /* row extention for HHKB JP */ - DDRC |= (1<<6|1<<7); - PORTC |= (1<<6|1<<7); -#endif - KEY_UNABLE(); - KEY_PREV_OFF(); - - KEY_POWER_OFF(); -} -static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) -{ - PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); -#ifdef HHKB_JP - if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); - else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); -#endif -} - - -#elif defined(__AVR_AT90USB1286__) -/* - * For Teensy++(AT90USB1286) - * - * HHKB pro HHKB pro2 - * row: PB0-2 (6-8) (5-7) - * col: PB3-5,6 (9-12) (8-11) - * key: PE6(pull-uped) (4) (3) - * prev: PE7 (5) (4) - * - * TODO: convert into 'staitc inline' function - */ -#define KEY_INIT() do { \ - DDRB |= 0x7F; \ - DDRE |= (1<<7); \ - DDRE &= ~(1<<6); \ - PORTE |= (1<<6); \ -} while (0) -#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \ - (((COL) & 0x07)<<3) | \ - ((ROW) & 0x07)) -#define KEY_ENABLE() (PORTB &= ~(1<<6)) -#define KEY_UNABLE() (PORTB |= (1<<6)) -#define KEY_STATE() (PINE & (1<<6)) -#define KEY_PREV_ON() (PORTE |= (1<<7)) -#define KEY_PREV_OFF() (PORTE &= ~(1<<7)) -#define KEY_POWER_ON() -#define KEY_POWER_OFF() -#define KEY_POWER_STATE() true - - -#else -# error "define code for matrix scan" -#endif - - -#if 0 -// For ATMega328P with V-USB -// -// #elif defined(__AVR_ATmega328P__) -// Ports for V-USB -// key: PB0(pull-uped) -// prev: PB1 -// row: PB2-4 -// col: PC0-2,3 -// power: PB5(Low:on/Hi-z:off) -#define KEY_INIT() do { \ - DDRB |= 0x3E; \ - DDRB &= ~(1<<0); \ - PORTB |= 1<<0; \ - DDRC |= 0x0F; \ - KEY_UNABLE(); \ - KEY_PREV_OFF(); \ -} while (0) -#define KEY_SELECT(ROW, COL) do { \ - PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \ - PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \ -} while (0) -#define KEY_ENABLE() (PORTC &= ~(1<<3)) -#define KEY_UNABLE() (PORTC |= (1<<3)) -#define KEY_STATE() (PINB & (1<<0)) -#define KEY_PREV_ON() (PORTB |= (1<<1)) -#define KEY_PREV_OFF() (PORTB &= ~(1<<1)) -// Power supply switching -#define KEY_POWER_ON() do { \ - KEY_INIT(); \ - PORTB &= ~(1<<5); \ - _delay_ms(1); \ -} while (0) -#define KEY_POWER_OFF() do { \ - DDRB &= ~0x3F; \ - PORTB &= ~0x3F; \ - DDRC &= ~0x0F; \ - PORTC &= ~0x0F; \ -} while (0) -#endif - -#endif diff --git a/keyboards/hhkb/info.json b/keyboards/hhkb/info.json deleted file mode 100644 index 3beaff83da..0000000000 --- a/keyboards/hhkb/info.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "keyboard_name": "hhkb", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "!", "x": 1, "y": 0 }, - { "label": "@", "x": 2, "y": 0 }, - { "label": "#", "x": 3, "y": 0 }, - { "label": "$", "x": 4, "y": 0 }, - { "label": "%", "x": 5, "y": 0 }, - { "label": "^", "x": 6, "y": 0 }, - { "label": "&", "x": 7, "y": 0 }, - { "label": "*", "x": 8, "y": 0 }, - { "label": "(", "x": 9, "y": 0 }, - { "label": ")", "x": 10, "y": 0 }, - { "label": "_", "x": 11, "y": 0 }, - { "label": "+", "x": 12, "y": 0 }, - { "label": "|", "x": 13, "y": 0 }, - { "label": "~", "x": 14, "y": 0 }, - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "{", "x": 11.5, "y": 1 }, - { "label": "}", "x": 12.5, "y": 1 }, - { "label": "Delete", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ":", "x": 10.75, "y": 2 }, - { "label": "\"", "x": 11.75, "y": 2 }, - { "label": "Return", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": "<", "x": 9.25, "y": 3 }, - { "label": ">", "x": 10.25, "y": 3 }, - { "label": "?", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "Fn", "x": 14, "y": 3 }, - { "label": "", "x": 1.5, "y": 4 }, - { "label": "", "x": 2.5, "y": 4, "w": 1.5 }, - { "x": 4, "y": 4, "w": 6 }, - { "label": "", "x": 10, "y": 4, "w": 1.5 }, - { "label": "", "x": 11.5, "y": 4 } - ] - }, - - "LAYOUT_JP": { - "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "!", "x": 1, "y": 0 }, - { "label": "\"", "x": 2, "y": 0 }, - { "label": "#", "x": 3, "y": 0 }, - { "label": "$", "x": 4, "y": 0 }, - { "label": "%", "x": 5, "y": 0 }, - { "label": "&", "x": 6, "y": 0 }, - { "label": "'", "x": 7, "y": 0 }, - { "label": "(", "x": 8, "y": 0 }, - { "label": ")", "x": 9, "y": 0 }, - { "label": "", "x": 10, "y": 0 }, - { "label": "=", "x": 11, "y": 0 }, - { "label": "~", "x": 12, "y": 0 }, - { "label": "|", "x": 13, "y": 0 }, - { "label": "BS", "x": 14, "y": 0 }, - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "`", "x": 11.5, "y": 1 }, - { "label": "{", "x": 12.5, "y": 1 }, - { "label": "Enter", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, - { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": "+", "x": 10.75, "y": 2 }, - { "label": "*", "x": 11.75, "y": 2 }, - { "label": "}", "x": 12.75, "y": 2 }, - { "label": "Shift", "x": 0, "y": 3, "w": 2 }, - { "label": "Z", "x": 2, "y": 3 }, - { "label": "X", "x": 3, "y": 3 }, - { "label": "C", "x": 4, "y": 3 }, - { "label": "V", "x": 5, "y": 3 }, - { "label": "B", "x": 6, "y": 3 }, - { "label": "N", "x": 7, "y": 3 }, - { "label": "M", "x": 8, "y": 3 }, - { "label": "<", "x": 9, "y": 3 }, - { "label": ">", "x": 10, "y": 3 }, - { "label": "?", "x": 11, "y": 3 }, - { "label": "_", "x": 12, "y": 3 }, - { "label": "\u2191", "x": 13, "y": 3 }, - { "label": "Shift", "x": 14, "y": 3 }, - { "label": "Fn", "x": 0, "y": 4 }, - { "label": "HH", "x": 1.25, "y": 4 }, - { "label": "\u2662", "x": 2.25, "y": 4 }, - { "label": "", "x": 3.25, "y": 4 }, - { "label": "NN", "x": 4.25, "y": 4 }, - { "x": 5.25, "y": 4, "w": 2.5 }, - { "label": "\u25cc", "x": 7.75, "y": 4 }, - { "label": "Kana", "x": 8.75, "y": 4 }, - { "label": "", "x": 9.75, "y": 4 }, - { "label": "Fn", "x": 10.75, "y": 4 }, - { "label": "\u2190", "x": 12, "y": 4 }, - { "label": "\u2193", "x": 13, "y": 4 }, - { "label": "\u2192", "x": 14, "y": 4 } - ] - } - } -} diff --git a/keyboards/hhkb/jp/config.h b/keyboards/hhkb/jp/config.h new file mode 100644 index 0000000000..01dab6d440 --- /dev/null +++ b/keyboards/hhkb/jp/config.h @@ -0,0 +1,104 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4848 // HH = happy hacking +#define PRODUCT_ID 0x0002 // HHKB JP +#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 */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 8 + +#define TAPPING_TERM 200 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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 + +#ifdef HHKB_RN42_ENABLE +// rn42 support -- acquired from the tmk repo. This is almost certainly not +// integrated with qmk in the correct way. + +#define SUART_OUT_PORT PORTD +#define SUART_OUT_BIT 0 +#define SUART_IN_PIN PIND +#define SUART_IN_BIT 1 + +#ifdef __AVR_ATmega32U4__ + /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ + #define UCSR1D _SFR_MEM8(0xCB) + #define RTSEN 0 + #define CTSEN 1 + + #define SERIAL_UART_BAUD 115200 + #define SERIAL_UART_DATA UDR1 + #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) + #define SERIAL_UART_RXD_VECT USART1_RX_vect + #define SERIAL_UART_TXD_READY (UCSR1A&(1<>8); /* baud rate */ \ + UCSR1B |= (1< +#include +#include +#include +#include + + +// Timer resolution check +#if (1000000/TIMER_RAW_FREQ > 20) +# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." +#endif + + +/* + * HHKB Matrix I/O + * + * row: HC4051[A,B,C] selects scan row0-7 + * row-ext: [En0,En1] row extention for JP + * col: LS145[A,B,C,D] selects scan col0-7 and enable(D) + * key: on: 0/off: 1 + * prev: hysteresis control: assert(1) when previous key state is on + */ + + +#if defined(__AVR_ATmega32U4__) +/* + * For TMK HHKB alt controller(ATMega32U4) + * + * row: PB0-2 + * col: PB3-5,6 + * key: PD7(pull-uped) + * prev: PB7 + * power: PD4(L:off/H:on) + * row-ext: PC6,7 for HHKB JP(active low) + */ +static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); } +static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); } +static inline bool KEY_STATE(void) { return (PIND & (1<<7)); } +static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } +static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } +#ifdef HHKB_POWER_SAVING +static inline void KEY_POWER_ON(void) { + DDRB = 0xFF; PORTB = 0x40; // change pins output + DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on + /* Without this wait you will miss or get false key events. */ + _delay_ms(5); // wait for powering up +} +static inline void KEY_POWER_OFF(void) { + /* input with pull-up consumes less than without it when pin is open. */ + DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up + DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off +} +static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); } +#else +static inline void KEY_POWER_ON(void) {} +static inline void KEY_POWER_OFF(void) {} +static inline bool KEY_POWER_STATE(void) { return true; } +#endif +static inline void KEY_INIT(void) +{ + /* row,col,prev: output */ + DDRB = 0xFF; + PORTB = 0x40; // unable + /* key: input with pull-up */ + DDRD &= ~0x80; + PORTD |= 0x80; + + /* row extention for HHKB JP */ + DDRC |= (1<<6|1<<7); + PORTC |= (1<<6|1<<7); + + KEY_UNABLE(); + KEY_PREV_OFF(); + + KEY_POWER_OFF(); +} +static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) +{ + PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); + + if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); + else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); + +} + + +#elif defined(__AVR_AT90USB1286__) +/* + * For Teensy++(AT90USB1286) + * + * HHKB pro HHKB pro2 + * row: PB0-2 (6-8) (5-7) + * col: PB3-5,6 (9-12) (8-11) + * key: PE6(pull-uped) (4) (3) + * prev: PE7 (5) (4) + * + * TODO: convert into 'staitc inline' function + */ +#define KEY_INIT() do { \ + DDRB |= 0x7F; \ + DDRE |= (1<<7); \ + DDRE &= ~(1<<6); \ + PORTE |= (1<<6); \ +} while (0) +#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \ + (((COL) & 0x07)<<3) | \ + ((ROW) & 0x07)) +#define KEY_ENABLE() (PORTB &= ~(1<<6)) +#define KEY_UNABLE() (PORTB |= (1<<6)) +#define KEY_STATE() (PINE & (1<<6)) +#define KEY_PREV_ON() (PORTE |= (1<<7)) +#define KEY_PREV_OFF() (PORTE &= ~(1<<7)) +#define KEY_POWER_ON() +#define KEY_POWER_OFF() +#define KEY_POWER_STATE() true + + +#else +# error "define code for matrix scan" +#endif + + +#if 0 +// For ATMega328P with V-USB +// +// #elif defined(__AVR_ATmega328P__) +// Ports for V-USB +// key: PB0(pull-uped) +// prev: PB1 +// row: PB2-4 +// col: PC0-2,3 +// power: PB5(Low:on/Hi-z:off) +#define KEY_INIT() do { \ + DDRB |= 0x3E; \ + DDRB &= ~(1<<0); \ + PORTB |= 1<<0; \ + DDRC |= 0x0F; \ + KEY_UNABLE(); \ + KEY_PREV_OFF(); \ +} while (0) +#define KEY_SELECT(ROW, COL) do { \ + PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \ + PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \ +} while (0) +#define KEY_ENABLE() (PORTC &= ~(1<<3)) +#define KEY_UNABLE() (PORTC |= (1<<3)) +#define KEY_STATE() (PINB & (1<<0)) +#define KEY_PREV_ON() (PORTB |= (1<<1)) +#define KEY_PREV_OFF() (PORTB &= ~(1<<1)) +// Power supply switching +#define KEY_POWER_ON() do { \ + KEY_INIT(); \ + PORTB &= ~(1<<5); \ + _delay_ms(1); \ +} while (0) +#define KEY_POWER_OFF() do { \ + DDRB &= ~0x3F; \ + PORTB &= ~0x3F; \ + DDRC &= ~0x0F; \ + PORTC &= ~0x0F; \ +} while (0) +#endif diff --git a/keyboards/hhkb/jp/info.json b/keyboards/hhkb/jp/info.json new file mode 100644 index 0000000000..7594987d96 --- /dev/null +++ b/keyboards/hhkb/jp/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "HHKB JP", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_JP": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "!", "x": 1, "y": 0 }, + { "label": "\"", "x": 2, "y": 0 }, + { "label": "#", "x": 3, "y": 0 }, + { "label": "$", "x": 4, "y": 0 }, + { "label": "%", "x": 5, "y": 0 }, + { "label": "&", "x": 6, "y": 0 }, + { "label": "'", "x": 7, "y": 0 }, + { "label": "(", "x": 8, "y": 0 }, + { "label": ")", "x": 9, "y": 0 }, + { "label": "", "x": 10, "y": 0 }, + { "label": "=", "x": 11, "y": 0 }, + { "label": "~", "x": 12, "y": 0 }, + { "label": "|", "x": 13, "y": 0 }, + { "label": "BS", "x": 14, "y": 0 }, + { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "`", "x": 11.5, "y": 1 }, + { "label": "{", "x": 12.5, "y": 1 }, + { "label": "Enter", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "label": "Control", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": "+", "x": 10.75, "y": 2 }, + { "label": "*", "x": 11.75, "y": 2 }, + { "label": "}", "x": 12.75, "y": 2 }, + { "label": "Shift", "x": 0, "y": 3, "w": 2 }, + { "label": "Z", "x": 2, "y": 3 }, + { "label": "X", "x": 3, "y": 3 }, + { "label": "C", "x": 4, "y": 3 }, + { "label": "V", "x": 5, "y": 3 }, + { "label": "B", "x": 6, "y": 3 }, + { "label": "N", "x": 7, "y": 3 }, + { "label": "M", "x": 8, "y": 3 }, + { "label": "<", "x": 9, "y": 3 }, + { "label": ">", "x": 10, "y": 3 }, + { "label": "?", "x": 11, "y": 3 }, + { "label": "_", "x": 12, "y": 3 }, + { "label": "\u2191", "x": 13, "y": 3 }, + { "label": "Shift", "x": 14, "y": 3 }, + { "label": "Fn", "x": 0, "y": 4 }, + { "label": "HH", "x": 1.25, "y": 4 }, + { "label": "\u2662", "x": 2.25, "y": 4 }, + { "label": "", "x": 3.25, "y": 4 }, + { "label": "NN", "x": 4.25, "y": 4 }, + { "x": 5.25, "y": 4, "w": 2.5 }, + { "label": "\u25cc", "x": 7.75, "y": 4 }, + { "label": "Kana", "x": 8.75, "y": 4 }, + { "label": "", "x": 9.75, "y": 4 }, + { "label": "Fn", "x": 10.75, "y": 4 }, + { "label": "\u2190", "x": 12, "y": 4 }, + { "label": "\u2193", "x": 13, "y": 4 }, + { "label": "\u2192", "x": 14, "y": 4 } + ] + } + } +} diff --git a/keyboards/hhkb/jp/jp.c b/keyboards/hhkb/jp/jp.c new file mode 100644 index 0000000000..f1f1388c77 --- /dev/null +++ b/keyboards/hhkb/jp/jp.c @@ -0,0 +1 @@ +#include "jp.h" \ No newline at end of file diff --git a/keyboards/hhkb/jp/jp.h b/keyboards/hhkb/jp/jp.h new file mode 100644 index 0000000000..a95796f25f --- /dev/null +++ b/keyboards/hhkb/jp/jp.h @@ -0,0 +1,28 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_JP( \ + K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ + K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ + K06, K66, K26, K16, K56, K76, KA6, K96, K86, KB6, KE6, KF6, KD6, KC6, \ + K05, K65, K25, K15, K55, K75, KA5, K95, K85, KB5, KE5, KF5, KD5, KC5, \ + K04, K34, K64, K24, K14, K74, K94, K84, KB4, KE4, KF4, KD4, KC4) \ +{ \ + { KC_NO, KC_NO, K02, K03, K04, K05, K06, KC_NO }, \ + { KC_NO, KC_NO, K12, K13, K14, K15, K16, KC_NO }, \ + { KC_NO, KC_NO, K22, K23, K24, K25, K26, KC_NO }, \ + { KC_NO, KC_NO, K32, KC_NO, K34, 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, K52, K53, KC_NO, K55, K56, KC_NO }, \ + { KC_NO, KC_NO, K62, K63, K64, K65, K66, KC_NO }, \ + { KC_NO, KC_NO, K72, K73, K74, K75, K76, KC_NO }, \ + { KC_NO, KC_NO, K82, K83, K84, K85, K86, KC_NO }, \ + { KC_NO, KC_NO, K92, K93, K94, K95, K96, KC_NO }, \ + { KC_NO, KC_NO, KA2, KA3, KC_NO, KA5, KA6, KC_NO }, \ + { KC_NO, KC_NO, KB2, KB3, KB4, KB5, KB6, KC_NO }, \ + { KC_NO, KC_NO, KC2, KC_NO, KC4, KC5, KC6, KC_NO }, \ + { KC_NO, KC_NO, KD2, KD3, KD4, KD5, KD6, KC_NO }, \ + { KC_NO, KC_NO, KE2, KE3, KE4, KE5, KE6, KC_NO }, \ + { KC_NO, KC_NO, KF2, KF3, KF4, KF5, KF6, KC_NO } \ +} diff --git a/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c new file mode 100644 index 0000000000..04d79f9247 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/bakingpy/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + 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_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, KC_UP, KC_BSLS, + MO(1), KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______)}; diff --git a/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk b/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk new file mode 100644 index 0000000000..a7f700f019 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/bakingpy/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/jp/keymaps/default/keymap.c b/keyboards/hhkb/jp/keymaps/default/keymap.c new file mode 100644 index 0000000000..6fd06638ce --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +/* Layer 0: HHKB JP + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + * |------------------------------------------------------` Ent| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + * |-----------------------------------------------------------| + * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + * |-----------------------------------------------------------| + * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| + * `-----------------------------------------------------------' + */ + +/* Layer 1: HHKB mode (HHKB Fn) + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + * |------------------------------------------------------` | + * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + * |-----------------------------------------------------------| + * | | | | | | | +| -|End|PgD|Dow| | | | + * |-----------------------------------------------------------| + * | || | | | | | | | | || | | | + * `-----------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + 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_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; +} diff --git a/keyboards/hhkb/jp/keymaps/default/rules.mk b/keyboards/hhkb/jp/keymaps/default/rules.mk new file mode 100644 index 0000000000..a7f700f019 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/default/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/jp/keymaps/default_mac/keymap.c b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c new file mode 100644 index 0000000000..f3ef3d6af6 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/default_mac/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +/* Layer 0: HHKB JP + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + * |------------------------------------------------------` Ent| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + * |-----------------------------------------------------------| + * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + * |-----------------------------------------------------------| + * |Fn|`|Ctl|Cmd|Opt|Hnk| Spc |Mhk|Cmd|Opt| Fn||Lft|Dwn|Rgh| + * `-----------------------------------------------------------' + */ + +/* Layer 1: HHKB mode (HHKB Fn) + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + * |------------------------------------------------------` | + * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + * |-----------------------------------------------------------| + * | | | | | | | +| -|End|PgD|Dow| | | | + * |-----------------------------------------------------------| + * | || | | | | | | | | ||Del| | | + * `-----------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + 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_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + MO(1), KC_GRV, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; +} diff --git a/keyboards/hhkb/jp/keymaps/default_mac/rules.mk b/keyboards/hhkb/jp/keymaps/default_mac/rules.mk new file mode 100644 index 0000000000..a7f700f019 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/default_mac/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/jp/keymaps/dhertz/config.h b/keyboards/hhkb/jp/keymaps/dhertz/config.h new file mode 100644 index 0000000000..af2fb9d8a5 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/dhertz/config.h @@ -0,0 +1 @@ +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/hhkb/jp/keymaps/dhertz/keymap.c b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c new file mode 100644 index 0000000000..951af069b0 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/dhertz/keymap.c @@ -0,0 +1,84 @@ +#include QMK_KEYBOARD_H +#include "keymap.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Del|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter | + * |------------------------------------------------------` | + * |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| `|Up |Shi| + * |-----------------------------------------------------------| + * |NCt|| #|Alt|CmT|CmT| LyrSpc |CGv|Iso|Gui|CSL||Rig|Dow|Lef| + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_JP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_DEL,KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, + SRCH_CTL, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT, KC_SLSH,KC_NUBS, KC_UP, KC_RSFT, + NC_CTL, HSH_TLD,KC_LALT,CMD_TAB_CMD,CMD_TAB_CMD, LT(2, KC_SPC) , CMD_GRV_CMD, ISO_COUNTRY_CODE,KC_RGUI, CMD_SFT_L, KC_LEFT,KC_DOWN,KC_RGHT + ), + + /* Layer 1: iPad mode (Fixed) + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |------------------------------------------------------` | + * |CmdSpc| | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | || ~| |CAD| | |CmH| | | || | | | + * `-----------------------------------------------------------' + */ + [1] = LAYOUT_JP( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, + CMD_SPC,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_D,KC_TRNS, KC_TRNS ,CMD_H,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS + ), + + /* Layer 2: HHKB mode (Space) + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps |DL0|DL1| | | | | |Psc|Slk|Pus|Up | | | + * |------------------------------------------------------` | + * | |VoD|VoU|Mut| | | |Bsp|Del|CSL|Lef|Rig| | | + * |-----------------------------------------------------------| + * | | | |CAC| | | | | | |Dow| |PgU| | + * |-----------------------------------------------------------| + * | || ~| | | | | | | | ||Hom|PgD|End| + * `-----------------------------------------------------------' + */ + [2] = LAYOUT_JP( + 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, DF(0), DF(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,KC_TRNS, + KC_TRNS, KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_TRNS,KC_BSPC, KC_DEL,CMD_SFT_L,KC_LEFT,KC_RGHT,KC_TRNS,KC_PENT, + KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_C,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DOWN,KC_TRNS,KC_PGUP,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN, KC_END + ), +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case CMD_SPC: + mod_or_mod_with_macro(record, KC_LGUI, " "); + break; + case CMD_H: + mod_or_mod_with_macro(record, KC_RGUI, "H"); + break; + case CMD_ALT_D: + mod_or_mod_with_macro(record, KC_LGUI, SS_LALT("D")); + break; + default: + return true; + } + return false; +} diff --git a/keyboards/hhkb/jp/keymaps/dhertz/keymap.h b/keyboards/hhkb/jp/keymaps/dhertz/keymap.h new file mode 100644 index 0000000000..dbefc63800 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/dhertz/keymap.h @@ -0,0 +1,7 @@ +#include "dhertz.h" + +enum dhertz_keycodes { + CMD_SPC = NEW_SAFE_RANGE, + CMD_H, + CMD_ALT_D, +}; diff --git a/keyboards/hhkb/jp/keymaps/dhertz/rules.mk b/keyboards/hhkb/jp/keymaps/dhertz/rules.mk new file mode 100644 index 0000000000..5656057b43 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/dhertz/rules.mk @@ -0,0 +1,2 @@ +OPT_DEFS += -DHHKB_JP + diff --git a/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c new file mode 100644 index 0000000000..15dc29773b --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/enoch_jp/keymap.c @@ -0,0 +1,71 @@ +#include QMK_KEYBOARD_H + +/* Layer 0: HHKB JP +* ,-----------------------------------------------------------. +* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| +* |-----------------------------------------------------------| +* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | +* |------------------------------------------------------` Ent| +* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | +* |-----------------------------------------------------------| +* |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| +* |-----------------------------------------------------------| +* | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| +* `-----------------------------------------------------------' +*/ + +/* Layer 1: HHKB mode (HHKB Fn) +* ,-----------------------------------------------------------. +* |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| +* |-----------------------------------------------------------| +* |Caps |MPrev|MPlay|MNext| | | | |Psc|Slk|Pus|Up | | +* |------------------------------------------------------` | +* | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | +* |-----------------------------------------------------------| +* | | | | | | | +| -|End|PgD|Dow| | | | +* |-----------------------------------------------------------| +* | || | | | | | | | | || | | | +* `-----------------------------------------------------------' +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + 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_GRAVE, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, 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, KC_UP, KC_BSLS, + KC_BSPC, KC_ZKHK, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_BSPC, KC_RSFT, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + _______, 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_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + +/*void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_RSFT) { + register_code(KC_S); + unregister_code(KC_S); + } + SEQ_TWO_KEYS(KC_A, KC_S) { + register_code(KC_H); + unregister_code(KC_H); + } + SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { + register_code(KC_LGUI); + register_code(KC_S); + unregister_code(KC_S); + unregister_code(KC_LGUI); + } + } +}*/ diff --git a/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk b/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk new file mode 100644 index 0000000000..d35c58b777 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/enoch_jp/rules.mk @@ -0,0 +1,3 @@ +NKRO_ENABLE = yes + +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md new file mode 100644 index 0000000000..222ad898ef --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/README.md @@ -0,0 +1,49 @@ +# harfqwerty_jp + +half-QWERTY is a keyboard layout for one-handed typing on QWERTY keyboard. + +* When hold space bar, the keyboard enters mirror mode. +* To type a space, just tap the space bar. + +## BASE + + ,-----------------------------------------------------------. + |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + |-----------------------------------------------------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + |------------------------------------------------------` Ent| + |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + |-----------------------------------------------------------| + |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + |-----------------------------------------------------------| + | ||Ctl|Alt|Cmd| | Spc | | | | ||Lft|Dwn|Rgh| + `-----------------------------------------------------------' + +## HHKB mode (HHKB Fn) + + ,-----------------------------------------------------------. + |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + |-----------------------------------------------------------| + |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + |------------------------------------------------------` | + | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + |-----------------------------------------------------------| + | | | | | | | +| -|End|PgD|Dow| | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' + + +## Mirror mode + + ,-----------------------------------------------------------. + | | 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | | | + |-----------------------------------------------------------| + | | P| O| I| U| Y| T| R| E| W| Q| | | | + |------------------------------------------------------` | + | | ;| L| K| J| H| G| F| D| S| A| | | | + |-----------------------------------------------------------| + | | .| ,| M| N| B| V| C| X| Z| | | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' diff --git a/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c new file mode 100644 index 0000000000..0d4a24c60d --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/keymap.c @@ -0,0 +1,76 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +enum +{ + BASE, + HHKB, + MIRROR, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + ,-----------------------------------------------------------. + |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + |-----------------------------------------------------------| + |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + |------------------------------------------------------` Ent| + |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + |-----------------------------------------------------------| + |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + |-----------------------------------------------------------| + | ||Ctl|Alt|Cmd| | Spc | | | | ||Lft|Dwn|Rgh| + `-----------------------------------------------------------' + */ + [BASE] = LAYOUT_JP( + 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_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + MO(HHKB), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, LT(MIRROR, KC_SPC), KC_HENK, KC_KANA, KC_RALT, MO(HHKB), KC_LEFT, KC_DOWN, KC_RGHT), + + /* 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 | | | + |------------------------------------------------------` | + | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + |-----------------------------------------------------------| + | | | | | | | +| -|End|PgD|Dow| | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' + */ + + [HHKB] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Mirror Level: when hold space bar + ,-----------------------------------------------------------. + | | 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | | | + |-----------------------------------------------------------| + | | P| O| I| U| Y| T| R| E| W| Q| | | | + |------------------------------------------------------` | + | | ;| L| K| J| H| G| F| D| S| A| | | | + |-----------------------------------------------------------| + | | .| ,| M| N| B| V| C| X| Z| | | | | + |-----------------------------------------------------------| + | || | | | | | | | | || | | | + `-----------------------------------------------------------' + */ + [MIRROR] = LAYOUT_JP( + _______, KC_0, KC_9, KC_8, KC_7, KC_6, KC_5, KC_4, KC_3, KC_2, KC_1, _______, _______, _______, _______, + _______, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, _______, _______, + _______, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, _______, _______, _______, + _______, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, _______, _______)}; + diff --git a/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk new file mode 100644 index 0000000000..a7f700f019 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/halfqwerty_jp/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c new file mode 100644 index 0000000000..f40df74e87 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/rdg_jp/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H + +enum +{ + ZER, + HDN, + OSY +}; + +#define CTL_ESC CTL_T(KC_ESC) +#define SFT_BSP SFT_T(KC_BSPC) + +#define SCRNS3 LGUI(LCTL(LSFT(KC_3))) +#define SCRNS4 LGUI(LCTL(LSFT(KC_4))) + +/* hhkb jp ~ layout + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + * |------------------------------------------------------` Ent| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + * |-----------------------------------------------------------| + * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + * |-----------------------------------------------------------| + * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| + * `-----------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [ZER] = LAYOUT_JP( + 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_INS, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + 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_GRV, 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_BSLS, KC_UP, KC_RSFT, + MO(HDN), KC_LCTL, KC_LALT, KC_LGUI, MO(HDN), KC_SPC, SFT_BSP, MO(HDN), MO(OSY), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT), + + [HDN] = LAYOUT_JP( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, + _______, KC_TILD, KC_GRV, KC_BSLS, KC_PIPE, KC_MINS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TILD, KC_GRV, _______, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, _______, KC_ENT, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, KC_UNDS, KC_DEL, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + [OSY] = LAYOUT_JP( + _______, _______, _______, SCRNS3, SCRNS4, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; +} diff --git a/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk b/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk new file mode 100644 index 0000000000..a7f700f019 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/rdg_jp/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/jp/keymaps/sh_jp/README.md b/keyboards/hhkb/jp/keymaps/sh_jp/README.md new file mode 100644 index 0000000000..4f82f2f4e9 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/sh_jp/README.md @@ -0,0 +1,86 @@ +###Keymaps with both Dvorak layout and QWER layout for HHKB JP. + +1. The default layout is Dvorak. +2. Use `Tog` to toggle between Dvorak and QWER +3. Holding `NewCmd`, the original `LftCmd`, will activate the `NewCmd` layer which means `NewCmd+key` is the same as `Cmd+key` in normal QWER layout.[1](#cmdTab) + - For example, no matter you are in Dvorak layout or QWER layout, you can use `Cmd+s` to save a currently editing file. +4. `Symb` makes type symbols easier + - for example: `Symb+a` is `!`. +5. `Spc+key` equals to `Shft+key` while using `Spc` alone will yield a space as usual. +6. There's an extra `Tab` in the last line. + +``` +Layer DVOR: +,-----------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| |Bsp| +|-----------------------------------------------------------| +|Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| | +|------------------------------------------------------` Ent| +|Ctrl | A| O| E| U| I| D| H| T| N| S| -| \| | +|-----------------------------------------------------------| +|Shft | ;| Q| J| K| X| B| M| W| V| Z| | Up| | +|-----------------------------------------------------------| +|FN| `| Alt|NewCmd|Symb| Spc |Symb|Tab|RCmd|Tog|Lft|Dwn|Rgh| +`-----------------------------------------------------------' +``` + +``` +Layer QWER: +,-----------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =| |Bsp| +|-----------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | +|------------------------------------------------------` Ent| +|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| \| | +|-----------------------------------------------------------| +|Shft | Z| X| C| V| B| N| M| ,| .| /| | Up| | +|-----------------------------------------------------------| +|FN| `| Alt|NewCmd|Symb| Spc |Symb|Tab|Cmd|Tog|Lft|Dwn|Rgh| +`-----------------------------------------------------------' +``` + +``` +Layer Symb: +,-----------------------------------------------------------. +| | | | | | | | | | | | | | | | +|-----------------------------------------------------------| +| | | | [| ]| | | {| }| | | | | | +|------------------------------------------------------` | +| | !| @| #| $| %| ^| &| *| (| )| '| \| | +|-----------------------------------------------------------| +| | | | | | | | | | | | | | | +|-----------------------------------------------------------| +| | | | | | | | | | | | | | +`-----------------------------------------------------------' +``` + +``` +Layer FUNC: HHKB mode (HHKB Fn) +,-----------------------------------------------------------. +|Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| +|-----------------------------------------------------------| +|Caps | | | | | | | |Psc|Slk|Pus|Up | | | +|------------------------------------------------------` | +| |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | +|-----------------------------------------------------------| +| | | | | | | +| -|End|PgD|Dow| | | | +|-----------------------------------------------------------| +| || | | | | | | | | || | | | +`-----------------------------------------------------------' +``` + +``` +Empty Layer: +,-----------------------------------------------------------. +| | | | | | | | | | | | | | | | +|-----------------------------------------------------------| +| | | | | | | | | | | | | | | +|------------------------------------------------------` | +| | | | | | | | | | | | | | | +|-----------------------------------------------------------| +| | | | | | | | | | | | | | | +|-----------------------------------------------------------| +| | | | | | | | | | | | | | +`-----------------------------------------------------------' +``` +1: `NewCmd + Tab` does not work, you can use `RCmd+Tab` to switch among applications. diff --git a/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c new file mode 100644 index 0000000000..79515c5a6e --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/sh_jp/keymap.c @@ -0,0 +1,50 @@ +#include QMK_KEYBOARD_H + +enum +{ + DVOR, + QWER, + NEW_CMD, + SYMB, + FUNC +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DVOR] = LAYOUT_JP( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_JYEN, KC_BSPC, + KC_TAB, 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_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_ENT, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RO, KC_UP, KC_RSFT, + MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, TG(QWER), KC_LEFT, KC_DOWN, KC_RGHT), + [QWER] = LAYOUT_JP( + 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_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, _______, KC_LEFT, KC_DOWN, KC_RGHT), + + [NEW_CMD] = LAYOUT_JP( + _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), _______, _______, _______, LGUI(KC_BSPC), + _______, LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), + _______, LGUI(KC_A), LGUI(KC_S), LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), _______, _______, _______, _______, + LGUI(KC_LSFT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), _______, _______, _______, + _______, _______, _______, _______, _______, LGUI(KC_SPC), _______, _______, _______, _______, LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT)), + + [SYMB] = LAYOUT_JP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, LSFT(KC_LBRC), LSFT(KC_RBRC), _______, _______, _______, _______, + _______, LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + [FUNC] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; +} diff --git a/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk b/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk new file mode 100644 index 0000000000..a7f700f019 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/sh_jp/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/jp/keymaps/via/config.h b/keyboards/hhkb/jp/keymaps/via/config.h new file mode 100644 index 0000000000..96c85573df --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/config.h @@ -0,0 +1,2 @@ +// 3 layers or else it will not fit in EEPROM +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/hhkb/jp/keymaps/via/keymap.c b/keyboards/hhkb/jp/keymaps/via/keymap.c new file mode 100644 index 0000000000..cb1ba76fb0 --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H + +/* Layer 0: HHKB JP + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | + * |------------------------------------------------------` Ent| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | + * |-----------------------------------------------------------| + * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| + * |-----------------------------------------------------------| + * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| + * `-----------------------------------------------------------' + */ + +/* Layer 1: HHKB mode (HHKB Fn) + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | + * |------------------------------------------------------` | + * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | + * |-----------------------------------------------------------| + * | | | | | | | +| -|End|PgD|Dow| | | | + * |-----------------------------------------------------------| + * | || | | | | | | | | || | | | + * `-----------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + 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_JYEN, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, + MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_JP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) +{ + return MACRO_NONE; +} diff --git a/keyboards/hhkb/jp/keymaps/via/rules.mk b/keyboards/hhkb/jp/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/hhkb/jp/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/hhkb/jp/matrix.c b/keyboards/hhkb/jp/matrix.c new file mode 100644 index 0000000000..437356af6d --- /dev/null +++ b/keyboards/hhkb/jp/matrix.c @@ -0,0 +1,212 @@ +/* +Copyright 2011 Jun Wako + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "timer.h" +#include "matrix.h" +#include "hhkb_avr.h" +#include +#include "suspend.h" +#include "lufa.h" + + +// matrix power saving +#define MATRIX_POWER_SAVE 10000 +static uint32_t matrix_last_modified = 0; + +// matrix state buffer(1:on, 0:off) +static matrix_row_t *matrix; +static matrix_row_t *matrix_prev; +static matrix_row_t _matrix0[MATRIX_ROWS]; +static matrix_row_t _matrix1[MATRIX_ROWS]; + + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ +#ifdef DEBUG + debug_enable = true; + debug_keyboard = true; +#endif + + KEY_INIT(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; + for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; + matrix = _matrix0; + matrix_prev = _matrix1; +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +uint8_t matrix_scan(void) +{ + uint8_t *tmp; + + tmp = matrix_prev; + matrix_prev = matrix; + matrix = tmp; + + // power on + if (!KEY_POWER_STATE()) KEY_POWER_ON(); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + KEY_SELECT(row, col); + _delay_us(5); + + // Not sure this is needed. This just emulates HHKB controller's behaviour. + if (matrix_prev[row] & (1< 20/(1000000/TIMER_RAW_FREQ)) { + matrix[row] = matrix_prev[row]; + } + + _delay_us(5); + KEY_PREV_OFF(); + KEY_UNABLE(); + + // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. + // This takes 25us or more to make sure KEY_STATE returns to idle state. + + // Looks like JP needs faster scan due to its twice larger matrix + // or it can drop keys in fast key typing + _delay_us(30); + } + if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); + } + // power off + if (KEY_POWER_STATE() && + (USB_DeviceState == DEVICE_STATE_Suspended || + USB_DeviceState == DEVICE_STATE_Unattached ) && + timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) { + KEY_POWER_OFF(); + suspend_power_down(); + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_modified(void) +{ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + if (matrix[i] != matrix_prev[i]) + return true; + } + return false; +} + +inline +bool matrix_has_ghost(void) +{ + return false; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & (1<= 0; --r) { + count += bitpop16(matrix_get_row(r)); + } + return count; +} + +void matrix_power_up(void) { + KEY_POWER_ON(); +} +void matrix_power_down(void) { + KEY_POWER_OFF(); +} diff --git a/keyboards/hhkb/jp/readme.md b/keyboards/hhkb/jp/readme.md new file mode 100644 index 0000000000..41c1d2214e --- /dev/null +++ b/keyboards/hhkb/jp/readme.md @@ -0,0 +1,14 @@ +HHKB Alternate Controller +=== + +An alternative controler for the HHKB designed by hasu. + +Keyboard Maintainer: QMK Community +Hardware Supported: HHKB Alternate Controller +Hardware Availability: https://geekhack.org/index.php?topic=12047.0 + +Make example for this keyboard (after setting up your build environment): + + make hhkb/jp:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk new file mode 100644 index 0000000000..774b444c53 --- /dev/null +++ b/keyboards/hhkb/jp/rules.mk @@ -0,0 +1,69 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +CUSTOM_MATRIX = yes # Custom matrix file for the HHKB +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = yes # MIDI controls +# UNICODE_ENABLE = yes # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + + +# HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. + +# Either uncomment the HHKB_RN42_ENABLE line above, or run make enabling the +# feature. Be sure to clean any existing build before trying to enable rn42 +# support. For example: +# +# make hhkb-keymap-clean +# make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes + +# project specific files +SRC = matrix.c + +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif + + +# debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION +# debug-on: all + +# debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT +# debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) +# debug-off: all diff --git a/keyboards/hhkb/keymaps/bakingpy/keymap.c b/keyboards/hhkb/keymaps/bakingpy/keymap.c deleted file mode 100644 index 04d79f9247..0000000000 --- a/keyboards/hhkb/keymaps/bakingpy/keymap.c +++ /dev/null @@ -1,16 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - 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_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, KC_UP, KC_BSLS, - MO(1), KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - - [1] = LAYOUT_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______)}; diff --git a/keyboards/hhkb/keymaps/bakingpy/rules.mk b/keyboards/hhkb/keymaps/bakingpy/rules.mk deleted file mode 100644 index a7f700f019..0000000000 --- a/keyboards/hhkb/keymaps/bakingpy/rules.mk +++ /dev/null @@ -1 +0,0 @@ -OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/blakedietz/README.md b/keyboards/hhkb/keymaps/blakedietz/README.md deleted file mode 100644 index 4dff47a6e8..0000000000 --- a/keyboards/hhkb/keymaps/blakedietz/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# QMK HHKB Keymap: blakedietz - - - - -This is my (Blake Dietz's) own take on a QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. A lot of the - functionality was inspired by the ergodox ez default layout. - -## Dependencies - -### macOS - -```bash -brew tap osx-cross/avr -brew install avr-libc -brew install dfu-programmer -``` - -### Windows/Linux - -[Build Environment Setup](https://github.com/jackhumbert/qmk_firmware/wiki#build-environment-setup) - -## Flashing - -You will need to make sure that you have something that you can use to press the button on the alternate controller in -order to put it into boot mode. - -From the hhkb directory run the following: - -```bash -make clean -make hhkb:blakedietz:dfu -``` - -Press the button on the alternate controller to put the board into boot mode. - -You'll see an output similar to the following: - -```bash -make hhkb:blakedietz:dfu - -Making hhkb with keymap blakedietz and target dfu - -avr-gcc (GCC) 6.2.0 -Copyright (C) 2016 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -Size before: - text data bss dec hex filename - 0 22162 0 22162 5692 hhkb_blakedietz.hex - -Compiling: keyboards/hhkb/keymaps/blakedietz/keymap.c [OK] -Compiling: ./tmk_core/common/command.c [OK] -Linking: .build/hhkb_blakedietz.elf [OK] -Creating load file for Flash: .build/hhkb_blakedietz.hex [OK] - -Size after: - text data bss dec hex filename - 0 22162 0 22162 5692 hhkb_blakedietz.hex - -dfu-programmer: no device present. -Error: Bootloader not found. Trying again in 5s. -dfu-programmer: no device present. -Error: Bootloader not found. Trying again in 5s. -Bootloader Version: 0x00 (0) -Erasing flash... Success -Checking memory from 0x0 to 0x6FFF... Empty. -Checking memory from 0x0 to 0x56FF... Empty. -0% 100% Programming 0x5700 bytes... -[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success -0% 100% Reading 0x7000 bytes... -[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success -Validating... Success -0x5700 bytes written into 0x7000 bytes memory (77.68%). -``` - -### Layers - -#### Default - -##### A more "standard" layout - -This layout places tilde in the standard location. Backspace is moved to the two upper-right-most keys and pipe -is put back where it belongs (where backspace is on the default hhkb2 keymapping). - -##### Hyper key - - - -This layout throws out the HHKB's control key in favor of a Hyper key. Ctrl is instead placed on the z and / keys and -can be activated with a long press. I find that this is far more ergonomic as it's less of a reach and it allows you to -alternate to either hand when you need to use `ctrl` as a modifier. - -The hyper key can be held for hyper and tapped for escape. You'll find that this is quite nice for vim. - -Enter is also a hyper key. This allows for symmetry between control and enter. Hold for hyper, tap for enter. - -##### Tap to Hold - -###### CTL, ALT, GUI - -Since the HHKB does not have three super/meta keys, these keys were moved to pinky, ring and middle finger for ctrl, alt/ - option and super respectively. This is closer to home row which I've found causes less strain. - -The Alt and Super keys are instead replaced with layer toggle keys to go to dev and mouse mode respectively. - -###### Space - -Hold space to switch to dev mode. This will put you on a layer to have vim like arrow functionality on h,j,k and l. Use -this in editors that don't have vim keybindings. - -### Dev - -The Dev layer can be activated holding space or hitting the HHKB's Alt key. This will put you in a mode -where all function keys are available and left, right, up and down are mapped to their vim equivalents. The function - keys are mapped in such a way that you can use them for debugging. Typically I map debugging functions in all IDEs to - the following for a seamless debugging experience (e.g. jumping from Intellij to chrome dev tools and back): - - - f1 -> step over - - f2 -> step into - - f3 -> step out - - f4 -> continue - - f5 -> set break point on current line - -### Media - -The media layer can be activated by pressing and holding the semi-colon. I've also placed the play and pause key on the -apostrophe key in the media layer. This allows you to easily roll your pinky from the media toggle (semi-colon) to the -play/pause key in one fluid motion. - -I've also tried to logically map next/previous track along with volume up/down vim behavior. In vim since middle finger -goes up on k and index finger goes down on j, next/prev track is k/j respectively. ,/m changes volume up/down -respectively while toggled to the media layer. diff --git a/keyboards/hhkb/keymaps/blakedietz/config.h b/keyboards/hhkb/keymaps/blakedietz/config.h deleted file mode 100644 index e0d2bce0f1..0000000000 --- a/keyboards/hhkb/keymaps/blakedietz/config.h +++ /dev/null @@ -1,24 +0,0 @@ -// Based off of this section: -// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file -#ifndef CONFIG_BLAKEDIETZ_H -#define CONFIG_BLAKEDIETZ_H - -// Bring in original defaults -#include "../../config.h" - -// Define mousekey settings -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 2 -#define MOUSEKEY_TIME_TO_MAX 5 -#define MOUSEKEY_WHEEL_DELAY 0 - -// Set up tapdance functionality -//#define TAPPING_TOGGLE 1 -// TAPPING_TERM is set in config.h this defaults to 200 - -// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when -// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT - -#endif diff --git a/keyboards/hhkb/keymaps/blakedietz/keymap.c b/keyboards/hhkb/keymaps/blakedietz/keymap.c deleted file mode 100644 index a9146a4a08..0000000000 --- a/keyboards/hhkb/keymaps/blakedietz/keymap.c +++ /dev/null @@ -1,125 +0,0 @@ -#include QMK_KEYBOARD_H - -// Layer names -#define BASE 0 -#define DEV 1 -#define MOUSE 2 -#define MEDIA 3 - -// Required for leader function. Measured in ms -// #define LEADER_TIMEOUT 300 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* BASE Level: Default Layer - |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| - | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |Lead| - |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | \ | - |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| - | Esc/Hyper | A | S | D | F | G | H | J | K | L |;/Media| ' | Enter | | | - |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| - | Shift | Z/Ctl | X/Alt | C/Gui | V | B | N | M | ,/Gui | ./Alt | //Ctl | Shift | Dev | | | - |-----------+-------+--------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+------+----| - TODO: Maybe add a photoshop layer for when I need to hold spacebar down. Maybe just make it a layer that you - |------+------+-----------------------+------+------| - | Dev |Mouse | ******* Space ******* | Dev |Mouse | - |------+------+-----------------------+------+------| - */ - - [BASE] = LAYOUT( // 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_BSPC, KC_LEAD, - 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, - ALL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MEDIA, KC_SCLN), KC_QUOT, ALL_T(KC_ENT), - KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), GUI_T(KC_C), KC_V, KC_B, KC_N, KC_M, GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, TG(DEV), - TG(DEV), TG(MOUSE), LT(DEV, KC_SPC), TG(MOUSE), TG(DEV)), - - /* Layer DEV: DEV mode (DEV Fn) - TODO: Add a cmd/tab function to the developer layer for quick switching between different applications when debugging - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | F1 | F2 | F3 | F4 | F5 | Left | Down | Up | Right | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - */ - - [DEV] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - /* Layer MOUSE: MOUSE mode (MOUSE Fn) - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - */ - - [MOUSE] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_WH_U, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - /* Layer MEDIA: mode (Hold Semi-colon) - |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | | | | | | | | | - |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | Previous | Next | | Play/Pause | | | | | - |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | | | | | | | | Volume Down | Volume Up | Mute | | | | | | - |------+-----+-----+-----+----+----+----+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - - */ - - [MEDIA] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_MUTE, KC_TRNS, KC_MPLY, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, TG(DEV), - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; - -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; -}; diff --git a/keyboards/hhkb/keymaps/blakedietz/rules.mk b/keyboards/hhkb/keymaps/blakedietz/rules.mk deleted file mode 100644 index 7d97e7a524..0000000000 --- a/keyboards/hhkb/keymaps/blakedietz/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -TAP_DANCE_ENABLE = no -UNICODE_ENABLE = no -LEADER_ENABLE = yes diff --git a/keyboards/hhkb/keymaps/brett/config.h b/keyboards/hhkb/keymaps/brett/config.h deleted file mode 100644 index b9a61e10a7..0000000000 --- a/keyboards/hhkb/keymaps/brett/config.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -// Define mousekey settings -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 2 -#define MOUSEKEY_TIME_TO_MAX 5 -#define MOUSEKEY_WHEEL_DELAY 0 - -#define LSPO_KEY KC_9 -#define RSPC_KEY KC_0 -#define LSPO_MOD KC_LSHIFT -#define RSPC_MOD KC_RSHIFT - -// This makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when -// you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/hhkb/keymaps/brett/keymap.c b/keyboards/hhkb/keymaps/brett/keymap.c deleted file mode 100644 index 1201146b00..0000000000 --- a/keyboards/hhkb/keymaps/brett/keymap.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * Brettm12345 HHKB Layout - */ -#include QMK_KEYBOARD_H -#include "brett.h" - -enum layers { - BASE = 0, - HHKB = 1, - PROG = 2, - MOUSE = 3 -}; - -// Tap for tab hold for MOUSE -#define TAB_MOUSE LT(MOUSE, KC_TAB) - -// Tap for space hold for PROG -#define SPACE_PROG LT(PROG, KC_SPC) - -// Tap for ESC hold for CTRL -#define CTL_ESC CTL_T(KC_ESC) - -// Tab for ; hold for PROG -#define PROG_SCLN LT(PROG, KC_SCLN) - -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 | [ | ] | Backspace | * | - |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---| - | Control | A | S | D | F | G | H | J | K | L | ; | ' | Return | ****** | * | - |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---| - | LShift | Z | X | C | V | B | N | M | , | . | / | RShift | HHKB | ****** | * | - |---------+---+---+---+---+---+---+---+---+---+---+--------+--------+-----------+---| - - |------+------+----------------------------+------+------| - | LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt | - |------+------+----------------------------+------+------| - */ - - [BASE] = LAYOUT( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, - TAB_MOUSE, 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, PROG_SCLN, KC_QUOT, KC_ENT, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(HHKB), - KC_LALT, KC_LGUI, SPACE_PROG, KC_RGUI, KC_RALT), - - /* HHKB Level: Function Layer - |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| - | Flash | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | - |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| - | Caps | Calc | Mail | Media | Browser | My PC | Browser | u | i | o | Print | [ | ] | Backsp | * | - | | | | Player | Refresh | | Favorites | | | | Screen | | | | | - |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| - | Control | Prev | Next | Find | f | g | Browser | Browser | Browser | Browser | ; | ' | Exec | ****** | * | - | | | | | | | Back | Home | Search | Forward | | | | | | - |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| - | LShift | Vol+ | Vol- | Mute | Select | b | n | m | , | Again | Browser Search | RShift | HHKB | ****** | * | - |---------+------+------+--------+---------+-------+-----------+---------+---------+---------+----------------+--------+------+--------+-----| - - |------+------+----------------------+------+------| - | Menu | LGUI | ******* Play ******* | RGUI | Menu | - |------+------+----------------------+------+------| - */ - [HHKB] = LAYOUT( - FLASH, 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_CALC, KC_MAIL, KC_MSEL, KC_WREF, KC_MYCM, KC_WFAV, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_BSPC, - KC_TRNS, KC_MPRV, KC_MNXT, KC_FIND, KC_TRNS, KC_TRNS, KC_WBAK, KC_WHOM, KC_WSCH, KC_WFWD, KC_TRNS, KC_TRNS, KC_EXEC, - KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_SLCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AGIN, KC_WSCH, KC_TRNS, KC_TRNS, - KC_MENU, KC_TRNS, KC_MPLY, KC_TRNS, KC_MENU), - - - /* Programming Level: Symbols Layer - |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| - | Esc | TTY 1 | TTY 2 | TTY 3 | TTY 4 | TTY 5 | TTY 6 | TTY 7 | TTY 8 | TTY 9 | TTY 10 | TTY 11 | TTY 12 | \ | ` | - |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| - | Tab/Mouse | => | @ | >>= | =<< | ‖ | <> | <|> | <*> | <@> | |> | <$ | $> | Backsp | * | - |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| - | Toggle Mouse | -> | * | <$> | <#> | && | Left | Down | Up | Right | :: | ` | Return | ****** | * | - |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| - | LShift | z | x | c | v | b | n | m | <- | -> | <> | Shift | HHKB | ****** | * | - |--------------+-------+-------+-------+-------+-------+-------+-------+-------+-------+--------+--------+--------+--------+---| - - |------+------+----------------------------+------+------| - | LAlt | LGUI | ******* Space/Prog ******* | RGUI | RAlt | - |------+------+----------------------------+------+------| - */ - [PROG] = LAYOUT( - KC_GESC, LCA(KC_F1), LCA(KC_F2), LCA(KC_F3), LCA(KC_F4), LCA(KC_F5), LCA(KC_F6), LCA(KC_F7), LCA(KC_F8), LCA(KC_F9), LCA(KC_F10), LCA(KC_F11), LCA(KC_F12), KC_TRNS, KC_TRNS, - KC_TRNS, FAT_ARROW, KC_AT, BIND, BIND_FLIPPED, OR, CONCAT, ALT, APPLY, FLAP, PIPE, VOID_LEFT, VOID_RIGHT, KC_TRNS, - TG(MOUSE), SKINNY_ARROW, KC_ASTR, MAP, MAP_FLIPPED, AND, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, DOUBLE_COLON, KC_GRV, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, REVERSE_ARROW, SKINNY_ARROW, CONCAT, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - - /* Mouse Level: Mouse Layer - |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| - | Esc | Speed 1 | Speed 2 | Speed 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| - | Mouse(Tab) | Q | Up | Button3 | Button4 | Button5 | Y | U | Button3 | Button4 | Button5 | [ | ] | Backsp | * | - |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| - | Control(Esc) | Left | Down | Right | Button1 | Button2 | SLeft | SDown | SUp | SRight | Button1 | Button2 | Control(Return) | ****** | * | - |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| - | LShift(() | Z | X | C | V | B | N | M | Button5 | Button4 | Button3 | RShift()) | HHKB | ****** | * | - |--------------+---------+---------+---------+---------+---------+-------+-------+---------+---------+---------+-----------+-----------------+--------+---| - - |---------+---------+----------------------------+---------+---------| - | LAlt([) | LGUI({) | ******* Space/Prog ******* | RGUI(}) | RAlt(]) | - |---------+---------+----------------------------+---------+---------| - */ - [MOUSE] = LAYOUT( - KC_TRNS, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_MS_U, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_BTN3, KC_BTN4, KC_BTN5, KC_TRNS, KC_TRNS, KC_TRNS, - TG(MOUSE), KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN1, KC_BTN2, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; diff --git a/keyboards/hhkb/keymaps/brett/readme.md b/keyboards/hhkb/keymaps/brett/readme.md deleted file mode 100644 index fd07b155fb..0000000000 --- a/keyboards/hhkb/keymaps/brett/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generated Keymap Layout - -This layout was generated by the QMK API. You can find the JSON data used to -generate this keymap in the file layers.json. - -To make use of this file you will need follow the following steps: - -* Download or Clone QMK Firmware: -* Extract QMK Firmware to a location on your hard drive -* Copy this folder into %s -* You are now ready to compile or use your keymap with the source - -More information can be found in the QMK docs: \ No newline at end of file diff --git a/keyboards/hhkb/keymaps/brett/rules.mk b/keyboards/hhkb/keymaps/brett/rules.mk deleted file mode 100644 index 88f57515f1..0000000000 --- a/keyboards/hhkb/keymaps/brett/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -MOUSEKEY_ENABLE = yes -TAP_DANCE_ENABLE = no -LEADER_ENABLE = no -UNICODE_ENABLE = no diff --git a/keyboards/hhkb/keymaps/cinaeco/README.md b/keyboards/hhkb/keymaps/cinaeco/README.md deleted file mode 100644 index c1c48e6093..0000000000 --- a/keyboards/hhkb/keymaps/cinaeco/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# QMK Keyboard Firmware for HHKB - -## Modifications - -### HHKB Fn Layer - -Added some Media keys. - -### Utility Layer (SpaceFN) - -Hold `Space` for: - -- Vi-style direction keys. -- WASD-style mouse keys. -- Dynamic macro playback on `1` and `2`. -- Qwerty/Colemak/Dvorak layout selection on `-`, `=` and `\ ` - -### Dynamic Macros - -Hold `q` and press: - -- `1` or `2` to record macro 1 or 2. -- `s` to stop recording. diff --git a/keyboards/hhkb/keymaps/cinaeco/config.h b/keyboards/hhkb/keymaps/cinaeco/config.h deleted file mode 100644 index c7b4c784c0..0000000000 --- a/keyboards/hhkb/keymaps/cinaeco/config.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef CONFIG_CINAECO_H -#define CONFIG_CINAECO_H - -#include "../../config.h" - -#undef MANUFACTURER -#undef PRODUCT -#undef DESCRIPTION -#define MANUFACTURER QMK -#define PRODUCT HHKB QMK cinaeco -#define DESCRIPTION HHKB on QMK Firmware with cinaeco keymap - -// Increase "Tap" detection window. Avoid missing 'q' or 'z' when typing slowly. -#undef TAPPING_TERM -#define TAPPING_TERM 230 - -// Uncomment to enable NKRO by default. May cause issues with KVM switches. -//#define FORCE_NKRO - -#endif diff --git a/keyboards/hhkb/keymaps/cinaeco/keymap.c b/keyboards/hhkb/keymaps/cinaeco/keymap.c deleted file mode 100644 index c27e37d8a0..0000000000 --- a/keyboards/hhkb/keymaps/cinaeco/keymap.c +++ /dev/null @@ -1,178 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * cinaeco's HHKB Layout - */ -#include QMK_KEYBOARD_H - -// Layers. -#define QWER 0 -#define COLE 1 -#define DVOR 2 -#define HHKB 3 -#define UTIL 4 -#define MREC 5 - -// Easier-to-read Layer Arrays. -#define ____ KC_TRNS - -enum hhkb_keycodes -{ - DYNAMIC_MACRO_RANGE = SAFE_RANGE, -}; - -#include "dynamic_macro.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* QWER Layer: Qwerty Default - * - * ,--------------------------------------------------------------. - * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |--------------------------------------------------------------| - * |Tab |Q/MREC| W| E| R| T| Y| U| I| O| P| [| ]|Backs| - * |--------------------------------------------------------------| - * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Ent/Ctrl| - * |--------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| - * `--------------------------------------------------------------' - * |Alt|Gui | Space/UTIL |Gui |Alt| - * `-------------------------------------------' - * - */ - - [QWER] = LAYOUT( - 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, LT(MREC, 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, CTL_T(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(HHKB), - KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), - - /* COLE Layer: Colemak - * - * ,--------------------------------------------------------------. - * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |--------------------------------------------------------------| - * |Tab |Q/MREC| W| F| P| G| J| L| U| Y| ;| [| ]|Backs| - * |--------------------------------------------------------------| - * |Ctrl | A| R| S| T| D| H| N| E| I| O| '|Ent/Ctrl| - * |--------------------------------------------------------------| - * |Shift | Z| X| C| V| K| B| M| ,| .| /|Shift |Fn0| - * `--------------------------------------------------------------' - * |Alt|Gui | Space/UTIL |Gui |Alt| - * `-------------------------------------------' - * - */ - - [COLE] = LAYOUT( - 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, LT(MREC, KC_Q), KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, CTL_T(KC_ENT), - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_K, KC_B, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), - KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), - - /* DVOR Layer: Dvorak - * - * ,--------------------------------------------------------------. - * |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| - * |--------------------------------------------------------------| - * |Tab |'/MREC| ,| .| P| Y| F| G| C| R| L| /| =|Backs| - * |--------------------------------------------------------------| - * |Ctrl | A| O| E| U| I| D| H| T| N| S| -|Ent/Ctrl| - * |--------------------------------------------------------------| - * |Shift | ;| Q| J| K| X| B| M| W| V| Z|Shift |Fn0| - * `--------------------------------------------------------------' - * |Alt|Gui | Space/UTIL |Gui |Alt| - * `-------------------------------------------' - * - */ - - [DVOR] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, - KC_TAB, LT(MREC, 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_BSPC, - KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, CTL_T(KC_ENT), - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), - KC_LALT, KC_LGUI, LT(UTIL, KC_SPC), KC_RGUI, KC_RALT), - - /* HHKB Layer: HHKB mode (HHKB Fn) - * - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps |PLA|PRV|NXT| | | | |Psc|Slk|Pus|Up | |Backs| - * |-----------------------------------------------------------| - * | |VoD|VoU|Mut|Ejc| | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * | | | | | | | +| -|End|PgD|Dow| | | - * `-----------------------------------------------------------' - * | | | |STOP | | - * `-------------------------------------------' - */ - - [HHKB] = LAYOUT( - 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_MPLY, KC_MPRV, KC_MNXT, ____, ____, ____, ____, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ____, KC_BSPC, - ____, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, ____, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, - ____, ____, ____, ____, ____, ____, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ____, ____, - ____, ____, ____, KC_MSTP, ____), - - /* UTIL Layer: Extra utilities - * - * ,-------------------------------------------------------------. - * |DFU|PLY1|PLY2| | | | | | | | |QWE|COL|DVO|DBG| - * |-------------------------------------------------------------| - * | |MLB |M-Up|MRB|MwU| |Hom|PgD|PgU|End| | | | | - * |-------------------------------------------------------------| - * | |M-Lt|M-Dn|M-R|MwD| |LEF|DOW|UP |RIG| | | | - * |-------------------------------------------------------------| - * | | | | | |SPC| | | | | | | | - * `-------------------------------------------------------------' - * | | | | | | - * `-------------------------------------------' - * - */ - - [UTIL] = LAYOUT( - RESET, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, ____, ____, ____, ____, ____, ____, ____, ____, DF(QWER), DF(COLE), DF(DVOR), DEBUG, - ____, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, ____, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ____, ____, ____, ____, - ____, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, ____, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ____, ____, ____, - ____, ____, ____, ____, ____, KC_SPC, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____), - - /* MREC Layer: Record macros with `q` - * - * ,-------------------------------------------------------------. - * | |REC1|REC2| | | | | | | | | | | | | - * |-------------------------------------------------------------| - * | | | | | | | | | | | | | | | - * |-------------------------------------------------------------| - * | | |RSTP| | | | | | | | | | | - * |-------------------------------------------------------------| - * | | | | | | | | | | | | | | - * `-------------------------------------------------------------' - * | | | | | | - * `-------------------------------------------' - * - */ - - [MREC] = LAYOUT( - ____, DYN_REC_START1, DYN_REC_START2, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, DYN_REC_STOP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, - ____, ____, ____, ____, ____) - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - -// For Dynamic Macros. -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - if (!process_record_dynamic_macro(keycode, record)) - { - return false; - } - return true; -} diff --git a/keyboards/hhkb/keymaps/cinaeco/rules.mk b/keyboards/hhkb/keymaps/cinaeco/rules.mk deleted file mode 100644 index a85669aa2f..0000000000 --- a/keyboards/hhkb/keymaps/cinaeco/rules.mk +++ /dev/null @@ -1,20 +0,0 @@ -# cinaeco's HHKB firmware - -# 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. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c deleted file mode 100644 index e230a87fb2..0000000000 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * dbroqua HHKB Layout - */ -#include QMK_KEYBOARD_H - -enum planck_layers { - _DEFAULT, - _ALTERNATE, - _FN -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* BASE layer: Default Layer - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | - * +-----------------------------------------------------------------------------------------+ - * | Alt | Gui | Space | Gui |RCtrl| - * `----------------------------------------------------------------´ - */ - [_DEFAULT] = LAYOUT( - 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, MO(_FN), - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RCTL), - /* Alternamte layer: swap alt/gui - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | fn | - * +-----------------------------------------------------------------------------------------+ - * | Gui | Alt | Space | AltGr |RCtrl| - * `----------------------------------------------------------------´ - */ - [_ALTERNATE] = LAYOUT( - 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, MO(_FN), - KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RCTL), - - /* FN Layer - * ,-----------------------------------------------------------------------------------------. - * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| - * |-----------------------------------------------------------------------------------------+ - * | Caps | | | | | | | |PrtSc| Slck| Paus| Up | | | - * |-----------------------------------------------------------------------------------------+ - * | | Vol-| Vol+| Mute|Eject| | * | / | Home| PgUp| Left |Right| | - * |-----------------------------------------------------------------------------------------+ - * | | Prev| Play| Next| | | + | - | End |PgDwn| Down| | | - * +-----------------------------------------------------------------------------------------+ - * | | | Adjust | Stop | | - * `----------------------------------------------------------------´ - */ - [_FN] = LAYOUT( - 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_TRNS, - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, - DF(_DEFAULT), DF(_ALTERNATE), KC_TRNS, KC_MSTP, KC_TRNS)}; - -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; -}; diff --git a/keyboards/hhkb/keymaps/dbroqua/readme.md b/keyboards/hhkb/keymaps/dbroqua/readme.md deleted file mode 100644 index 3b8950fee0..0000000000 --- a/keyboards/hhkb/keymaps/dbroqua/readme.md +++ /dev/null @@ -1,26 +0,0 @@ -# Dbroqua Layout - -* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01 - -## Switch layout - -Default bottom layer: - -* LALT / LGUI / SPACE / RGUI / RCTRL - -Alternate bottom layer: - -* LGUI / LALT / SPACE / RALT / RCTRL - -To switch from default to alternate (or alternate to default) simple press FN + (LALT/LGUI). - - -## Media keys : - -* fn + a = vol_dn -* fn + s = vol_up -* fn + d = mute -* fn + z = previous song -* fn + x = play/pause -* fn + c = next song -* fn + (RGUI/RALT) = stop diff --git a/keyboards/hhkb/keymaps/default/keymap.c b/keyboards/hhkb/keymaps/default/keymap.c deleted file mode 100644 index c63ef6a579..0000000000 --- a/keyboards/hhkb/keymaps/default/keymap.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * default HHKB Layout - */ -#include QMK_KEYBOARD_H - -#define BASE 0 -#define HHKB 1 - -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] = LAYOUT( // default layer - 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, MO(HHKB), - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, 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] = LAYOUT( - 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)}; diff --git a/keyboards/hhkb/keymaps/dhertz/config.h b/keyboards/hhkb/keymaps/dhertz/config.h deleted file mode 100644 index af2fb9d8a5..0000000000 --- a/keyboards/hhkb/keymaps/dhertz/config.h +++ /dev/null @@ -1 +0,0 @@ -#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.c b/keyboards/hhkb/keymaps/dhertz/keymap.c deleted file mode 100644 index 951af069b0..0000000000 --- a/keyboards/hhkb/keymaps/dhertz/keymap.c +++ /dev/null @@ -1,84 +0,0 @@ -#include QMK_KEYBOARD_H -#include "keymap.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Del|Bsp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter | - * |------------------------------------------------------` | - * |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /| `|Up |Shi| - * |-----------------------------------------------------------| - * |NCt|| #|Alt|CmT|CmT| LyrSpc |CGv|Iso|Gui|CSL||Rig|Dow|Lef| - * `-----------------------------------------------------------' - */ - [0] = LAYOUT_JP( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL, KC_DEL,KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, - SRCH_CTL, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT, KC_SLSH,KC_NUBS, KC_UP, KC_RSFT, - NC_CTL, HSH_TLD,KC_LALT,CMD_TAB_CMD,CMD_TAB_CMD, LT(2, KC_SPC) , CMD_GRV_CMD, ISO_COUNTRY_CODE,KC_RGUI, CMD_SFT_L, KC_LEFT,KC_DOWN,KC_RGHT - ), - - /* Layer 1: iPad mode (Fixed) - * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | | | | | | | | | | | | | | | - * |------------------------------------------------------` | - * |CmdSpc| | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| - * | || ~| |CAD| | |CmH| | | || | | | - * `-----------------------------------------------------------' - */ - [1] = LAYOUT_JP( - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, - CMD_SPC,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_D,KC_TRNS, KC_TRNS ,CMD_H,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS - ), - - /* Layer 2: HHKB mode (Space) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps |DL0|DL1| | | | | |Psc|Slk|Pus|Up | | | - * |------------------------------------------------------` | - * | |VoD|VoU|Mut| | | |Bsp|Del|CSL|Lef|Rig| | | - * |-----------------------------------------------------------| - * | | | |CAC| | | | | | |Dow| |PgU| | - * |-----------------------------------------------------------| - * | || ~| | | | | | | | ||Hom|PgD|End| - * `-----------------------------------------------------------' - */ - [2] = LAYOUT_JP( - 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, DF(0), DF(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,KC_TRNS, - KC_TRNS, KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_TRNS,KC_BSPC, KC_DEL,CMD_SFT_L,KC_LEFT,KC_RGHT,KC_TRNS,KC_PENT, - KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_C,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DOWN,KC_TRNS,KC_PGUP,KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN, KC_END - ), -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case CMD_SPC: - mod_or_mod_with_macro(record, KC_LGUI, " "); - break; - case CMD_H: - mod_or_mod_with_macro(record, KC_RGUI, "H"); - break; - case CMD_ALT_D: - mod_or_mod_with_macro(record, KC_LGUI, SS_LALT("D")); - break; - default: - return true; - } - return false; -} diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.h b/keyboards/hhkb/keymaps/dhertz/keymap.h deleted file mode 100644 index dbefc63800..0000000000 --- a/keyboards/hhkb/keymaps/dhertz/keymap.h +++ /dev/null @@ -1,7 +0,0 @@ -#include "dhertz.h" - -enum dhertz_keycodes { - CMD_SPC = NEW_SAFE_RANGE, - CMD_H, - CMD_ALT_D, -}; diff --git a/keyboards/hhkb/keymaps/dhertz/rules.mk b/keyboards/hhkb/keymaps/dhertz/rules.mk deleted file mode 100644 index 5656057b43..0000000000 --- a/keyboards/hhkb/keymaps/dhertz/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -OPT_DEFS += -DHHKB_JP - diff --git a/keyboards/hhkb/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/keymaps/enoch_jp/keymap.c deleted file mode 100644 index 15dc29773b..0000000000 --- a/keyboards/hhkb/keymaps/enoch_jp/keymap.c +++ /dev/null @@ -1,71 +0,0 @@ -#include QMK_KEYBOARD_H - -/* Layer 0: HHKB JP -* ,-----------------------------------------------------------. -* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| -* |-----------------------------------------------------------| -* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | -* |------------------------------------------------------` Ent| -* |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | -* |-----------------------------------------------------------| -* |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| -* |-----------------------------------------------------------| -* | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| -* `-----------------------------------------------------------' -*/ - -/* Layer 1: HHKB mode (HHKB Fn) -* ,-----------------------------------------------------------. -* |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| -* |-----------------------------------------------------------| -* |Caps |MPrev|MPlay|MNext| | | | |Psc|Slk|Pus|Up | | -* |------------------------------------------------------` | -* | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | -* |-----------------------------------------------------------| -* | | | | | | | +| -|End|PgD|Dow| | | | -* |-----------------------------------------------------------| -* | || | | | | | | | | || | | | -* `-----------------------------------------------------------' -*/ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( - 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_GRAVE, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, 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, KC_UP, KC_BSLS, - KC_BSPC, KC_ZKHK, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_BSPC, KC_RSFT, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - - [1] = LAYOUT_JP( - _______, 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_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - -/*void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_RSFT) { - register_code(KC_S); - unregister_code(KC_S); - } - SEQ_TWO_KEYS(KC_A, KC_S) { - register_code(KC_H); - unregister_code(KC_H); - } - SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { - register_code(KC_LGUI); - register_code(KC_S); - unregister_code(KC_S); - unregister_code(KC_LGUI); - } - } -}*/ diff --git a/keyboards/hhkb/keymaps/enoch_jp/rules.mk b/keyboards/hhkb/keymaps/enoch_jp/rules.mk deleted file mode 100644 index d35c58b777..0000000000 --- a/keyboards/hhkb/keymaps/enoch_jp/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -NKRO_ENABLE = yes - -OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/eric/keymap.c b/keyboards/hhkb/keymaps/eric/keymap.c deleted file mode 100644 index bf788b2ffd..0000000000 --- a/keyboards/hhkb/keymaps/eric/keymap.c +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * default HHKB Layout - */ -#include QMK_KEYBOARD_H - -#define BASE 0 -#define HHKB 1 - -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] = LAYOUT( // default layer - 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, MO(HHKB), - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), - - /* Layer HHKB: HHKB mode (HHKB Fn) - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | | PgU | Up | PgD | Hm | & | ~ | | | | Psc | Up | Del | Backs | | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | | Lef | Dow | Rig | En | * | | | PgU | Hom | Lef | Rig | Enter | | | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | | _ | + | ( | ) | | | | | PgD | End | Dow | | | | | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - - */ - - [HHKB] = LAYOUT( - 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_F12, KC_INS, KC_DEL, - KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS, - KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; - -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; -}; diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md b/keyboards/hhkb/keymaps/halfqwerty_jp/README.md deleted file mode 100644 index 222ad898ef..0000000000 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# harfqwerty_jp - -half-QWERTY is a keyboard layout for one-handed typing on QWERTY keyboard. - -* When hold space bar, the keyboard enters mirror mode. -* To type a space, just tap the space bar. - -## BASE - - ,-----------------------------------------------------------. - |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| - |-----------------------------------------------------------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | - |------------------------------------------------------` Ent| - |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | - |-----------------------------------------------------------| - |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| - |-----------------------------------------------------------| - | ||Ctl|Alt|Cmd| | Spc | | | | ||Lft|Dwn|Rgh| - `-----------------------------------------------------------' - -## HHKB mode (HHKB Fn) - - ,-----------------------------------------------------------. - |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - |-----------------------------------------------------------| - |Caps | | | | | | | |Psc|Slk|Pus|Up | | | - |------------------------------------------------------` | - | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | - |-----------------------------------------------------------| - | | | | | | | +| -|End|PgD|Dow| | | | - |-----------------------------------------------------------| - | || | | | | | | | | || | | | - `-----------------------------------------------------------' - - -## Mirror mode - - ,-----------------------------------------------------------. - | | 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | | | - |-----------------------------------------------------------| - | | P| O| I| U| Y| T| R| E| W| Q| | | | - |------------------------------------------------------` | - | | ;| L| K| J| H| G| F| D| S| A| | | | - |-----------------------------------------------------------| - | | .| ,| M| N| B| V| C| X| Z| | | | | - |-----------------------------------------------------------| - | || | | | | | | | | || | | | - `-----------------------------------------------------------' diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c b/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c deleted file mode 100644 index 0d4a24c60d..0000000000 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/keymap.c +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * default HHKB Layout - */ -#include QMK_KEYBOARD_H - -enum -{ - BASE, - HHKB, - MIRROR, -}; - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* BASE Level: Default Layer - ,-----------------------------------------------------------. - |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| - |-----------------------------------------------------------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | - |------------------------------------------------------` Ent| - |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | - |-----------------------------------------------------------| - |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| - |-----------------------------------------------------------| - | ||Ctl|Alt|Cmd| | Spc | | | | ||Lft|Dwn|Rgh| - `-----------------------------------------------------------' - */ - [BASE] = LAYOUT_JP( - 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_JYEN, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, - MO(HHKB), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, LT(MIRROR, KC_SPC), KC_HENK, KC_KANA, KC_RALT, MO(HHKB), KC_LEFT, KC_DOWN, KC_RGHT), - - /* 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 | | | - |------------------------------------------------------` | - | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | - |-----------------------------------------------------------| - | | | | | | | +| -|End|PgD|Dow| | | | - |-----------------------------------------------------------| - | || | | | | | | | | || | | | - `-----------------------------------------------------------' - */ - - [HHKB] = LAYOUT_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - /* Mirror Level: when hold space bar - ,-----------------------------------------------------------. - | | 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | | | - |-----------------------------------------------------------| - | | P| O| I| U| Y| T| R| E| W| Q| | | | - |------------------------------------------------------` | - | | ;| L| K| J| H| G| F| D| S| A| | | | - |-----------------------------------------------------------| - | | .| ,| M| N| B| V| C| X| Z| | | | | - |-----------------------------------------------------------| - | || | | | | | | | | || | | | - `-----------------------------------------------------------' - */ - [MIRROR] = LAYOUT_JP( - _______, KC_0, KC_9, KC_8, KC_7, KC_6, KC_5, KC_4, KC_3, KC_2, KC_1, _______, _______, _______, _______, - _______, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_T, KC_R, KC_E, KC_W, KC_Q, _______, _______, - _______, KC_SCLN, KC_L, KC_K, KC_J, KC_H, KC_G, KC_F, KC_D, KC_S, KC_A, _______, _______, _______, - _______, KC_DOT, KC_COMM, KC_M, KC_N, KC_B, KC_V, KC_C, KC_X, KC_Z, _______, _______, _______, _______, - _______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, _______, _______)}; - diff --git a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk b/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk deleted file mode 100644 index a7f700f019..0000000000 --- a/keyboards/hhkb/keymaps/halfqwerty_jp/rules.mk +++ /dev/null @@ -1 +0,0 @@ -OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/jp/keymap.c b/keyboards/hhkb/keymaps/jp/keymap.c deleted file mode 100644 index 6fd06638ce..0000000000 --- a/keyboards/hhkb/keymaps/jp/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -#include QMK_KEYBOARD_H - -/* Layer 0: HHKB JP - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | - * |------------------------------------------------------` Ent| - * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | - * |-----------------------------------------------------------| - * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| - * |-----------------------------------------------------------| - * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| - * `-----------------------------------------------------------' - */ - -/* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | - * |------------------------------------------------------` | - * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | - * |-----------------------------------------------------------| - * | | | | | | | +| -|End|PgD|Dow| | | | - * |-----------------------------------------------------------| - * | || | | | | | | | | || | | | - * `-----------------------------------------------------------' - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( - 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_JYEN, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, - MO(1), KC_ZKHK, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_KANA, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - - [1] = LAYOUT_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) -{ - return MACRO_NONE; -} diff --git a/keyboards/hhkb/keymaps/jp/rules.mk b/keyboards/hhkb/keymaps/jp/rules.mk deleted file mode 100644 index a7f700f019..0000000000 --- a/keyboards/hhkb/keymaps/jp/rules.mk +++ /dev/null @@ -1 +0,0 @@ -OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/keymaps/jp_mac/keymap.c deleted file mode 100644 index f3ef3d6af6..0000000000 --- a/keyboards/hhkb/keymaps/jp_mac/keymap.c +++ /dev/null @@ -1,49 +0,0 @@ -#include QMK_KEYBOARD_H - -/* Layer 0: HHKB JP - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | - * |------------------------------------------------------` Ent| - * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | - * |-----------------------------------------------------------| - * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| - * |-----------------------------------------------------------| - * |Fn|`|Ctl|Cmd|Opt|Hnk| Spc |Mhk|Cmd|Opt| Fn||Lft|Dwn|Rgh| - * `-----------------------------------------------------------' - */ - -/* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | - * |------------------------------------------------------` | - * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | - * |-----------------------------------------------------------| - * | | | | | | | +| -|End|PgD|Dow| | | | - * |-----------------------------------------------------------| - * | || | | | | | | | | ||Del| | | - * `-----------------------------------------------------------' - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_JP( - 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_JYEN, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, - MO(1), KC_GRV, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_HENK, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), - - [1] = LAYOUT_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______)}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) -{ - return MACRO_NONE; -} diff --git a/keyboards/hhkb/keymaps/jp_mac/rules.mk b/keyboards/hhkb/keymaps/jp_mac/rules.mk deleted file mode 100644 index a7f700f019..0000000000 --- a/keyboards/hhkb/keymaps/jp_mac/rules.mk +++ /dev/null @@ -1 +0,0 @@ -OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/krusli/config.h b/keyboards/hhkb/keymaps/krusli/config.h deleted file mode 100644 index af2fb9d8a5..0000000000 --- a/keyboards/hhkb/keymaps/krusli/config.h +++ /dev/null @@ -1 +0,0 @@ -#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/hhkb/keymaps/krusli/keymap.c b/keyboards/hhkb/keymaps/krusli/keymap.c deleted file mode 100644 index af6102f108..0000000000 --- a/keyboards/hhkb/keymaps/krusli/keymap.c +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * default HHKB Layout - */ -#include QMK_KEYBOARD_H - -#define BASE 0 -#define HHKB 1 - -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] = LAYOUT( // default layer - 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, MO(HHKB), - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, 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] = LAYOUT( - 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)}; - -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; -}; diff --git a/keyboards/hhkb/keymaps/lxol/keymap.c b/keyboards/hhkb/keymaps/lxol/keymap.c deleted file mode 100644 index 3e3b3d2ed0..0000000000 --- a/keyboards/hhkb/keymaps/lxol/keymap.c +++ /dev/null @@ -1,204 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * lxol HHKB Layout - */ -#include QMK_KEYBOARD_H - -#define BASE 0 -#define WIN 1 -#define HHKB 2 -#define RGUILEV 3 -#define LGUILEV 4 -#define RALTLEV 5 -#define LALTLEV 6 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Layer 0: 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 | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Contro | A | S | D | F | G | H | J | K | L | ; | ' | RCtl/Ent | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - - |------+------+-------+------+------| - | LAlt | LGUI | Space | RGUI | RAlt | - |------+------+-------+------+------| - */ - - [BASE] = LAYOUT( // layer 0 : default - - 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, LT(LALTLEV, KC_A), LT(LGUILEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RGUILEV, KC_L), LT(RALTLEV, KC_SCLN), KC_QUOT, KC_FN0, - 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(HHKB), - KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT), - - /* Layer 1: 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] = LAYOUT( - 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), - - /* Layer LGUI: All keys with RGUI modifier - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - - |------+------+-------+------+------| - | LAlt | LGUI | Space | RGUI | RAlt | - |------+------+-------+------+------| - */ - - [RGUILEV] = LAYOUT( // Right GUI layer by KC_L - - RGUI(KC_ESC), RGUI(KC_1), RGUI(KC_2), RGUI(KC_3), RGUI(KC_4), RGUI(KC_5), RGUI(KC_6), RGUI(KC_7), RGUI(KC_8), RGUI(KC_9), RGUI(KC_0), RGUI(KC_MINS), RGUI(KC_EQL), RGUI(KC_BSLS), RGUI(KC_GRV), - RGUI(KC_TAB), RGUI(KC_Q), RGUI(KC_W), RGUI(KC_E), RGUI(KC_R), RGUI(KC_T), RGUI(KC_Y), RGUI(KC_U), RGUI(KC_I), RGUI(KC_O), RGUI(KC_P), RGUI(KC_LBRC), RGUI(KC_RBRC), RGUI(KC_BSPC), - RGUI(KC_LCTL), RGUI(KC_A), RGUI(KC_S), RGUI(KC_D), RGUI(KC_F), RGUI(KC_G), RGUI(KC_H), RGUI(KC_J), RGUI(KC_K), KC_TRNS, KC_TRNS, RGUI(KC_QUOT), KC_FN0, - RGUI(KC_LSFT), RGUI(KC_Z), RGUI(KC_X), RGUI(KC_C), RGUI(KC_V), RGUI(KC_B), RGUI(KC_N), RGUI(KC_M), RGUI(KC_COMM), RGUI(KC_DOT), RGUI(KC_SLSH), RGUI(KC_RSFT), KC_TRNS, - KC_LALT, KC_LGUI, RGUI(KC_SPC), KC_RGUI, KC_RALT), - - /* Layer LGUI: All keys with LGUI modifier - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - - |------+------+-------+------+------| - | LAlt | LGUI | Space | LGUI | RAlt | - |------+------+-------+------+------| - */ - - [LGUILEV] = LAYOUT( // Right GUI layer by KC_L - - LGUI(KC_ESC), LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), LGUI(KC_MINS), LGUI(KC_EQL), LGUI(KC_BSLS), LGUI(KC_GRV), - LGUI(KC_TAB), LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), LGUI(KC_BSPC), - LGUI(KC_LCTL), KC_TRNS, KC_TRNS, LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), LGUI(KC_SCLN), LGUI(KC_QUOT), KC_FN0, - KC_LSFT, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), KC_RSFT, KC_TRNS, - KC_LALT, KC_LGUI, LGUI(KC_SPC), KC_LGUI, KC_RALT), - - /* Layer LALT: All keys with RALT modifier - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - - |------+------+-------+------+------| - | LAlt | LGUI | Space | RGUI | RAlt | - |------+------+-------+------+------| - */ - - [RALTLEV] = LAYOUT( // Right ALT layer by KC_L - - RALT(KC_ESC), RALT(KC_1), RALT(KC_2), RALT(KC_3), RALT(KC_4), RALT(KC_5), RALT(KC_6), RALT(KC_7), RALT(KC_8), RALT(KC_9), RALT(KC_0), RALT(KC_MINS), RALT(KC_EQL), RALT(KC_BSLS), RALT(KC_GRV), - RALT(KC_TAB), RALT(KC_Q), RALT(KC_W), RALT(KC_E), RALT(KC_R), RALT(KC_T), RALT(KC_Y), RALT(KC_U), RALT(KC_I), RALT(KC_O), RALT(KC_P), RALT(KC_LBRC), RALT(KC_RBRC), RALT(KC_BSPC), - RALT(KC_LCTL), RALT(KC_A), RALT(KC_S), RALT(KC_D), RALT(KC_F), RALT(KC_G), RALT(KC_H), RALT(KC_J), RALT(KC_K), KC_TRNS, KC_TRNS, RALT(KC_QUOT), KC_FN0, - RALT(KC_LSFT), RALT(KC_Z), RALT(KC_X), RALT(KC_C), RALT(KC_V), RALT(KC_B), RALT(KC_N), RALT(KC_M), RALT(KC_COMM), RALT(KC_DOT), RALT(KC_SLSH), RALT(KC_RSFT), KC_TRNS, - KC_LALT, KC_LGUI, RALT(KC_SPC), KC_RGUI, KC_RALT), - - /* Layer LALT: All keys with LALT modifier - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Contro | A | S | D | F | G | H | J | K | | ; | ' | RCtl/Ent | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - | Shift | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0 | | | - |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---| - - |------+------+-------+------+------| - | LAlt | LGUI | Space | LGUI | RAlt | - |------+------+-------+------+------| - */ - - [LALTLEV] = LAYOUT( // Right ALT layer by KC_L - - LALT(KC_ESC), LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), LALT(KC_MINS), LALT(KC_EQL), LALT(KC_BSLS), LALT(KC_GRV), - LALT(KC_TAB), LALT(KC_Q), LALT(KC_W), LALT(KC_E), LALT(KC_R), LALT(KC_T), LALT(KC_Y), LALT(KC_U), LALT(KC_I), LALT(KC_O), LALT(KC_P), LALT(KC_LBRC), LALT(KC_RBRC), LALT(KC_BSPC), - LALT(KC_LCTL), KC_TRNS, KC_TRNS, LALT(KC_D), LALT(KC_F), LALT(KC_G), LALT(KC_H), LALT(KC_J), LALT(KC_K), LALT(KC_L), LALT(KC_SCLN), LALT(KC_QUOT), KC_FN0, - KC_LSFT, LALT(KC_Z), LALT(KC_X), LALT(KC_C), LALT(KC_V), LALT(KC_B), LALT(KC_N), LALT(KC_M), LALT(KC_COMM), LALT(KC_DOT), LALT(KC_SLSH), KC_RSFT, KC_TRNS, - KC_LALT, KC_LGUI, LALT(KC_SPC), KC_LGUI, KC_RALT), - - /* Layer WIN: Win layer - |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| - | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backs | | - |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| - | Contro | A | S | D | F | G | H | J | K | L | ; | ' | RCtl/Ent | | | - |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| - | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | - |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---| - - |------+------+-------+------+------| - | LGui | LAlt | Space | RGui | Ralt | - |------+------+-------+------+------| - */ - - [WIN] = LAYOUT( // BASE level with swapped GUI/ALT - - 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, LT(LGUILEV, KC_A), LT(LALTLEV, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT(RALTLEV, KC_L), LT(RGUILEV, KC_SCLN), KC_QUOT, KC_FN0, - 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(HHKB), - KC_RGUI, KC_RALT, KC_SPC, KC_RALT, KC_RGUI)}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT) // RControl with tap Enter* -}; - -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; -}; diff --git a/keyboards/hhkb/keymaps/mjt/config.h b/keyboards/hhkb/keymaps/mjt/config.h deleted file mode 100644 index 3b8f2e676c..0000000000 --- a/keyboards/hhkb/keymaps/mjt/config.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#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 - -/* - * 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 diff --git a/keyboards/hhkb/keymaps/mjt/keymap.c b/keyboards/hhkb/keymaps/mjt/keymap.c deleted file mode 100644 index e51eb8bf92..0000000000 --- a/keyboards/hhkb/keymaps/mjt/keymap.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * default HHKB Layout - */ -#include QMK_KEYBOARD_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] = LAYOUT( // 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] = LAYOUT( - 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] = LAYOUT( - 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] = LAYOUT( - 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 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; -} diff --git a/keyboards/hhkb/keymaps/mjt/readme.md b/keyboards/hhkb/keymaps/mjt/readme.md deleted file mode 100644 index ff575ce247..0000000000 --- a/keyboards/hhkb/keymaps/mjt/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# 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. diff --git a/keyboards/hhkb/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/keymaps/rdg_jp/keymap.c deleted file mode 100644 index f40df74e87..0000000000 --- a/keyboards/hhkb/keymaps/rdg_jp/keymap.c +++ /dev/null @@ -1,55 +0,0 @@ -#include QMK_KEYBOARD_H - -enum -{ - ZER, - HDN, - OSY -}; - -#define CTL_ESC CTL_T(KC_ESC) -#define SFT_BSP SFT_T(KC_BSPC) - -#define SCRNS3 LGUI(LCTL(LSFT(KC_3))) -#define SCRNS4 LGUI(LCTL(LSFT(KC_4))) - -/* hhkb jp ~ layout - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =|Yen|Bsp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | - * |------------------------------------------------------` Ent| - * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | - * |-----------------------------------------------------------| - * |Shft | Z| X| C| V| B| N| M| ,| .| /| \| Up|Sft| - * |-----------------------------------------------------------| - * | ||Ctl|Alt|Cmd| | Spc |Bsp| | | ||Lft|Dwn|Rgh| - * `-----------------------------------------------------------' - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [ZER] = LAYOUT_JP( - 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_INS, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - 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_GRV, 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_BSLS, KC_UP, KC_RSFT, - MO(HDN), KC_LCTL, KC_LALT, KC_LGUI, MO(HDN), KC_SPC, SFT_BSP, MO(HDN), MO(OSY), KC_NO, KC_LEFT, KC_DOWN, KC_RGHT), - - [HDN] = LAYOUT_JP( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, - _______, KC_TILD, KC_GRV, KC_BSLS, KC_PIPE, KC_MINS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TILD, KC_GRV, _______, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, _______, KC_ENT, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, KC_UNDS, KC_DEL, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), - - [OSY] = LAYOUT_JP( - _______, _______, _______, SCRNS3, SCRNS4, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) -{ - return MACRO_NONE; -} diff --git a/keyboards/hhkb/keymaps/rdg_jp/rules.mk b/keyboards/hhkb/keymaps/rdg_jp/rules.mk deleted file mode 100644 index a7f700f019..0000000000 --- a/keyboards/hhkb/keymaps/rdg_jp/rules.mk +++ /dev/null @@ -1 +0,0 @@ -OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/schaeferdev/README.md b/keyboards/hhkb/keymaps/schaeferdev/README.md deleted file mode 100644 index 15b87c498d..0000000000 --- a/keyboards/hhkb/keymaps/schaeferdev/README.md +++ /dev/null @@ -1,36 +0,0 @@ - # QMK HHKB Keymap: schaeferdev - -This is my QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. - - -## Movement Layer - -The main difference from the Default layer is the introduction of a Movement layer than can be used by holding the right command button. This layer enables to move the mouse and scroll using Page up and Page down. Additionally it allows to use Arrow-keys in VIM-like fashion on hjkl. - -I prefer this movement to the default HHKB FN layer as it allows all my fingers to remain on the home row. - -## Minor Changes - -- swapped Y and Z (as I am German and used to the different order). -- changed position of Delete Key -- both ` and ~ - - -## Setup (for macOS) -```bash -brew tap osx-cross/avr -brew install avr-gcc -brew install dfu-programmer -``` - - -## Flashing - -```bash -make clean -make hhkb:schaeferdev:dfu -``` - - -## Troubleshooting -For some reason I ran into the issue that my CMD key no longer recognized. I am not entirely sure what caused this but the problem occured regardless of the layout I flashed (was also broken for the default hhkb layout). I was able to fix this issue by resetting EEPROM of the keyboard. The easiest way to do this is probably to use the QMK Toolbox. diff --git a/keyboards/hhkb/keymaps/schaeferdev/config.h b/keyboards/hhkb/keymaps/schaeferdev/config.h deleted file mode 100644 index b3c799bb82..0000000000 --- a/keyboards/hhkb/keymaps/schaeferdev/config.h +++ /dev/null @@ -1,9 +0,0 @@ -// Based off of this section: -// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file -#pragma once - -// Define mousekey settings -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_INTERVAL 4 -#define MOUSEKEY_MAX_SPEED 1 -#define MOUSEKEY_TIME_TO_MAX 70 \ No newline at end of file diff --git a/keyboards/hhkb/keymaps/schaeferdev/keymap.c b/keyboards/hhkb/keymaps/schaeferdev/keymap.c deleted file mode 100644 index ea6da450cf..0000000000 --- a/keyboards/hhkb/keymaps/schaeferdev/keymap.c +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * default HHKB Layout - */ -#include QMK_KEYBOARD_H - -#define BASE 0 -#define HHKB 1 -#define MOVEMENT 2 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* BASE Level: Default Layer - |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| - | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backs |Backs| - |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| - | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | | - |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| - |Ctrl/ESC| A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | - |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| - | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | - |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| - |------+------+-----------------------+------+------| - | LAlt | LGUI | ******* Space ******* | MOUSE| RAlt | - |------+------+-----------------------+------+------| - */ - - [BASE] = LAYOUT( // default layer - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - 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, KC_ENT, - KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), - KC_LALT, KC_LCMD, /* */ KC_SPC, /* */ MO(MOVEMENT), KC_RALT), - - /* Layer HHKB: HHKB mode (HHKB Fn) - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | DEL | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - | | | | | | | + | - | End | PgD | Dow | | | | | - |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - */ - - [HHKB] = LAYOUT( - 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_DEL, 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), - - /* Layer MOUSE: MOUSE mode (MOUSE Fn) - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | `~ |ACC1 |ACC2 |ACC3 | | | | | | | | | | DEL | DEL | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | |MBTN2| | up | | PgU| | | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | |MBTN1|right|down |left| PgD| <- | down arrow | up arrow | -> | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - | |MBTN3| | | | | | ~ (N) | | | | | | | | - |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - */ - - [MOVEMENT] = LAYOUT( - KC_GRV, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_BTN2, KC_TRNS, KC_MS_U, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; \ No newline at end of file diff --git a/keyboards/hhkb/keymaps/schaeferdev/rules.mk b/keyboards/hhkb/keymaps/schaeferdev/rules.mk deleted file mode 100644 index 35591533cc..0000000000 --- a/keyboards/hhkb/keymaps/schaeferdev/rules.mk +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes \ No newline at end of file diff --git a/keyboards/hhkb/keymaps/sh_jp/README.md b/keyboards/hhkb/keymaps/sh_jp/README.md deleted file mode 100644 index 4f82f2f4e9..0000000000 --- a/keyboards/hhkb/keymaps/sh_jp/README.md +++ /dev/null @@ -1,86 +0,0 @@ -###Keymaps with both Dvorak layout and QWER layout for HHKB JP. - -1. The default layout is Dvorak. -2. Use `Tog` to toggle between Dvorak and QWER -3. Holding `NewCmd`, the original `LftCmd`, will activate the `NewCmd` layer which means `NewCmd+key` is the same as `Cmd+key` in normal QWER layout.[1](#cmdTab) - - For example, no matter you are in Dvorak layout or QWER layout, you can use `Cmd+s` to save a currently editing file. -4. `Symb` makes type symbols easier - - for example: `Symb+a` is `!`. -5. `Spc+key` equals to `Shft+key` while using `Spc` alone will yield a space as usual. -6. There's an extra `Tab` in the last line. - -``` -Layer DVOR: -,-----------------------------------------------------------. -|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| |Bsp| -|-----------------------------------------------------------| -|Tab | '| ,| .| P| Y| F| G| C| R| L| /| =| | -|------------------------------------------------------` Ent| -|Ctrl | A| O| E| U| I| D| H| T| N| S| -| \| | -|-----------------------------------------------------------| -|Shft | ;| Q| J| K| X| B| M| W| V| Z| | Up| | -|-----------------------------------------------------------| -|FN| `| Alt|NewCmd|Symb| Spc |Symb|Tab|RCmd|Tog|Lft|Dwn|Rgh| -`-----------------------------------------------------------' -``` - -``` -Layer QWER: -,-----------------------------------------------------------. -|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 10| -| =| |Bsp| -|-----------------------------------------------------------| -|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | -|------------------------------------------------------` Ent| -|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| \| | -|-----------------------------------------------------------| -|Shft | Z| X| C| V| B| N| M| ,| .| /| | Up| | -|-----------------------------------------------------------| -|FN| `| Alt|NewCmd|Symb| Spc |Symb|Tab|Cmd|Tog|Lft|Dwn|Rgh| -`-----------------------------------------------------------' -``` - -``` -Layer Symb: -,-----------------------------------------------------------. -| | | | | | | | | | | | | | | | -|-----------------------------------------------------------| -| | | | [| ]| | | {| }| | | | | | -|------------------------------------------------------` | -| | !| @| #| $| %| ^| &| *| (| )| '| \| | -|-----------------------------------------------------------| -| | | | | | | | | | | | | | | -|-----------------------------------------------------------| -| | | | | | | | | | | | | | -`-----------------------------------------------------------' -``` - -``` -Layer FUNC: HHKB mode (HHKB Fn) -,-----------------------------------------------------------. -|Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| -|-----------------------------------------------------------| -|Caps | | | | | | | |Psc|Slk|Pus|Up | | | -|------------------------------------------------------` | -| |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | -|-----------------------------------------------------------| -| | | | | | | +| -|End|PgD|Dow| | | | -|-----------------------------------------------------------| -| || | | | | | | | | || | | | -`-----------------------------------------------------------' -``` - -``` -Empty Layer: -,-----------------------------------------------------------. -| | | | | | | | | | | | | | | | -|-----------------------------------------------------------| -| | | | | | | | | | | | | | | -|------------------------------------------------------` | -| | | | | | | | | | | | | | | -|-----------------------------------------------------------| -| | | | | | | | | | | | | | | -|-----------------------------------------------------------| -| | | | | | | | | | | | | | -`-----------------------------------------------------------' -``` -1: `NewCmd + Tab` does not work, you can use `RCmd+Tab` to switch among applications. diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/keymaps/sh_jp/keymap.c deleted file mode 100644 index 79515c5a6e..0000000000 --- a/keyboards/hhkb/keymaps/sh_jp/keymap.c +++ /dev/null @@ -1,50 +0,0 @@ -#include QMK_KEYBOARD_H - -enum -{ - DVOR, - QWER, - NEW_CMD, - SYMB, - FUNC -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [DVOR] = LAYOUT_JP( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_JYEN, KC_BSPC, - KC_TAB, 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_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_ENT, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RO, KC_UP, KC_RSFT, - MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, TG(QWER), KC_LEFT, KC_DOWN, KC_RGHT), - [QWER] = LAYOUT_JP( - 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_JYEN, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_UP, KC_RSFT, - MO(FUNC), KC_ZKHK, KC_LALT, MO(NEW_CMD), MO(SYMB), MT(MOD_LSFT, KC_SPC), MO(SYMB), KC_TAB, KC_RGUI, _______, KC_LEFT, KC_DOWN, KC_RGHT), - - [NEW_CMD] = LAYOUT_JP( - _______, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), LGUI(KC_6), LGUI(KC_7), LGUI(KC_8), LGUI(KC_9), LGUI(KC_0), _______, _______, _______, LGUI(KC_BSPC), - _______, LGUI(KC_Q), LGUI(KC_W), LGUI(KC_E), LGUI(KC_R), LGUI(KC_T), LGUI(KC_Y), LGUI(KC_U), LGUI(KC_I), LGUI(KC_O), LGUI(KC_P), LGUI(KC_LBRC), LGUI(KC_RBRC), - _______, LGUI(KC_A), LGUI(KC_S), LGUI(KC_D), LGUI(KC_F), LGUI(KC_G), LGUI(KC_H), LGUI(KC_J), LGUI(KC_K), LGUI(KC_L), _______, _______, _______, _______, - LGUI(KC_LSFT), LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), LGUI(KC_B), LGUI(KC_N), LGUI(KC_M), LGUI(KC_COMM), LGUI(KC_DOT), LGUI(KC_SLSH), _______, _______, _______, - _______, _______, _______, _______, _______, LGUI(KC_SPC), _______, _______, _______, _______, LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT)), - - [SYMB] = LAYOUT_JP( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, LSFT(KC_LBRC), LSFT(KC_RBRC), _______, _______, _______, _______, - _______, LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - [FUNC] = LAYOUT_JP( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, - _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, - _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t opt) -{ - return MACRO_NONE; -} diff --git a/keyboards/hhkb/keymaps/sh_jp/rules.mk b/keyboards/hhkb/keymaps/sh_jp/rules.mk deleted file mode 100644 index a7f700f019..0000000000 --- a/keyboards/hhkb/keymaps/sh_jp/rules.mk +++ /dev/null @@ -1 +0,0 @@ -OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c deleted file mode 100644 index a15f5e5e0b..0000000000 --- a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.c +++ /dev/null @@ -1,143 +0,0 @@ -#include "quantum.h" -#include "command.h" -#include "action_pseudo_lut.h" - -static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE]; - -/* - * Pseudo layout action. - * This action converts a keycode in order to output the character according to the keymap you specified - * still your keyboard layout recognized wrongly on your OS. - * Memo: Using other layer keymap to get keycode - */ -void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) { - uint8_t prev_shift; - uint16_t keycode; - uint16_t pseudo_keycode; - - /* get keycode from keymap you specified */ - keycode = keymap_key_to_keycode(base_keymap_id, record->event.key); - - prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); - - if (record->event.pressed) { - /* when magic commands entered, keycode does not converted */ - if (IS_COMMAND()) { - if (prev_shift) { - add_shift_bit(keycode); - } - register_code(keycode); - return; - } - - if (prev_shift) { - pseudo_keycode = convert_keycode(keymap, keycode, true); - dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); - add_shift_bit(keycode); - - if (IS_LSFT(pseudo_keycode)) { - register_code(QK_LSFT ^ pseudo_keycode); - } else { - /* delete shift mod temporarily */ - del_mods(prev_shift); - send_keyboard_report(); - register_code(pseudo_keycode); - add_mods(prev_shift); - send_keyboard_report(); - } - } else { - pseudo_keycode = convert_keycode(keymap, keycode, false); - dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); - - if (IS_LSFT(pseudo_keycode)) { - add_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - register_code(QK_LSFT ^ pseudo_keycode); - /* on Windows, prevent key repeat to avoid unintended output */ - unregister_code(QK_LSFT ^ pseudo_keycode); - del_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - } else { - register_code(pseudo_keycode); - } - } - } else { - if (get_shift_bit(keycode)) { - del_shift_bit(keycode); - pseudo_keycode = convert_keycode(keymap, keycode, true); - } else { - pseudo_keycode = convert_keycode(keymap, keycode, false); - } - dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode); - - if (IS_LSFT(pseudo_keycode)) { - unregister_code(QK_LSFT ^ pseudo_keycode); - } else { - unregister_code(pseudo_keycode); - } - } -} - -uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded) -{ - uint16_t pseudo_keycode; - - switch (keycode) { - case KC_A ... KC_CAPSLOCK: -#if defined(__AVR__) - if (shift_modded) { - pseudo_keycode = pgm_read_word(&keymap[keycode][1]); - } else { - pseudo_keycode = pgm_read_word(&keymap[keycode][0]); - } -#else - if (shift_modded) { - pseudo_keycode = keymap[keycode][1]; - } else { - pseudo_keycode = keymap[keycode][0]; - } -#endif - /* if undefined, use got keycode as it is */ - if (pseudo_keycode == 0x00) { - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } - } - break; - default: - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } - break; - } - return pseudo_keycode; -} - -uint8_t get_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7)); - } else { - dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode); - return 0; - } -} - -void add_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7)); - } else { - dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode); - } -} - -void del_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7)); - } else { - dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode); - } -} diff --git a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h b/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h deleted file mode 100644 index 681252440f..0000000000 --- a/keyboards/hhkb/keymaps/shela/action_pseudo_lut.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef ACTION_PSEUDO_LUT_H -#define ACTION_PSEUDO_LUT_H - -#define SHIFT_BIT_SIZE (0xE7 / 8 + 1) // 1bit per 1key - -#define IS_LSFT(kc) ((QK_LSFT & (kc)) == QK_LSFT) - -void action_pseudo_lut(keyrecord_t *, uint8_t, const uint16_t (*)[2]); -uint16_t convert_keycode(const uint16_t (*)[2], uint16_t, bool); - -uint8_t get_shift_bit(uint16_t); -void add_shift_bit(uint16_t); -void del_shift_bit(uint16_t); - -#endif diff --git a/keyboards/hhkb/keymaps/shela/config.h b/keyboards/hhkb/keymaps/shela/config.h deleted file mode 100644 index 08cc1fb46e..0000000000 --- a/keyboards/hhkb/keymaps/shela/config.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CONFIG_SHELA_H -#define CONFIG_SHELA_H - -#include "../../config.h" - -#undef TAPPING_TERM -#define TAPPING_TERM 230 - -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 2000 - -#endif diff --git a/keyboards/hhkb/keymaps/shela/keymap.c b/keyboards/hhkb/keymaps/shela/keymap.c deleted file mode 100644 index 2d5f4c64ac..0000000000 --- a/keyboards/hhkb/keymaps/shela/keymap.c +++ /dev/null @@ -1,193 +0,0 @@ -/* - * HHKB Pro 2 US Layout for shela - */ -#include QMK_KEYBOARD_H -#include "keymap_jis2us.h" -#include "action_pseudo_lut.h" - -enum keymap_layout -{ - BASE = 0, - PSEUDO_US, - DVORAK, - MOUSE, - TENKEY, - HHKB, - SPACE_FN, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Layer 0: Default Layer - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | BSp | - * |-----------------------------------------------------------------------------------------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | - * |-----------------------------------------------------------------------------------------| - * | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------| - * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | - * `-----------------------------------------------------------------------------------------' - * |LAlt | LGui | SpaceFN | RGui |RAlt | - * `-----------------------------------------------------------------' - */ - [BASE] = - LAYOUT(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_GRV, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_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, - OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), - KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), - - /* Layer 1: Pseudo US Layout Layer - * ,-----------------------------------------------------------------------------------------. - * | Esc | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | BSp | - * |-----------------------------------------------------------------------------------------| - * | Tab | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | - * |-----------------------------------------------------------------------------------------| - * | Control | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Enter | - * |-----------------------------------------------------------------------------------------| - * | Shift | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Fn1 | Shift | Fn0 | - * `-----------------------------------------------------------------------------------------' - * |LGui | Fn3 | SpaceFN | Fn4 |RGui | - * `-----------------------------------------------------------------' - */ - [PSEUDO_US] = - LAYOUT(KC_ESC, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_BSPC, - KC_TAB, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, - KC_LCTL, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_ENT, - KC_LSFT, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_FN1, KC_RSFT, MO(HHKB), - KC_LGUI, KC_FN3, LT(SPACE_FN, KC_SPACE), KC_FN4, KC_RGUI), - - /* Layer 2: Dvorak Layer - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ` | BSp | - * |-----------------------------------------------------------------------------------------| - * | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | - * |-----------------------------------------------------------------------------------------| - * | Control | A | O | E | U | I | D | H | T | N | S | - | Enter | - * |-----------------------------------------------------------------------------------------| - * | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn0 | - * `-----------------------------------------------------------------------------------------' - * |LAlt | LGui | SpaceFN | RGui |RAlt | - * `-----------------------------------------------------------------' - */ - [DVORAK] = - LAYOUT(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, - KC_TAB, 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_BSLS, - KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(HHKB), - KC_LALT, KC_LGUI, LT(SPACE_FN, KC_SPACE), KC_RGUI, KC_RALT), - - /* Layer 3: Mouse layer - * ,-----------------------------------------------------------------------------------------. - * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | - * |-----------------------------------------------------------------------------------------| - * | | | | | | | MwL | MwD | MwU | MwR | | | | | - * |-----------------------------------------------------------------------------------------| - * | | | | | | | McL | McD | McU | McR | | | | - * |-----------------------------------------------------------------------------------------| - * | | | | | | | Mb1 | Mb2 | Mb3 | | | | Fn0 | - * `-----------------------------------------------------------------------------------------' - * | | | Mb1 | | | - * `-----------------------------------------------------------------' - */ - [MOUSE] = - LAYOUT(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_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_BTN2, KC_BTN3, KC_NO, KC_NO, KC_TRNS, MO(HHKB), - KC_TRNS, KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS), - - /* Layer 4: Tenkey layer - * ,-----------------------------------------------------------------------------------------. - * | Esc | | | | | | | | | | / | * | - | | BSp | - * |-----------------------------------------------------------------------------------------| - * | | | | | | | | | | 7 | 8 | 9 | + | | - * |-----------------------------------------------------------------------------------------| - * | | | | | | | | | | 4 | 5 | 6 | Enter | - * |-----------------------------------------------------------------------------------------| - * | | | | | | | | | 1 | 2 | 3 | + | Fn0 | - * `-----------------------------------------------------------------------------------------' - * | | | SpaceFN | 0 | . | - * `-----------------------------------------------------------------' - */ - [TENKEY] = - LAYOUT(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, KC_NO, KC_BSPC, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_NO, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_PENT, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, MO(HHKB), - KC_TRNS, KC_TRNS, LT(SPACE_FN, KC_SPACE), KC_KP_0, KC_PDOT), - - /* Layer 5: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------------------------------------. - * | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | - * |-----------------------------------------------------------------------------------------| - * | Caps | Fn5 | Fn6 | Fn7 | Fn8 | Fn9 | | | Psc | Slk | Pus | Up | | BSp | - * |-----------------------------------------------------------------------------------------| - * | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | - * |-----------------------------------------------------------------------------------------| - * | | | | | | | + | - | End | PgD | Dow | | | - * `-----------------------------------------------------------------------------------------' - * | | | | | | - * `-----------------------------------------------------------------' - */ - [HHKB] = - LAYOUT(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_FN5, KC_FN6, KC_FN7, KC_FN8, KC_FN9, 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), - - /* Layer 6: SpaceFN - * ,-----------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | Del | - * |-----------------------------------------------------------------------------------------| - * | | Hom | Up | End | | | | Hom | End | | Psc | Slk | Pau | Ins | - * |-----------------------------------------------------------------------------------------| - * | | Lef | Dow | Rig | PgU | | Lef | Dow | Up | Rig | | | | - * |-----------------------------------------------------------------------------------------| - * | | | | PgD | | Spc | | PgD | PgU | | | | | - * `-----------------------------------------------------------------------------------------' - * | | | | | | - * `-----------------------------------------------------------------' - */ - [SPACE_FN] = - LAYOUT(KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, - KC_TRNS, KC_HOME, KC_UP, KC_END, KC_NO, KC_NO, KC_NO, KC_HOME, KC_END, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_INS, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, KC_NO, KC_NO, KC_PGDN, KC_NO, KC_SPC, KC_NO, KC_PGDN, KC_PGUP, KC_NO, KC_NO, KC_TRNS, KC_NO, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; - -/* - * user defined action function - */ -enum function_id -{ - PSEUDO_US_FUNCTION, -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - - switch (id) - { - case PSEUDO_US_FUNCTION: - action_pseudo_lut(record, BASE, keymap_jis2us); - break; - } -} - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), - [3] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_MHEN), - [4] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_KANA), - [5] = ACTION_DEFAULT_LAYER_SET(BASE), - [6] = ACTION_DEFAULT_LAYER_SET(PSEUDO_US), - [7] = ACTION_DEFAULT_LAYER_SET(MOUSE), - [8] = ACTION_DEFAULT_LAYER_SET(TENKEY), - [9] = ACTION_DEFAULT_LAYER_SET(DVORAK), -}; diff --git a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/keymaps/shela/keymap_jis2us.h deleted file mode 100644 index edc1e6d869..0000000000 --- a/keyboards/hhkb/keymaps/shela/keymap_jis2us.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef LAYOUT_JIS2US_H -#define LAYOUT_JIS2US_H - -/* keymap for convert from JIS to US */ -const uint16_t PROGMEM keymap_jis2us[][2] = { - [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ - - [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */ - [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */ - [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */ - [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */ - [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */ - [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */ - [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */ - [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */ - [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */ - [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */ - [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */ - [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */ - [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */ - [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */ - [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */ - [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */ - [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */ - [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */ - [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */ - [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */ - [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */ - [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */ -}; - -#endif diff --git a/keyboards/hhkb/keymaps/shela/readme.md b/keyboards/hhkb/keymaps/shela/readme.md deleted file mode 100644 index 5a06a83632..0000000000 --- a/keyboards/hhkb/keymaps/shela/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# Shela's HHKB Layout - -Layer 0: US Layout -Layer 1: Pseudo US Layout -Layer 2: Dvorak Layout -Layer 3: Mouse -Layer 4: Tenkey -Layer 5: HHKB Fn Key -Layer 6: SpaceFN - -## Pseudo US Layout - -On japanese Windows, HHKB Professional 2 US layout model recognized wrongly as JIS layout without changing OS settings. -But, you can use HHKB like a US layout keyboard as it is. diff --git a/keyboards/hhkb/keymaps/shela/rules.mk b/keyboards/hhkb/keymaps/shela/rules.mk deleted file mode 100644 index d0586bda68..0000000000 --- a/keyboards/hhkb/keymaps/shela/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC += action_pseudo_lut.c diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/keymaps/smt/keymap.c deleted file mode 100644 index e1d8bae2e4..0000000000 --- a/keyboards/hhkb/keymaps/smt/keymap.c +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- eval: (turn-on-orgtbl); -*- - * default HHKB Layout - */ -#include QMK_KEYBOARD_H - -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _HHKB 3 - -enum planck_keycodes -{ - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - HHKB -}; - -// Custom macros -#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl -#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) -#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Layer QWERTY: Qwerty 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 | Fn | | | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - - |------+------+-----------------------+------+------| - | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | - |------+------+-----------------------+------+------| - */ - - [_QWERTY] = LAYOUT( // Qwerty layer - 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, MEH_GRV, - HPR_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, SFT_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(_HHKB), - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), - - /* Layer COLEMAK: Colemak Layer - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | Backs | | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Cont | A | R | S | T | D | H | N | E | I | O | ' | Ent | | | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Shift | Z | X | C | V | B | K | M | , | . | / | Shift | Fn | | | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - - |------+------+-----------------------+------+------| - | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | - |------+------+-----------------------+------+------| - */ - - [_COLEMAK] = LAYOUT( // Colemak layer - 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, MEH_GRV, - HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, - CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, SFT_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HHKB), - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT), - - /* Layer DVORAK: Dvorak Layer - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | \ | ` | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Tab | ' | , | . | P | Y | F | G | C | R | L | / | = | Backs | | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Cont | A | O | E | U | I | D | H | T | N | S | - | Ent | | | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - | Shift | ; | Q | J | K | X | B | M | W | V | Z | Shift | Fn | | | - |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---| - - |------+------+-----------------------+------+------| - | LAlt | LGUI | ******* Space ******* | RGUI | RAlt | - |------+------+-----------------------+------+------| - */ - - [_DVORAK] = LAYOUT( // Dvorak layer - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, MEH_GRV, - HPR_TAB, 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_BSPC, - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, SFT_ENT, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_HHKB), - KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, 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 | | | - |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----| - | | | Qwt | Cmk | Dvk | | + | - | End | PgD | Dow | | | | | - |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-------+-------+-----| - - |------+------+----------------------+------+------+ - | **** | **** | ******************** | **** | **** | - |------+------+----------------------+------+------+ - - */ - - [_HHKB] = LAYOUT( - 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_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_BSPC, - _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, - _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, - _______, _______, _______, _______, _______)}; - -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; -}; - -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; - } - return true; -} diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c b/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c deleted file mode 100644 index 68e23b45df..0000000000 --- a/keyboards/hhkb/keymaps/tobiasvl_iso/keymap.c +++ /dev/null @@ -1,20 +0,0 @@ -#include QMK_KEYBOARD_H - -#define SPACE_FN LT(1, KC_SPC) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT( // default layer - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_RBRC, 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_NUHS, 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, KC_NUBS, - KC_LALT, KC_LGUI, SPACE_FN, KC_RGUI, KC_RALT), - - [1] = LAYOUT( - 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_INS, KC_DEL, - KC_CAPS, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, KC_END, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______) -}; diff --git a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md b/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md deleted file mode 100644 index 0da9d96ee4..0000000000 --- a/keyboards/hhkb/keymaps/tobiasvl_iso/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# tobiasvl's ISO layout for HHKB - -This is my attempt to adapt my regular 60% Norwegian ISO layout to the physical HHKB layout, on the Happy Hacking Keyboard Pro 2 keyboard with the alternate QMK-compatible Hasu controller. - -## Base layer - -![HHKB ISO](https://i.imgur.com/8n4Kixw.png) - -The following changes have been made from standard HHKB: - -* The ] and \ keys are swapped so they're in the ISO locations, but a row higher. Whether or not this is a good idea depends heavily on what specific language layout you're using, but it makes sense for Norwegian, I think. -* The Fn key is replaced with the ISO key (ie. "non-US backslash"). It's gotta go somewhere! -* The spacebar doubles as space when tapped and Fn when held (ie. SpaceFN). This is a personal preference, but my second and more traditional choice would probably be to replace right GUI/Super with Fn. -* Grave Escape has been added (shift + Esc produces ~). - -## Function layer - -This is just how I personally prefer to set up my function layer, and doesn't have anything to do with ISO. You probably want to swap out this wholesale for your own function layer. - -* Navigation is moved: Arrow keys on WASD, Page Up and Page Down on QE, Home and End on the right (I have them to the left of the vertical Enter on ISO layouts). -* Grave Escape has been added (Fn + Esc produces \`). -* No media keys or anything. I don't use them. diff --git a/keyboards/hhkb/keymaps/tominabox1/.gitignore b/keyboards/hhkb/keymaps/tominabox1/.gitignore deleted file mode 100644 index 4b8c99bfb8..0000000000 --- a/keyboards/hhkb/keymaps/tominabox1/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.h -matrix.c -rules.mk diff --git a/keyboards/hhkb/keymaps/tominabox1/keymap.c b/keyboards/hhkb/keymaps/tominabox1/keymap.c deleted file mode 100644 index d7aea97736..0000000000 --- a/keyboards/hhkb/keymaps/tominabox1/keymap.c +++ /dev/null @@ -1,12 +0,0 @@ -#include QMK_KEYBOARD_H -#include "tominabox1.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT(KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, TD(TD_SFT_CPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2)), - - [1] = LAYOUT(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_INS, KC_DEL, KC_CAPS, KC_MFFD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [2] = LAYOUT(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, RESET, 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_TRNS), - - [3] = LAYOUT(KC_GESC, KC_EXLM, KC_EML, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDN, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, 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_TRNS, KC_NO, KC_TRNS) -}; diff --git a/keyboards/hhkb/keymaps/xyverz/keymap.c b/keyboards/hhkb/keymaps/xyverz/keymap.c deleted file mode 100644 index eebaede979..0000000000 --- a/keyboards/hhkb/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,137 +0,0 @@ -/* -Xyverz's HHKB layout - -Rev 0.1, initial commit. - -This is my initial keymap for the HHKB with Hasu's alternate controller. -The default layer is Dvorak, with Qwerty and Colemak being optional. -Will probably add to it later, but for now I'm going to enjoy this as it is. -*/ - -#include QMK_KEYBOARD_H - -enum layer_names { - _QW, - _DV, - _CM, - _FL, -}; - -enum planck_keycodes { DVORAK = SAFE_RANGE, QWERTY, COLEMAK }; - -#define FN_TAB LT(_FL, KC_TAB) - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* - * _QW: Qwerty Layer - * ,-----------------------------------------------------------. - * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| - * |-----------------------------------------------------------| - * |Fn/Tb| Q| W| E| R| T| Y| U| I| O| P| [| ]|BkSpc| - * |-----------------------------------------------------------| - * |Control| A| S| D| F| G| H| J| K| L| ;| '| Return| - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift |Fn| - * |-----------------------------------------------------------| - * | |Alt |Gui | Space |Gui |Alt | | - * `-----------------------------------------------------------' - */ - /* Layer 0: Qwerty */ - [_QW] = LAYOUT( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , - FN_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, MO(_FL), - KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT - ), - - /* - * _DV: Dvorak Layer - * ,-----------------------------------------------------------. - * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \ |Del| - * |-----------------------------------------------------------| - * |Fn/Tb| '| ,| .| P| Y| F| G| C| R| L| /| =|BkSpc| - * |-----------------------------------------------------------| - * |Control| A| O| E| U| I| D| H| T| N| S| -| Return| - * |-----------------------------------------------------------| - * |Shift | ;| Q| J| K| X| B| M| W| V| Z| Shift |Fn| - * |-----------------------------------------------------------| - * | |Alt |Gui | Space |Gui |Alt | | - * `-----------------------------------------------------------' - */ - /* Layer 1: Dvorak */ - [_DV] = LAYOUT( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , - FN_TAB, 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_BSPC, - KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, MO(_FL), - KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT - ), - - /* - * _CM: Colemak Layer - * ,-----------------------------------------------------------. - * |ESC | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \ |Del| - * |-----------------------------------------------------------| - * |Fn/Tb| Q| W| F| P| G| J| L| U| Y| ;| [| ]|BkSpc| - * |-----------------------------------------------------------| - * |Control| A| R| S| T| D| H| N| E| I| O| '| Return| - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| K| M| ,| .| /| Shift |Fn| - * |-----------------------------------------------------------| - * | |Alt |Gui | Space |Gui |Alt | | - * `-----------------------------------------------------------' - */ - /* Layer 2: Colemak */ - [_CM] = LAYOUT( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL , - FN_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, - KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), - KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT - ), - - /* - * _FL: Function Layer - * ,-----------------------------------------------------------. - * |Grv |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |RST| - * |-----------------------------------------------------------| - * | | |_QW|_DV|_CM| | |PgU| Up|PgD|PSc|SLk|Pau| | - * |-----------------------------------------------------------| - * | | |MPr|MPl|MNx| |Hom| Lt| Dn| Rt| | | | - * |-----------------------------------------------------------| - * |CAPS | |Mut|VlD|VlU| |End| | | | | | | - * |-----------------------------------------------------------| - * | | | | Ins | | | | - * `-----------------------------------------------------------' - */ - /* Layer 3: Functions */ - [_FL] = LAYOUT( - 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, _______, RESET , - _______, _______, QWERTY, DVORAK, COLEMAK, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, - KC_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_END, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______ - ), - -}; -// clang-format on - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch (keycode) { - case DVORAK: - set_single_persistent_default_layer(_DV); - return false; - case QWERTY: - set_single_persistent_default_layer(_QW); - return false; - case COLEMAK: - set_single_persistent_default_layer(_CM); - return false; - } - } - return true; -} \ No newline at end of file diff --git a/keyboards/hhkb/matrix.c b/keyboards/hhkb/matrix.c deleted file mode 100644 index 666b6f595f..0000000000 --- a/keyboards/hhkb/matrix.c +++ /dev/null @@ -1,215 +0,0 @@ -/* -Copyright 2011 Jun Wako - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "timer.h" -#include "matrix.h" -#include "hhkb_avr.h" -#include -#include "suspend.h" -#include "lufa.h" - - -// matrix power saving -#define MATRIX_POWER_SAVE 10000 -static uint32_t matrix_last_modified = 0; - -// matrix state buffer(1:on, 0:off) -static matrix_row_t *matrix; -static matrix_row_t *matrix_prev; -static matrix_row_t _matrix0[MATRIX_ROWS]; -static matrix_row_t _matrix1[MATRIX_ROWS]; - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ -#ifdef DEBUG - debug_enable = true; - debug_keyboard = true; -#endif - - KEY_INIT(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; - matrix = _matrix0; - matrix_prev = _matrix1; -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -uint8_t matrix_scan(void) -{ - uint8_t *tmp; - - tmp = matrix_prev; - matrix_prev = matrix; - matrix = tmp; - - // power on - if (!KEY_POWER_STATE()) KEY_POWER_ON(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - KEY_SELECT(row, col); - _delay_us(5); - - // Not sure this is needed. This just emulates HHKB controller's behaviour. - if (matrix_prev[row] & (1< 20/(1000000/TIMER_RAW_FREQ)) { - matrix[row] = matrix_prev[row]; - } - - _delay_us(5); - KEY_PREV_OFF(); - KEY_UNABLE(); - - // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. - // This takes 25us or more to make sure KEY_STATE returns to idle state. -#ifdef HHKB_JP - // Looks like JP needs faster scan due to its twice larger matrix - // or it can drop keys in fast key typing - _delay_us(30); -#else - _delay_us(75); -#endif - } - if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); - } - // power off - if (KEY_POWER_STATE() && - (USB_DeviceState == DEVICE_STATE_Suspended || - USB_DeviceState == DEVICE_STATE_Unattached ) && - timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) { - KEY_POWER_OFF(); - suspend_power_down(); - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_modified(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] != matrix_prev[i]) - return true; - } - return false; -} - -inline -bool matrix_has_ghost(void) -{ - return false; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1<= 0; --r) { - count += bitpop16(matrix_get_row(r)); - } - return count; -} - -void matrix_power_up(void) { - KEY_POWER_ON(); -} -void matrix_power_down(void) { - KEY_POWER_OFF(); -} diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md deleted file mode 100644 index 57eb814391..0000000000 --- a/keyboards/hhkb/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -HHKB Alternate Controller -=== - -An alternative controler for the HHKB designed by hasu. - -Keyboard Maintainer: QMK Community -Hardware Supported: HHKB Alternate Controller -Hardware Availability: https://geekhack.org/index.php?topic=12047.0 - -Make example for this keyboard (after setting up your build environment): - - make hhkb:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk deleted file mode 100644 index 68fb51a30c..0000000000 --- a/keyboards/hhkb/rules.mk +++ /dev/null @@ -1,71 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -CUSTOM_MATRIX = yes # Custom matrix file for the HHKB -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = yes # MIDI controls -# UNICODE_ENABLE = yes # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID - - -# HHKB_RN42_ENABLE = yes # Enable support for hasu's BT alt controller -- code borrowed from tmk source tree. - -# Either uncomment the HHKB_RN42_ENABLE line above, or run make enabling the -# feature. Be sure to clean any existing build before trying to enable rn42 -# support. For example: -# -# make hhkb-keymap-clean -# make hhkb-keymap-dfu HHKB_RN42_ENABLE=yes - -# project specific files -SRC = matrix.c - -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = rn42 - -SRC += serial_uart.c \ - rn42/suart.S \ - rn42/rn42.c \ - rn42/rn42_task.c \ - rn42/battery.c \ - rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - -# debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION -# debug-on: all - -# debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT -# debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) -# debug-off: all - -LAYOUTS = 60_hhkb diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c index c99b05e4c5..a169d658f7 100644 --- a/keyboards/infinity60/keymaps/jpetermans/keymap.c +++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c @@ -15,8 +15,6 @@ enum ic60_keycodes { NUMPAD, FNAV, MEDIA, - TILDE, - CTLALTDEL, BACKLIGHT, BRIGHT, DIM, @@ -55,7 +53,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_NO,\ 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, \ TT(_FNAV), 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,F(TILDE),KC_NO, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,LM(_TILDE, MOD_LSFT),KC_NO, \ KC_LCTL, KC_LGUI,KC_LALT, LT(_FNAV, KC_SPC), KC_RALT,TG(_NUMPAD),MO(_MEDIA), KC_RCTL \ ), @@ -74,7 +72,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,_______,_______,KC_DEL, \ _______,_______,KC_BTN2,_______,_______,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,_______,_______, \ _______,KC_APP,KC_BTN1,KC_CALC,_______,_______,KC_END,_______,_______,_______,_______,_______,KC_NO, \ - _______,_______,_______, _______, F(CTLALTDEL),KC_NLCK,_______,_______ \ + _______,_______,_______, _______, C(A(KC_DEL)),KC_NLCK,_______,_______ \ ), /* media */ @@ -162,8 +160,6 @@ uint8_t led_game[5] = { //======== qmk functions ========= const uint16_t fn_actions[] = { - [CTLALTDEL] = ACTION_KEY(LALT(LCTL(KC_DEL))), - [TILDE] = ACTION_LAYER_MODS(_TILDE, MOD_LSFT), [ALL] = ACTION_FUNCTION(ACTION_LEDS_ALL), [GAME] = ACTION_FUNCTION(ACTION_LEDS_GAME), [BACKLIGHT] = ACTION_FUNCTION(ACTION_LEDS_BACKLIGHT), diff --git a/keyboards/jd45/keymaps/justin/keymap.c b/keyboards/jd45/keymaps/justin/keymap.c index 1c0e780724..985ff19b88 100644 --- a/keyboards/jd45/keymaps/justin/keymap.c +++ b/keyboards/jd45/keymaps/justin/keymap.c @@ -3,15 +3,22 @@ #define KC_MO1 MO(1) #define KC_MO2 MO(2) #define KC_MO3 MO(3) +#define KC_LM4 LM(4, MOD_LSFT) + +#define KC_MTCM MT(MOD_LCTL, KC_MINS) +#define KC_MTSG MT(MOD_LSFT, KC_GRV) +#define KC_MTSW MT(MOD_RSFT, KC_RGUI) +#define KC_MTSC MT(MOD_RSFT, KC_CAPS) +#define KC_MTCT MT(MOD_LCTL, KC_TAB) #define KC_BLTG BL_TOGG const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_kc( ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, - FN8, A, R, S, T, D, H, N, E, I, O, ENT, - LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, FN6, - FN4, LGUI, FN7, MO2, MO1, SPC, FN5, RALT, MO3, FN0), + MTCT, A, R, S, T, D, H, N, E, I, O, ENT, + LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, MTSC, + MTSG, LGUI, LM4, MO2, MO1, SPC, MTSW, RALT, MO3, MTCM), [1] = LAYOUT_kc( TRNS, FN10, FN11, FN12, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, UP, DEL, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGUP, LEFT, RGHT, @@ -42,13 +49,6 @@ enum macro_id }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_MINS), - [4] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_GRV), - [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_RGUI), - [6] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_CAPS), - [7] = ACTION_LAYER_MODS(4, MOD_LSFT), // FN4 - [8] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), - [10] = ACTION_MACRO(PSWD1), [11] = ACTION_MACRO(PSWD2), [12] = ACTION_MACRO(PSWD3) diff --git a/keyboards/jd45/keymaps/mjt6u/keymap.c b/keyboards/jd45/keymaps/mjt6u/keymap.c index 6fda6ac95f..dc7c3bb7e3 100644 --- a/keyboards/jd45/keymaps/mjt6u/keymap.c +++ b/keyboards/jd45/keymaps/mjt6u/keymap.c @@ -119,7 +119,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { persistent_default_layer_set(1UL << _QWERTY); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_fnpc, false, 0); + PLAY_SONG(tone_fnpc); #endif print("Space-FN"); } @@ -130,7 +130,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { persistent_default_layer_set(1UL << _QWERTYNUMMODS); #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_fnmac, false, 0); + PLAY_SONG(tone_fnmac); #endif print("Space-Numpad"); } diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c index 14428812f2..00f0bb3ced 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c @@ -30,16 +30,9 @@ enum custom_keycodes { ARROW }; - // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { - [0] = LT(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Backspace, - [1] = LT(_RAISE, KC_BSPC), //Hold for momentary Raise layer, Tap for Space, - [2] = MO(_ARROW), //Hold for momentary Arrow - }; - -#define SPC_LWR FUNC(0) -#define BSP_RSE FUNC(1) -#define ARW FUNC(2) +#define SPC_LWR LT(_LOWER, KC_SPC) +#define BSP_RSE LT(_RAISE, KC_BSPC) +#define ARW MO(_ARROW) // Underglow setup #define RGBLIGHT_SLEEP diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c index f0122bef05..ab8cf2a9ae 100644 --- a/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c @@ -158,7 +158,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -176,7 +176,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c index 5a797cb0bd..c03cf970fd 100644 --- a/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c @@ -155,7 +155,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } diff --git a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c index e1dc91d2b2..9922f1a555 100644 --- a/keyboards/keebio/viterbi/keymaps/mike808/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c @@ -128,7 +128,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL << _QWERTY); } @@ -137,7 +137,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL << _DVORAK); } diff --git a/keyboards/keyboardio/model01/config.h b/keyboards/keyboardio/model01/config.h new file mode 100644 index 0000000000..c2160979cd --- /dev/null +++ b/keyboards/keyboardio/model01/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2018 James Laird-Wah + +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 . +*/ + +#pragma once + +#include + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0x2301 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keyboardio +#define PRODUCT Model 01 +#define DESCRIPTION (QMK) + +/* key matrix size; rows are doubled for split */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* The scanners already debounce for us */ +#define DEBOUNCE 0 + +/* RGB matrix constants */ +#define DRIVER_LED_TOTAL 64 diff --git a/keyboards/keyboardio/model01/info.json b/keyboards/keyboardio/model01/info.json new file mode 100644 index 0000000000..66bea171d2 --- /dev/null +++ b/keyboards/keyboardio/model01/info.json @@ -0,0 +1,87 @@ +{ + "keyboard_name": "model01", + "keyboard_folder": "keyboardio/model01", + "url": "https://keyboard.io", + "maintainer": "qmk", + "width": 18.5, + "height": 7.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"PROG", "x":0, "y":0.4, "h":1.3}, + {"label":"1", "x":1, "y":0.2, "h":1.5}, + {"label":"2", "x":2, "y":0.1, "h":1.1}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0.1}, + {"label":"5", "x":5, "y":0.3}, + + {"label":"6", "x":12.5, "y":0.3}, + {"label":"7", "x":13.5, "y":0.1}, + {"label":"8", "x":14.5, "y":0}, + {"label":"9", "x":15.5, "y":0.1, "h":1.1}, + {"label":"0", "x":16.5, "y":0.2, "h":1.5}, + {"label":"NUM", "x":17.5, "y":0.4, "h":1.3}, + + {"label":"GRAVE", "x":0, "y":1.7}, + {"label":"Q", "x":1, "y":1.7}, + {"label":"W", "x":2, "y":1.2}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1.1}, + {"label":"T", "x":5, "y":1.3}, + {"label":"LED", "x":6, "y":0.6, "h":1.5}, + + {"label":"ANY", "x":11.5, "y":0.6, "h":1.5}, + {"label":"Y", "x":12.5, "y":1.3}, + {"label":"U", "x":13.5, "y":1.1}, + {"label":"I", "x":14.5, "y":1}, + {"label":"O", "x":15.5, "y":1.2}, + {"label":"P", "x":16.5, "y":1.7}, + {"label":"EQUAL", "x":17.5, "y":1.7}, + + {"label":"PAGEUP", "x":0, "y":2.7}, + {"label":"A", "x":1, "y":2.7}, + {"label":"S", "x":2, "y":2.2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2.1}, + {"label":"G", "x":5, "y":2.3}, + {"label":"TAB", "x":6, "y":2.1, "h":1.3}, + + {"label":"ENTER", "x":11.5, "y":2.1, "h":1.3}, + {"label":"H", "x":12.5, "y":2.3}, + {"label":"J", "x":13.5, "y":2.1}, + {"label":"K", "x":14.5, "y":2}, + {"label":"L", "x":15.5, "y":2.2}, + {"label":"SEMICOLON", "x":16.5, "y":2.7}, + {"label":"QUOTE", "x":17.5, "y":2.7}, + + {"label":"PAGEDOWN", "x":0, "y":3.7, "h":1.2}, + {"label":"Z", "x":1, "y":3.7}, + {"label":"X", "x":2, "y":3.2, "h":1.15}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3.1}, + {"label":"B", "x":5, "y":3.3}, + {"label":"ESC", "x":6, "y":3.4, "h":1.1}, + + {"label":"BUTTERFLY", "x":11.5, "y":3.4, "h":1.1}, + {"label":"N", "x":12.5, "y":3.3}, + {"label":"M", "x":13.5, "y":3.1}, + {"label":"COMMA", "x":14.5, "y":3}, + {"label":"DOT", "x":15.5, "y":3.2, "h":1.15}, + {"label":"SLASH", "x":16.5, "y":3.7}, + {"label":"MINS", "x":17.5, "y":3.7, "h":1.2}, + + {"label":"LCTL", "x":4.75, "y":4.3}, + {"label":"RCTL", "x":12.75, "y":4.3}, + {"label":"BACKSPACE", "x":5.75, "y":4.5}, + {"label":"SPACE", "x":11.75, "y":4.5}, + {"label":"LGUI", "x":6.75, "y":4.7}, + {"label":"RALT", "x":10.75, "y":4.7}, + {"label":"LSHIFT", "x":7.75, "y":5.1}, + {"label":"RSHIFT", "x":9.75, "y":5.1}, + + {"label":"FN", "x":6.25, "y":6.1, "h":1.4}, + {"label":"FN", "x":11.25, "y":6.1, "h":1.4} + ] + } + } +} diff --git a/keyboards/keyboardio/model01/keymaps/default/config.h b/keyboards/keyboardio/model01/keymaps/default/config.h new file mode 100644 index 0000000000..8ab9d8b025 --- /dev/null +++ b/keyboards/keyboardio/model01/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 James Laird-Wah + * + * 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 . + */ + +#pragma once + +/* place overrides here */ diff --git a/keyboards/keyboardio/model01/keymaps/default/keymap.c b/keyboards/keyboardio/model01/keymaps/default/keymap.c new file mode 100644 index 0000000000..5ee865972e --- /dev/null +++ b/keyboards/keyboardio/model01/keymaps/default/keymap.c @@ -0,0 +1,124 @@ +/* Copyright 2018 James Laird-Wah + * + * 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 . + */ +#include QMK_KEYBOARD_H + +/* layer constants */ +enum { + DEF = 0, + NUM, + FUN, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = LAYOUT( + RESET , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , TG(NUM), + KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, _______, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , + KC_PGUP, KC_A , KC_S , KC_D , KC_F , KC_G , KC_TAB , KC_ENT , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, + KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , _______, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, + KC_LCTL, KC_RCTL, + KC_BSPC, KC_SPC , + KC_LGUI, KC_RALT, + KC_LSFT, KC_RSFT, + MO(FUN), MO(FUN) + ), +[NUM] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_P7 , KC_P8 , KC_P9 , KC_PMNS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4 , KC_P5 , KC_P6 , KC_PPLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1 , KC_P2 , KC_P3 , KC_PEQL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0 , KC_PDOT, KC_PAST, KC_PSLS, KC_PENT, + _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______ + ), +[FUN] = LAYOUT( + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_TOG, KC_MPRV, KC_MNXT, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , + KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, _______, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, + KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSLS, KC_PIPE, + _______, _______, + KC_DEL , KC_ENT , + _______, _______, + _______, _______, + _______, _______ + ) +}; + +/* template for new layouts: +LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______ + ) +*/ + +static void set_numpad_colours(int on, void (*write)(int, uint8_t, uint8_t, uint8_t)) { + if (!on) { + for (int i=44; i<=60; i++) + write(i, 0, 0, 0); + write(63, 0, 0, 0); + return; + } + + /* main number keys */ + for (int i=44; i<=47; i++) + write(i, 255, 0, 0); + for (int i=49; i<=54; i++) + write(i, 255, 0, 0); + + /* accessory keys */ + write(48, 128, 128, 0); + for (int i=55; i<=59; i++) + write(i, 128, 128, 0); + + // enter + write(63, 0, 128, 0); + + // num key + write(60, 128, 0, 128); +} + +#ifdef RGB_MATRIX_ENABLE +/* the RGB matrix effects will overwrite the numpad indicator. + * this handy mechanism allows to override the matrix effects. + */ +void rgb_matrix_indicators_user(void) { + if (layer_state & (1<. + */ + +#pragma once + +/* place overrides here */ diff --git a/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c new file mode 100644 index 0000000000..b4bd53e3fe --- /dev/null +++ b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c @@ -0,0 +1,50 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +/* layer constants */ +enum { + DEF = 0, + MOD, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = LAYOUT( + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , DE_SS , + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, KC_MUTE, KC_Y , KC_U , KC_I , KC_O , KC_P , DE_AE , + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , DE_PARA, _______, KC_H , KC_J , KC_K , KC_L , DE_SLSH, DE_OE , + DE_PIPE, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, KC_N , KC_M , DE_COMM, DE_DOT , DE_MINS, DE_UE , + KC_LALT, KC_LGUI, + KC_SPC , KC_ENT , + KC_LSFT, MO(MOD), + KC_BSPC, KC_DEL , + KC_LCTL, KC_RCTL + ), +[MOD] = LAYOUT( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + DE_CIRC, DE_QUOT, DE_DQOT, DE_LCBR, DE_RCBR, DE_GRV , RGB_TOG, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , DE_EQL , DE_PERC, + DE_TILD, DE_EXLM, DE_DLR , DE_LPRN, DE_RPRN, DE_AMPR, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, DE_QST , DE_ASTR, + DE_BSLS, DE_HASH, DE_LESS, DE_LBRC, DE_RBRC, DE_MORE, _______, RESET , DE_AT , DE_EURO, DE_SCLN, DE_COLN, DE_UNDS, DE_PLUS, + _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______ + ) +}; + +/* template for new layouts: +LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______, + _______, _______ + ) +*/ + +/* vim: set ts=2 sw=2 et: */ diff --git a/keyboards/keyboardio/model01/keymaps/tw1t611/readme.md b/keyboards/keyboardio/model01/keymaps/tw1t611/readme.md new file mode 100644 index 0000000000..b9d728831c --- /dev/null +++ b/keyboards/keyboardio/model01/keymaps/tw1t611/readme.md @@ -0,0 +1,5 @@ +# Keymap for Keyboardio's Model01 by tw1t611 + +Features: +- german keymap +- vim optimized diff --git a/keyboards/keyboardio/model01/leds.c b/keyboards/keyboardio/model01/leds.c new file mode 100644 index 0000000000..b21c1a5c8a --- /dev/null +++ b/keyboards/keyboardio/model01/leds.c @@ -0,0 +1,132 @@ +/* Copyright 2018 James Laird-Wah + * + * 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 . + */ +#include +#include +#include +#include +#include +#include "model01.h" + +#define I2C_TIMEOUT 1000 + +void set_all_leds_to(uint8_t r, uint8_t g, uint8_t b) { + uint8_t buf[] = { + TWI_CMD_LED_SET_ALL_TO, + b, g, r + }; + i2c_transmit(I2C_ADDR(LEFT), buf, sizeof(buf), I2C_TIMEOUT); + i2c_transmit(I2C_ADDR(RIGHT), buf, sizeof(buf), I2C_TIMEOUT); + _delay_us(10); +} + +void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) { + uint8_t buf[] = { + TWI_CMD_LED_SET_ONE_TO, + led & 0x1f, + b, g, r + }; + int hand = (led >= 32) ? RIGHT : LEFT; + i2c_transmit(I2C_ADDR(hand), buf, sizeof(buf), I2C_TIMEOUT); + _delay_us(10); +} + +#ifdef RGB_MATRIX_ENABLE + +__attribute__ ((weak)) +led_config_t g_led_config = { { + { 27, 26, 20, 19, 12, 11, 4, 3 }, + { 28, 25, 21, 18, 13, 10, 5, 2 }, + { 29, 24, 22, 17, 14, 9, 6, 1 }, + { 30, 31, 23, 16, 15, 8, 7, 0 }, + { 60, 59, 52, 51, 44, 43, 37, 36 }, + { 61, 58, 53, 50, 45, 42, 38, 35 }, + { 62, 57, 54, 49, 46, 41, 39, 34 }, + { 63, 56, 55, 48, 47, 40, 32, 33 } +}, { + { 3, 35 }, { 0, 26 }, { 0, 17 }, { 0, 6 }, { 14, 5 }, { 15, 16 }, { 16, 25 }, { 17, 34 }, + { 31, 29 }, { 31, 19 }, { 30, 11 }, { 30, 1 }, { 45, 0 }, { 45, 8 }, { 46, 17 }, { 46, 27 }, + { 60, 27 }, { 60, 18 }, { 60, 9 }, { 60, 0 }, { 74, 2 }, { 74, 11 }, { 75, 20 }, { 74, 28 }, + { 89, 30 }, { 89, 19 }, { 89, 7 }, { 70, 38 }, { 82, 41 }, { 93, 45 }, { 104, 50 }, { 74, 64 }, + { 149, 64 }, { 119, 50 }, { 130, 45 }, { 141, 41 }, { 153, 38 }, { 134, 7 }, { 134, 19 }, { 134, 30 }, + { 149, 28 }, { 148, 20 }, { 149, 11 }, { 149, 2 }, { 163, 0 }, { 163, 9 }, { 163, 18 }, { 163, 27 }, + { 177, 27 }, { 177, 17 }, { 178, 8 }, { 178, 0 }, { 193, 1 }, { 193, 11 }, { 192, 19 }, { 192, 29 }, + { 206, 34 }, { 207, 25 }, { 208, 16 }, { 209, 5 }, { 224, 6 }, { 223, 17 }, { 223, 26 }, { 220, 35 } +}, { + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4 +} }; + + +static struct { + uint8_t b; + uint8_t g; + uint8_t r; +} __attribute__((packed)) led_state[64]; + +static void set_color(int index, uint8_t r, uint8_t g, uint8_t b) { + led_state[index].r = r; + led_state[index].g = g; + led_state[index].b = b; +} + +static void set_color_all(uint8_t r, uint8_t g, uint8_t b) { + for (int i=0; i. + */ +#pragma once + +#include +#include + +void set_all_leds_to(uint8_t r, uint8_t g, uint8_t b); +void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b); diff --git a/keyboards/keyboardio/model01/matrix.c b/keyboards/keyboardio/model01/matrix.c new file mode 100644 index 0000000000..f1f9024c7c --- /dev/null +++ b/keyboards/keyboardio/model01/matrix.c @@ -0,0 +1,94 @@ +/* Copyright 2018 James Laird-Wah + * + * 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 . + */ +#include +#include +#include +#include "model01.h" + +/* If no key events have occurred, the scanners will time out on reads. + * So we don't want to be too permissive here. */ +#define I2C_TIMEOUT 10 + +static matrix_row_t rows[MATRIX_ROWS]; +#define ROWS_PER_HAND (MATRIX_ROWS / 2) + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +static int i2c_read_hand(int hand) { + uint8_t buf[5]; + i2c_status_t ret = i2c_receive(I2C_ADDR(hand), buf, sizeof(buf), I2C_TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) + return 1; + + if (buf[0] != TWI_REPLY_KEYDATA) + return 2; + + int start_row = hand ? ROWS_PER_HAND : 0; + uint8_t *out = &rows[start_row]; + memcpy(out, &buf[1], 4); + return 0; +} + +static int i2c_set_keyscan_interval(int hand, int delay) { + uint8_t buf[] = {TWI_CMD_KEYSCAN_INTERVAL, delay}; + i2c_status_t ret = i2c_transmit(I2C_ADDR(hand), buf, sizeof(buf), I2C_TIMEOUT); + return ret; +} + +void matrix_init(void) { + /* Ensure scanner power is on - else right hand will not work */ + DDRC |= _BV(7); + PORTC |= _BV(7); + + i2c_init(); + i2c_set_keyscan_interval(LEFT, 2); + i2c_set_keyscan_interval(RIGHT, 2); + memset(rows, 0, sizeof(rows)); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + uint8_t ret = 0; + ret |= i2c_read_hand(LEFT); + ret |= i2c_read_hand(RIGHT); + matrix_scan_quantum(); + return ret; +} + +inline +matrix_row_t matrix_get_row(uint8_t row) { + return rows[row]; +} + +void matrix_print(void) { + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + pbin_reverse16(matrix_get_row(row)); + print("\n"); + } +} + +/* vim: set ts=2 sw=2 et: */ diff --git a/keyboards/keyboardio/model01/model01.c b/keyboards/keyboardio/model01/model01.c new file mode 100644 index 0000000000..29615ca866 --- /dev/null +++ b/keyboards/keyboardio/model01/model01.c @@ -0,0 +1,38 @@ +/* Copyright 2018 James Laird-Wah + * + * 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 . + */ +#include +#include +#include +#include "model01.h" + +void matrix_init_kb(void) { + /* the bootloader can leave LEDs on, so */ + set_all_leds_to(0, 0, 0); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + diff --git a/keyboards/keyboardio/model01/model01.h b/keyboards/keyboardio/model01/model01.h new file mode 100644 index 0000000000..a83e33cd86 --- /dev/null +++ b/keyboards/keyboardio/model01/model01.h @@ -0,0 +1,50 @@ +/* Copyright 2018 James Laird-Wah + * + * 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 . + */ +#pragma once + +#include + +#define LAYOUT( \ + L07, L06, L05, L04, L03, L02, R05, R04, R03, R02, R01, R00, \ + L17, L16, L15, L14, L13, L12, L01, R06, R15, R14, R13, R12, R11, R10, \ + L27, L26, L25, L24, L23, L22, L11, R16, R25, R24, R23, R22, R21, R20, \ + L37, L36, L35, L34, L33, L32, L21, R26, R35, R34, R33, R32, R31, R30, \ + L00, R07, \ + L10, R17, \ + L20, R27, \ + L30, R37, \ + L31, R36 \ + ) { \ + {L00, L01, L02, L03, L04, L05, L06, L07}, \ + {L10, L11, L12, L13, L14, L15, L16, L17}, \ + {L20, L21, L22, L23, L24, L25, L26, L27}, \ + {L30, L31, L32, L33, L34, L35, L36, L37}, \ + {R00, R01, R02, R03, R04, R05, R06, R07}, \ + {R10, R11, R12, R13, R14, R15, R16, R17}, \ + {R20, R21, R22, R23, R24, R25, R26, R27}, \ + {R30, R31, R32, R33, R34, R35, R36, R37} \ + } + +#include "wire-protocol-constants.h" +#define I2C_ADDR_LEFT (0x58 << 1) +#define I2C_ADDR_RIGHT (I2C_ADDR_LEFT + 6) +#define I2C_ADDR(hand) ((hand) ? I2C_ADDR_RIGHT : I2C_ADDR_LEFT) +#define LEFT 0 +#define RIGHT 1 + +#include "leds.h" + +/* vim: set ts=2 sw=2 et: */ diff --git a/keyboards/keyboardio/model01/readme.md b/keyboards/keyboardio/model01/readme.md new file mode 100644 index 0000000000..5f55a88128 --- /dev/null +++ b/keyboards/keyboardio/model01/readme.md @@ -0,0 +1,37 @@ +# Keyboardio Model 01 + +A split keyboard. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Keyboardio Model 01 +* Hardware Availability: [Keyboardio](https://shop.keyboard.io) + +Make example for this keyboard (after setting up your build environment): + + make keyboardio/model01:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Programming the Keyboard + +To program the keyboard, if you have avrdude installed: + + make keyboardio/model01:default:flash + +When prompted to reset your keyboard, press the prog key at upper left. If the +keyboard does not reset, you can hold the prog key while plugging it into your +computer. The prog key will light up red in programming mode. + +## Features + +This implements the standard keymap, including mousekeys. + +It doesn't do cursor warping - QMK does not support absolute mouse positioning. + +LED support is limited. Gamma compensation and the high speed batch update +functions supported by the hardware are not implemented. The high current power +switch is also not implemented, so if you try and turn all the LEDs on at full +brightness, something may conk out. + +Hotplugging the two halves works but is not extensively tested. diff --git a/keyboards/keyboardio/model01/rules.mk b/keyboards/keyboardio/model01/rules.mk new file mode 100644 index 0000000000..29c028ac85 --- /dev/null +++ b/keyboards/keyboardio/model01/rules.mk @@ -0,0 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode + +CUSTOM_MATRIX = yes +QUANTUM_LIB_SRC += i2c_master.c +SRC += leds.c \ + matrix.c + +# You can set RGB_MATRIX_ENABLE = no in your rules.mk to disable this and save the Flash +RGB_MATRIX_ENABLE = custom # Enable RGB matrix effects. diff --git a/keyboards/keyboardio/model01/wire-protocol-constants.h b/keyboards/keyboardio/model01/wire-protocol-constants.h new file mode 100644 index 0000000000..90a528582a --- /dev/null +++ b/keyboards/keyboardio/model01/wire-protocol-constants.h @@ -0,0 +1,53 @@ +/* + * This file is taken from the KeyboardioScanner module: + * https://github.com/keyboardio/KeyboardioScanner/blob/master/wire-protocol-constants.h + * + * Copyright (C) 2015-2018 Keyboard.io, Inc + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#pragma once + +#define TWI_CMD_NONE 0x00 +#define TWI_CMD_VERSION 0x01 +#define TWI_CMD_KEYSCAN_INTERVAL 0x02 +#define TWI_CMD_LED_SET_ALL_TO 0x03 +#define TWI_CMD_LED_SET_ONE_TO 0x04 +#define TWI_CMD_COLS_USE_PULLUPS 0x05 +#define TWI_CMD_LED_SPI_FREQUENCY 0x06 + +#define LED_SPI_FREQUENCY_4MHZ 0x07 +#define LED_SPI_FREQUENCY_2MHZ 0x06 +#define LED_SPI_FREQUENCY_1MHZ 0x05 +#define LED_SPI_FREQUENCY_512KHZ 0x04 +#define LED_SPI_FREQUENCY_256KHZ 0x03 +#define LED_SPI_FREQUENCY_128KHZ 0x02 +#define LED_SPI_FREQUENCY_64KHZ 0x01 +#define LED_SPI_OFF 0x00 + + +// 512KHZ seems to be the sweet spot in early testing +// so make it the default +#define LED_SPI_FREQUENCY_DEFAULT LED_SPI_FREQUENCY_512KHZ + + +#define TWI_CMD_LED_BASE 0x80 + +#define TWI_REPLY_NONE 0x00 +#define TWI_REPLY_KEYDATA 0x01 diff --git a/keyboards/keyboardio/readme.md b/keyboards/keyboardio/readme.md new file mode 100644 index 0000000000..d9ce48c236 --- /dev/null +++ b/keyboards/keyboardio/readme.md @@ -0,0 +1,18 @@ +# Keyboardio + +Keyboardio are an US-based Keyboard maker, known for their +[Model01](https://shop.keyboard.io/collections/frontpage/products/model-01-keyboard), +and more recently, the Keyboardio +[Atreus](https://www.kickstarter.com/projects/keyboardio/atreus) keyboards. + +## Online Stores + +**Website:** https://shop.keyboard.io/ + +## Social Media + +**Discord:** https://discord.gg/4az77sf +**Forums:** https://community.keyboard.io/ +**Twitter:** https://twitter.com/keyboardio +**Facebook:** https://facebook.com/keyboardio +**Blog:** https://blog.keyboard.io/ diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index 024df59127..8c01bcb83d 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -52,16 +52,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , TT(_MOUSE) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , - KC_GRAVE, KC_ESC, KC_FN4, LT(_SYMB, KC_RIGHT), + KC_GRAVE, KC_ESC, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT), KC_LCTL,KC_LALT, KC_DEL, KC_BSPC, KC_DEL ,TT(_MOUSE) , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,KC_FN1 ,TT(_SYMB), KC_NO, RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,TG(_MOUSE) ,TT(_SYMB), KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_RSFT, - LT(_SYMB, KC_UP), KC_FN7, KC_LBRC ,KC_RBRC, + LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), KC_LBRC ,KC_RBRC, KC_RALT,KC_RGUI, KC_PGUP, KC_PGDN,KC_ENTER ,KC_SPC @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_CIRC, KC_LCBR, KC_RCBR, KC_AT, KC_PERC, _______, KC_EXLM, KC_HASH, KC_0, KC_EQL, KC_TILD, _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE, - _______, KC_COLON, KC_FN4, LT(_SYMB, KC_RIGHT), + _______, KC_COLON, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT), _______, _______, _______, _______, _______, RESET, @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______, KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV, KC_DLR, KC_2, KC_3, KC_4, KC_5, XXXXXXX, - LT(_SYMB, KC_UP), KC_FN7, KC_BSLS, XXXXXXX, + LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), KC_BSLS, XXXXXXX, _______, _______, _______, _______, _______, _______ @@ -149,7 +149,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_SLSH, RSFT(KC_COMM), RSFT(KC_DOT), _______, _______, _______, _______, RSFT(KC_LBRC), RSFT(KC_RBRC), _______, _______, _______, KC_EQL, RSFT(KC_9), RSFT(KC_0), _______, _______, - _______, _______, KC_FN4, LT(_SYMB, KC_RIGHT), + _______, _______, MT(MOD_LGUI,KC_LEFT), LT(_SYMB, KC_RIGHT), _______, _______, _______, _______, _______, RESET, @@ -158,7 +158,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_PLUS, KC_MINS, _______, _______, _______, _______, KC_EQL, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, - LT(_SYMB, KC_UP), KC_FN7, _______, _______, + LT(_SYMB, KC_UP), MT(MOD_LGUI,KC_DOWN), _______, _______, _______, _______, _______, _______, _______, _______ @@ -192,7 +192,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EXLM ,KC_AT, KC_HASH, KC_DLR ,KC_PERC , _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGUP, - KC_FN1, LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO, + TG(_MOUSE), LGUI(KC_Z),LGUI(KC_X),LGUI(KC_C),LGUI(KC_V), KC_NO, _______, KC_NO, KC_NO, KC_UP, KC_NO, KC_PGDN, _______, _______, KC_NO, KC_NO, _______, _______, @@ -261,16 +261,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(_MOUSE) , - [4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT), - [7]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_DOWN), - - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c index b0394659cc..a7fa4f55d3 100644 --- a/keyboards/lets_split/keymaps/mjt/keymap.c +++ b/keyboards/lets_split/keymaps/mjt/keymap.c @@ -152,7 +152,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistent_default_layer_set(1UL<<_QWERTY); } @@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistent_default_layer_set(1UL<<_COLEMAK); } @@ -170,7 +170,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/lets_split/keymaps/piemod/keymap.c b/keyboards/lets_split/keymaps/piemod/keymap.c index d789b7a8be..68e7e0ba05 100644 --- a/keyboards/lets_split/keymaps/piemod/keymap.c +++ b/keyboards/lets_split/keymaps/piemod/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_QUOTE, LT(7, KC_COMMA), KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, \ KC_TAB, LT(1, KC_A), LT(2, KC_O), LT(3, KC_E), LT(4, KC_U), KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, \ KC_LSHIFT, KC_SCOLON, LT(5, KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, \ - F(1), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + C(KC_LALT), LT(6, KC_LCTRL), KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ ), [_ARROW] = LAYOUT( \ @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SYMBOL] = LAYOUT( \ KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ - KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(2), \ + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, S(KC_SLSH), \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, \ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL \ ), @@ -81,19 +81,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_NO, KC_NO, KC_NO \ ) }; - -enum function_id { - TEENSY_KEY, - CUSTOM_KEY, - L_CTRL_ALT_ENT, - R_CTRL_ALT_ENT, -}; - -int CAPSLOCKED = 0; - - const uint16_t PROGMEM fn_actions[] = { - // Special Keys - [1] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. - // Symbols - [2] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. - }; diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index 50bf2beb32..0bdaa1f76e 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -19,10 +19,11 @@ along with this program. If not, see . #pragma once #include "config_common.h" -#include -#define USE_I2C -#define USE_SERIAL +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif #if !defined(NO_ACTION_MACRO) #define NO_ACTION_MACRO @@ -30,3 +31,8 @@ along with this program. If not, see . #if !defined(NO_ACTION_FUNCTION) #define NO_ACTION_FUNCTION #endif + +#define DIODE_DIRECTION COL2ROW + +// Use the lily version to get the Lily58 logo instead of the qmk logo +#define OLED_FONT_H "lib/glcdfont_lily.c" diff --git a/keyboards/lily58/i2c.c b/keyboards/lily58/i2c.c deleted file mode 100755 index 4bee5c6398..0000000000 --- a/keyboards/lily58/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/keyboards/lily58/keymaps/chuan/config.h b/keyboards/lily58/keymaps/chuan/config.h new file mode 100644 index 0000000000..fa93060db1 --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/config.h @@ -0,0 +1,64 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// #define USE_MATRIX_I2C + +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// #define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD + +/* define tapping term */ +#define TAPPING_TERM 200 + + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } + + + /* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +*/ diff --git a/keyboards/lily58/keymaps/chuan/keymap.c b/keyboards/lily58/keymaps/chuan/keymap.c new file mode 100644 index 0000000000..da49e67a0e --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/keymap.c @@ -0,0 +1,230 @@ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |HYPER | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| - | | + |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LCtl | LGUI |LALT | /Space / \Space \ |RAISE | [ | ] | + * | | | |/ LOWER / \ \ | ' | | | + * `----------------------------' '------''--------------------' + */ + + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + ALL_T(KC_GRV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MINS, MEH_T(KC_EQL), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTRL, KC_LGUI, KC_LALT,LT(_LOWER, KC_SPC), KC_SPC, LT(2,KC_QUOT), KC_LBRC, KC_RBRC \ +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | - | + * |------+------+------+------+------+------| cmd spc| | |------+------+------+------+------+------| + * | | | |ctrl c| | |-------| |-------| | - | _ | [ | ] | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE | { | } | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_LOWER] = LAYOUT( + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______,_______, _______, _______,\ + _______, _______, _______, C(KC_C), _______, _______, LGUI(KC_SPC), _______, _______, KC_MINS, KC_UNDS , KC_LBRC, KC_RBRC, KC_PIPE, \ + _______, _______, _______, _______, _______, RAISE, KC_LCBR, KC_RCBR\ +), +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | \ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + +[_RAISE] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_DEL, _______, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_6, LCTL(LSFT(KC_TAB)),KC_UP,LCTL(KC_TAB), KC_0, _______, \ + _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_RGHT, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, TG(_ADJUST),KC_PLUS, KC_MUTE ,KC_VOLD ,KC_VOLU, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ \ +), +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | 7 | 8 | 9 |RGB ON| HUE+ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | MODE | HUE- | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | 1 | 2 | 3 | SAT+ | VAL+ | + * |------+------+------+------+------+------| | |DEFAULT|------+------+------+------+------+------| + * | | | | | | |-------| |-------| | 0 | 0 | . | SAT- | VAL- | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7 , KC_8 , KC_9 , RGB_TOG, RGB_HUI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_4 , KC_5 , KC_6 , RGB_MOD, RGB_HUD, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1 , KC_2 , KC_3 , RGB_SAI, RGB_VAI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(_ADJUST), XXXXXXX, KC_0 , KC_0 , KC_DOT, RGB_SAD, RGB_VAD,\ + _______, _______, _______, _______, _______, _______,KC_BSPC, _______ \ + ) +}; + +int RGB_current_mode; + +int counter = 0; +int lastIndex = 9; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +const char *read_mode_icon(bool swap); +const char *read_host_led_state(void); +void set_timelog(void); +const char *read_timelog(void); + +char encoder_debug[24]; + +void oled_task_user(void) { + // Host Keyboard Layer Status + snprintf(encoder_debug, sizeof(encoder_debug), "%i %i", counter, lastIndex ); + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + // oled_write_ln(read_keylog(), false); + // oled_write_ln(read_keylogs(), false); + // oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + oled_write_ln(read_host_led_state(), false); + oled_write_ln(encoder_debug, false); + // oled_write_ln(read_timelog(), false); + } else { + oled_write(read_logo(), false); + // oled_write_ln(encoder_debug, false); + } +} +#endif //OLED_DRIVER_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + // set_keylog(keycode, record); +#endif + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + lastIndex = index; + if (clockwise) { + counter++; + tap_code(KC_PGDN); + } else { + counter--; + tap_code(KC_PGUP); + } +} diff --git a/keyboards/lily58/keymaps/chuan/rules.mk b/keyboards/lily58/keymaps/chuan/rules.mk new file mode 100644 index 0000000000..3e05cb7d92 --- /dev/null +++ b/keyboards/lily58/keymaps/chuan/rules.mk @@ -0,0 +1,11 @@ +EXTRAKEY_ENABLE = yes +NKRO_ENABLE = yes +ENCODER_ENABLE = yes +# If you want to change the display of OLED, you need to change here +SRC += ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/mode_icon_reader.c \ + ./lib/host_led_state_reader.c \ + ./lib/timelogger.c \ + ./lib/keylogger.c \ diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index 58bbdc5e9d..6b9e52c05e 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD @@ -49,4 +47,4 @@ along with this program. If not, see . #define RGBLED_NUM 14 // Number of LEDs #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_SLEEP -*/ \ No newline at end of file +*/ diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index f36248e12d..f0fbaa8b0d 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -8,8 +8,6 @@ #include "ssd1306.h" #endif - - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -135,16 +133,18 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE -// When add source files to SRC in rules.mk, you can use functions. +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +// When you add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); const char *read_logo(void); void set_keylog(uint16_t keycode, keyrecord_t *record); @@ -156,42 +156,24 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void matrix_scan_user(void) { - iota_gfx_task(); -} - -void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { +void oled_task_user(void) { + if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } else { - matrix_write(matrix, read_logo()); - } -} - -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; + oled_write(read_logo(), false); } } - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} -#endif//SSD1306OLED +#endif // OLED_DRIVER_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index b39305767b..a5b6303a1e 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -15,13 +15,13 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_DRIVER_ENABLE= yes # OLED display # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index 13b6cb1687..d258fbcbc0 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' - */ + */ [_ADJUST] = LAYOUT( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -137,14 +137,16 @@ void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif } -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} // When add source files to SRC in rules.mk, you can use functions. const char *read_layer_state(void); @@ -165,35 +167,22 @@ void matrix_scan_user(void) { void matrix_render_user(struct CharacterMatrix *matrix) { if (is_master) { // If you want to change the display of OLED, you need to change here - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_keylog()); - matrix_write_ln(matrix, read_keylogs()); - //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); - //matrix_write_ln(matrix, read_host_led_state()); - //matrix_write_ln(matrix, read_timelog()); + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + //oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false); + //oled_write_ln(read_host_led_state(), false); + //oled_write_ln(read_timelog(), false); } else { - matrix_write(matrix, read_logo()); + oled_write(read_logo(), false); } } -void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); -} #endif//SSD1306OLED bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef SSD1306OLED +#ifdef OLED_DRIVER_ENABLE set_keylog(keycode, record); #endif // set_timelog(); @@ -236,4 +225,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 922fac6b69..0db9ac50fa 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk @@ -13,15 +13,14 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_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 # If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ +SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ ./lib/logo_reader.c \ ./lib/keylogger.c \ diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont.c deleted file mode 100644 index 94f026ba97..0000000000 --- a/keyboards/lily58/lib/glcdfont.c +++ /dev/null @@ -1,232 +0,0 @@ -// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. -// See gfxfont.h for newer custom bitmap font info. - -#include "progmem.h" - -// Standard ASCII 5x7 font -const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, - 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, - 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, - 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, - 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, - 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, - 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, - 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, - 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, - 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, - 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, - 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, - 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, - 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, - 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, - 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, - 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, - 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, - 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, - 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, - 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, - 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, - 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, - 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, - 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, - 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, - 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, - 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, - 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, - 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, - 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, - 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, - 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, - 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, - 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, - 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, - 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, - 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, - 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, - 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, - 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, - 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, - 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, - 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, - 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, - 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, - 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, - 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, - 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, - 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, - 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, - 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, - 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, - 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, - 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, - 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, - 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, - 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, - 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, - 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, - 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, - 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, - 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, - 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, - 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, - 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, - 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, - 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, - 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, - 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, - 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, - 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, - 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, - 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, - 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, - 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, - 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, - 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, - 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, - 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, - 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, - 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, - 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, - 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, - 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, - 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, - 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, - 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, - 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, - 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, - 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, - 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, - 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, - 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, - 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, - 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, - 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, - 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, - 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, - 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, - 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, - 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, - 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, - 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, - 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xE0, 0x70, 0x18, - 0x0C, 0x18, 0x30, 0xE0, 0x80, 0x00, - 0x00, 0x10, 0xF8, 0x90, 0x10, 0x30, - 0x78, 0x30, 0x10, 0xB8, 0xFC, 0x38, - 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xF8, 0xFC, 0xF8, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, - 0x9C, 0x1C, 0x00, 0x00, 0x00, 0x00, - 0xF8, 0xFC, 0xF8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x1C, 0xFC, 0xF8, - 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x80, 0xE0, 0xF8, 0x7C, 0x1C, - 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC, - 0xFC, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, - 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, - 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, - 0x1C, 0x3C, 0xF8, 0xF0, 0xE0, 0x00, - 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, - 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, - 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, - 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, - 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, - 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, - 0xBC, 0xE0, 0x81, 0x81, 0x81, 0x83, - 0x83, 0x82, 0x87, 0x0C, 0x18, 0x30, - 0x60, 0xC0, 0x00, 0x00, 0x1F, 0xFE, - 0x90, 0xB9, 0xFF, 0xBB, 0x91, 0x98, - 0x3C, 0x18, 0x11, 0x13, 0x3F, 0x11, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, - 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x0F, 0x7F, 0xF8, 0xE0, 0x80, 0xF0, - 0xFC, 0x3F, 0x0F, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3F, - 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x3C, - 0x78, 0xF8, 0xF0, 0xE0, 0x80, 0x00, - 0x00, 0x00, 0x00, 0xC3, 0xE7, 0xFF, - 0x7E, 0x3C, 0x38, 0x78, 0x78, 0x70, - 0x70, 0xF8, 0xFF, 0xDF, 0x87, 0x00, - 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, - 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, - 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, - 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, - 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x18, 0x3C, 0x24, 0x66, 0x63, 0x41, - 0xC1, 0x81, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x80, 0x81, 0xC1, 0x41, 0x62, - 0x38, 0x6C, 0x4C, 0xC6, 0x81, 0x81, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, - 0xC1, 0x43, 0x62, 0x36, 0x1C, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0xC0, - 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, - 0xC0, 0x80, 0x00, 0x00, 0x00, 0x7F, - 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, - 0x7F, 0xFF, 0xFF, 0xC0, 0x80, 0x00, - 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, - 0xC0, 0xE0, 0xF9, 0x7F, 0x1F, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x70, 0xF0, 0xE0, - 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, - 0xF0, 0xF8, 0x7F, 0x3F, 0x0F, 0x00, - 0x00, 0x00, 0x0F, 0x3F, 0x7F, 0xF9, - 0xE0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, - 0xC0, 0xE0, 0xF9, 0x7F, 0x3F, 0x1F, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; diff --git a/keyboards/lily58/lib/glcdfont_lily.c b/keyboards/lily58/lib/glcdfont_lily.c new file mode 100644 index 0000000000..0aa69ea822 --- /dev/null +++ b/keyboards/lily58/lib/glcdfont_lily.c @@ -0,0 +1,233 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +// Modified to show the Lily58 logo instead of the qmk logo +#include "progmem.h" + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xE0, 0x70, 0x18, + 0x0C, 0x18, 0x30, 0xE0, 0x80, 0x00, + 0x00, 0x10, 0xF8, 0x90, 0x10, 0x30, + 0x78, 0x30, 0x10, 0xB8, 0xFC, 0x38, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xF8, 0xFC, 0xF8, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, + 0x9C, 0x1C, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xFC, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1C, 0xFC, 0xF8, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xE0, 0xF8, 0x7C, 0x1C, + 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC, + 0xFC, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, + 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, + 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, + 0x1C, 0x3C, 0xF8, 0xF0, 0xE0, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, + 0xBC, 0xE0, 0x81, 0x81, 0x81, 0x83, + 0x83, 0x82, 0x87, 0x0C, 0x18, 0x30, + 0x60, 0xC0, 0x00, 0x00, 0x1F, 0xFE, + 0x90, 0xB9, 0xFF, 0xBB, 0x91, 0x98, + 0x3C, 0x18, 0x11, 0x13, 0x3F, 0x11, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x0F, 0x7F, 0xF8, 0xE0, 0x80, 0xF0, + 0xFC, 0x3F, 0x0F, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3F, + 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x3C, + 0x78, 0xF8, 0xF0, 0xE0, 0x80, 0x00, + 0x00, 0x00, 0x00, 0xC3, 0xE7, 0xFF, + 0x7E, 0x3C, 0x38, 0x78, 0x78, 0x70, + 0x70, 0xF8, 0xFF, 0xDF, 0x87, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x3C, 0x24, 0x66, 0x63, 0x41, + 0xC1, 0x81, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x81, 0xC1, 0x41, 0x62, + 0x38, 0x6C, 0x4C, 0xC6, 0x81, 0x81, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, + 0xC1, 0x43, 0x62, 0x36, 0x1C, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, + 0xC0, 0x80, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, + 0x7F, 0xFF, 0xFF, 0xC0, 0x80, 0x00, + 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, + 0xC0, 0xE0, 0xF9, 0x7F, 0x1F, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0xF0, 0xE0, + 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, + 0xF0, 0xF8, 0x7F, 0x3F, 0x0F, 0x00, + 0x00, 0x00, 0x0F, 0x3F, 0x7F, 0xF9, + 0xE0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xE0, 0xF9, 0x7F, 0x3F, 0x1F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/lily58/lib/host_led_state_reader.c b/keyboards/lily58/lib/host_led_state_reader.c index 0e22173b1d..589dd6152e 100644 --- a/keyboards/lily58/lib/host_led_state_reader.c +++ b/keyboards/lily58/lib/host_led_state_reader.c @@ -1,15 +1,16 @@ #include +#include "led.h" +#include "host.h" #include "lily58.h" char host_led_state_str[24]; const char *read_host_led_state(void) { - uint8_t leds = host_keyboard_leds(); snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", - (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); + (IS_HOST_LED_ON(USB_LED_NUM_LOCK)) ? "on" : "- ", + (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) ? "on" : "- ", + (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) ? "on" : "- "); return host_led_state_str; } diff --git a/keyboards/lily58/lib/keylogger.c b/keyboards/lily58/lib/keylogger.c index a1bd476d20..2fc3e663ec 100644 --- a/keyboards/lily58/lib/keylogger.c +++ b/keyboards/lily58/lib/keylogger.c @@ -1,4 +1,5 @@ #include +#include "action.h" #include "lily58.h" char keylog_str[24] = {}; diff --git a/keyboards/lily58/lib/layer_state_reader.c b/keyboards/lily58/lib/layer_state_reader.c index 48674b0673..0e9dd7039b 100644 --- a/keyboards/lily58/lib/layer_state_reader.c +++ b/keyboards/lily58/lib/layer_state_reader.c @@ -4,10 +4,10 @@ #include "lily58.h" #define L_BASE 0 -#define L_LOWER 2 -#define L_RAISE 4 -#define L_ADJUST 8 -#define L_ADJUST_TRI 14 +#define L_LOWER (1 << 1) +#define L_RAISE (1 << 2) +#define L_ADJUST (1 << 3) +#define L_ADJUST_TRI (L_ADJUST | L_RAISE | L_LOWER) char layer_state_str[24]; diff --git a/keyboards/lily58/lib/mode_icon_reader.c b/keyboards/lily58/lib/mode_icon_reader.c index 2bce4a71b0..27c6d92cd0 100644 --- a/keyboards/lily58/lib/mode_icon_reader.c +++ b/keyboards/lily58/lib/mode_icon_reader.c @@ -1,4 +1,5 @@ #include +#include #include "lily58.h" char mode_icon[24]; diff --git a/keyboards/lily58/lib/timelogger.c b/keyboards/lily58/lib/timelogger.c index bfbfbe8a21..b00c13cb0a 100644 --- a/keyboards/lily58/lib/timelogger.c +++ b/keyboards/lily58/lib/timelogger.c @@ -1,4 +1,5 @@ #include +#include "timer.h" #include "lily58.h" char timelog_str[24] = {}; diff --git a/keyboards/lily58/lily58.c b/keyboards/lily58/lily58.c index eacd90a82d..03975057f4 100644 --- a/keyboards/lily58/lily58.c +++ b/keyboards/lily58/lily58.c @@ -1,10 +1,5 @@ #include "lily58.h" -#include "ssd1306.h" bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#ifdef SSD1306OLED - return process_record_gfx(keycode,record) && process_record_user(keycode, record); -#else return process_record_user(keycode, record); -#endif -} \ No newline at end of file +} diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 4e8e3a7c9c..adcf11b52b 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -36,8 +36,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -/* define tapping term */ -#define TAPPING_TERM 100 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lily58/rev1/rules.mk b/keyboards/lily58/rev1/rules.mk index 6028b5a5b9..e69de29bb2 100644 --- a/keyboards/lily58/rev1/rules.mk +++ b/keyboards/lily58/rev1/rules.mk @@ -1,3 +0,0 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c diff --git a/keyboards/lily58/rev1/split_scomm.c b/keyboards/lily58/rev1/split_scomm.c deleted file mode 100755 index a1fe6ba5b8..0000000000 --- a/keyboards/lily58/rev1/split_scomm.c +++ /dev/null @@ -1,91 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3]); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/lily58/rev1/split_scomm.h b/keyboards/lily58/rev1/split_scomm.h deleted file mode 100755 index 873d8939d8..0000000000 --- a/keyboards/lily58/rev1/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/lily58/rev1/split_util.h b/keyboards/lily58/rev1/split_util.h deleted file mode 100755 index 687ca19bd3..0000000000 --- a/keyboards/lily58/rev1/split_util.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H - -#include -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index d413510bac..34b512d59a 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -29,19 +29,7 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes - -SRC += i2c.c -SRC += serial.c -SRC += ssd1306.c - -# A workaround until #7089 is merged. -# serial.c must not be compiled with the -lto option. -# The current LIB_SRC has a side effect with the -fno-lto option, so use it. -LIB_SRC += serial.c - -# if firmware size over limit, try this option -# CFLAGS += -flto +OLED_DRIVER_ENABLE = yes # OLED display +SPLIT_KEYBOARD = yes DEFAULT_FOLDER = lily58/rev1 diff --git a/keyboards/lily58/serial.h b/keyboards/lily58/serial.h deleted file mode 100755 index 7e0c0847a4..0000000000 --- a/keyboards/lily58/serial.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE Simple API (OLD API, compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ -#if SERIAL_SLAVE_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -#endif -#if SERIAL_MASTER_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -#endif - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); - -#endif // USE Simple API - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/lily58/serial_config.h b/keyboards/lily58/serial_config.h deleted file mode 100644 index 4fab8e8ddf..0000000000 --- a/keyboards/lily58/serial_config.h +++ /dev/null @@ -1,4 +0,0 @@ -#ifndef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION -#endif diff --git a/keyboards/lily58/ssd1306.c b/keyboards/lily58/ssd1306.c deleted file mode 100755 index 20c2738db7..0000000000 --- a/keyboards/lily58/ssd1306.c +++ /dev/null @@ -1,344 +0,0 @@ -#ifdef SSD1306OLED - -#include "ssd1306.h" -#include "i2c.h" -#include -#include "print.h" -#ifdef ADAFRUIT_BLE_ENABLE -#include "adafruit_ble.h" -#endif -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#endif -#include "sendchar.h" -#include "timer.h" - -extern const unsigned char font[] PROGMEM; - -// Set this to 1 to help diagnose early startup problems -// when testing power-on with ble. Turn it off otherwise, -// as the latency of printing most of the debug info messes -// with the matrix scan, causing keys to drop. -#define DEBUG_TO_SCREEN 0 - -//static uint16_t last_battery_update; -//static uint32_t vbat; -//#define BatteryUpdateInterval 10000 /* milliseconds */ - -// 'last_flush' is declared as uint16_t, -// so this must be less than 65535 -#define ScreenOffInterval 60000 /* milliseconds */ -#if DEBUG_TO_SCREEN -static uint8_t displaying; -#endif -static uint16_t last_flush; - -static bool force_dirty = true; - -// Write command sequence. -// Returns true on success. -static inline bool _send_cmd1(uint8_t cmd) { - bool res = false; - - if (i2c_start_write(SSD1306_ADDRESS)) { - xprintf("failed to start write to %d\n", SSD1306_ADDRESS); - goto done; - } - - if (i2c_master_write(0x0 /* command byte follows */)) { - print("failed to write control byte\n"); - - goto done; - } - - if (i2c_master_write(cmd)) { - xprintf("failed to write command %d\n", cmd); - goto done; - } - res = true; -done: - i2c_master_stop(); - return res; -} - -// Write 2-byte command sequence. -// Returns true on success -static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { - if (!_send_cmd1(cmd)) { - return false; - } - return _send_cmd1(opr); -} - -// Write 3-byte command sequence. -// Returns true on success -static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { - if (!_send_cmd1(cmd)) { - return false; - } - if (!_send_cmd1(opr1)) { - return false; - } - return _send_cmd1(opr2); -} - -#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} -#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} -#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} - -static void clear_display(void) { - matrix_clear(&display); - - // Clear all of the display bits (there can be random noise - // in the RAM on startup) - send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); - send_cmd3(ColumnAddr, 0, DisplayWidth - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < DisplayWidth; ++col) { - i2c_master_write(0); - } - } - - display.dirty = false; - -done: - i2c_master_stop(); -} - -#if DEBUG_TO_SCREEN -#undef sendchar -static int8_t capture_sendchar(uint8_t c) { - sendchar(c); - iota_gfx_write_char(c); - - if (!displaying) { - iota_gfx_flush(); - } - return 0; -} -#endif - -bool iota_gfx_init(bool rotate) { - bool success = false; - - i2c_master_init(); - send_cmd1(DisplayOff); - send_cmd2(SetDisplayClockDiv, 0x80); - send_cmd2(SetMultiPlex, DisplayHeight - 1); - - send_cmd2(SetDisplayOffset, 0); - - - send_cmd1(SetStartLine | 0x0); - send_cmd2(SetChargePump, 0x14 /* Enable */); - send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); - - if(rotate){ - // the following Flip the display orientation 180 degrees - send_cmd1(SegRemap); - send_cmd1(ComScanInc); - }else{ - // Flips the display orientation 0 degrees - send_cmd1(SegRemap | 0x1); - send_cmd1(ComScanDec); - } - - send_cmd2(SetComPins, 0x2); - send_cmd2(SetContrast, 0x8f); - send_cmd2(SetPreCharge, 0xf1); - send_cmd2(SetVComDetect, 0x40); - send_cmd1(DisplayAllOnResume); - send_cmd1(NormalDisplay); - send_cmd1(DeActivateScroll); - send_cmd1(DisplayOn); - - send_cmd2(SetContrast, 0); // Dim - - clear_display(); - - success = true; - - iota_gfx_flush(); - -#if DEBUG_TO_SCREEN - print_set_sendchar(capture_sendchar); -#endif - -done: - return success; -} - -bool iota_gfx_off(void) { - bool success = false; - - send_cmd1(DisplayOff); - success = true; - -done: - return success; -} - -bool iota_gfx_on(void) { - bool success = false; - - send_cmd1(DisplayOn); - success = true; - -done: - return success; -} - -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { - *matrix->cursor = c; - ++matrix->cursor; - - if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { - // We went off the end; scroll the display upwards by one line - memmove(&matrix->display[0], &matrix->display[1], - MatrixCols * (MatrixRows - 1)); - matrix->cursor = &matrix->display[MatrixRows - 1][0]; - memset(matrix->cursor, ' ', MatrixCols); - } -} - -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { - matrix->dirty = true; - - if (c == '\n') { - // Clear to end of line from the cursor and then move to the - // start of the next line - uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; - - while (cursor_col++ < MatrixCols) { - matrix_write_char_inner(matrix, ' '); - } - return; - } - - matrix_write_char_inner(matrix, c); -} - -void iota_gfx_write_char(uint8_t c) { - matrix_write_char(&display, c); -} - -void matrix_write(struct CharacterMatrix *matrix, const char *data) { - const char *end = data + strlen(data); - while (data < end) { - matrix_write_char(matrix, *data); - ++data; - } -} - -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { - char data_ln[strlen(data)+2]; - snprintf(data_ln, sizeof(data_ln), "%s\n", data); - matrix_write(matrix, data_ln); -} - -void iota_gfx_write(const char *data) { - matrix_write(&display, data); -} - -void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { - while (true) { - uint8_t c = pgm_read_byte(data); - if (c == 0) { - return; - } - matrix_write_char(matrix, c); - ++data; - } -} - -void iota_gfx_write_P(const char *data) { - matrix_write_P(&display, data); -} - -void matrix_clear(struct CharacterMatrix *matrix) { - memset(matrix->display, ' ', sizeof(matrix->display)); - matrix->cursor = &matrix->display[0][0]; - matrix->dirty = true; -} - -void iota_gfx_clear_screen(void) { - matrix_clear(&display); -} - -void matrix_render(struct CharacterMatrix *matrix) { - last_flush = timer_read(); - iota_gfx_on(); -#if DEBUG_TO_SCREEN - ++displaying; -#endif - - // Move to the home position - send_cmd3(PageAddr, 0, MatrixRows - 1); - send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); - - if (i2c_start_write(SSD1306_ADDRESS)) { - goto done; - } - if (i2c_master_write(0x40)) { - // Data mode - goto done; - } - - for (uint8_t row = 0; row < MatrixRows; ++row) { - for (uint8_t col = 0; col < MatrixCols; ++col) { - const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); - - for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { - uint8_t colBits = pgm_read_byte(glyph + glyphCol); - i2c_master_write(colBits); - } - - // 1 column of space between chars (it's not included in the glyph) - //i2c_master_write(0); - } - } - - matrix->dirty = false; - -done: - i2c_master_stop(); -#if DEBUG_TO_SCREEN - --displaying; -#endif -} - -void iota_gfx_flush(void) { - matrix_render(&display); -} - -__attribute__ ((weak)) -void iota_gfx_task_user(void) { -} - -void iota_gfx_task(void) { - iota_gfx_task_user(); - - if (display.dirty|| force_dirty) { - iota_gfx_flush(); - force_dirty = false; - } - - if (timer_elapsed(last_flush) > ScreenOffInterval) { - iota_gfx_off(); - } -} - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { - force_dirty = true; - return true; -} - -#endif diff --git a/keyboards/lily58/ssd1306.h b/keyboards/lily58/ssd1306.h deleted file mode 100755 index 0ca093093a..0000000000 --- a/keyboards/lily58/ssd1306.h +++ /dev/null @@ -1,90 +0,0 @@ -#pragma once - -#include -#include -#include "action.h" - -enum ssd1306_cmds { - DisplayOff = 0xAE, - DisplayOn = 0xAF, - - SetContrast = 0x81, - DisplayAllOnResume = 0xA4, - - DisplayAllOn = 0xA5, - NormalDisplay = 0xA6, - InvertDisplay = 0xA7, - SetDisplayOffset = 0xD3, - SetComPins = 0xda, - SetVComDetect = 0xdb, - SetDisplayClockDiv = 0xD5, - SetPreCharge = 0xd9, - SetMultiPlex = 0xa8, - SetLowColumn = 0x00, - SetHighColumn = 0x10, - SetStartLine = 0x40, - - SetMemoryMode = 0x20, - ColumnAddr = 0x21, - PageAddr = 0x22, - - ComScanInc = 0xc0, - ComScanDec = 0xc8, - SegRemap = 0xa0, - SetChargePump = 0x8d, - ExternalVcc = 0x01, - SwitchCapVcc = 0x02, - - ActivateScroll = 0x2f, - DeActivateScroll = 0x2e, - SetVerticalScrollArea = 0xa3, - RightHorizontalScroll = 0x26, - LeftHorizontalScroll = 0x27, - VerticalAndRightHorizontalScroll = 0x29, - VerticalAndLeftHorizontalScroll = 0x2a, -}; - -// Controls the SSD1306 128x32 OLED display via i2c - -#ifndef SSD1306_ADDRESS -#define SSD1306_ADDRESS 0x3C -#endif - -#define DisplayHeight 32 -#define DisplayWidth 128 - -#define FontHeight 8 -#define FontWidth 6 - -#define MatrixRows (DisplayHeight / FontHeight) -#define MatrixCols (DisplayWidth / FontWidth) - -struct CharacterMatrix { - uint8_t display[MatrixRows][MatrixCols]; - uint8_t *cursor; - bool dirty; -}; - -struct CharacterMatrix display; - -bool iota_gfx_init(bool rotate); -void iota_gfx_task(void); -bool iota_gfx_off(void); -bool iota_gfx_on(void); -void iota_gfx_flush(void); -void iota_gfx_write_char(uint8_t c); -void iota_gfx_write(const char *data); -void iota_gfx_write_P(const char *data); -void iota_gfx_clear_screen(void); - -void iota_gfx_task_user(void); - -void matrix_clear(struct CharacterMatrix *matrix); -void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); -void matrix_write(struct CharacterMatrix *matrix, const char *data); -void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); -void matrix_write_P(struct CharacterMatrix *matrix, const char *data); -void matrix_render(struct CharacterMatrix *matrix); - -bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index 9bcd771c42..5c80df0f06 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif // persistent_default_layer_set(1UL<<_QWERTY); } @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif // persistent_default_layer_set(1UL<<_COLEMAK); } @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif // persistent_default_layer_set(1UL<<_DVORAK); } diff --git a/keyboards/meira/keymaps/grahampheath/keymap.c b/keyboards/meira/keymaps/grahampheath/keymap.c index cd02137877..ace172a2a4 100644 --- a/keyboards/meira/keymaps/grahampheath/keymap.c +++ b/keyboards/meira/keymaps/grahampheath/keymap.c @@ -243,7 +243,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif } return false; @@ -251,7 +251,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif } return false; @@ -259,7 +259,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif } return false; diff --git a/keyboards/meira/keymaps/takmiya/keymap.c b/keyboards/meira/keymaps/takmiya/keymap.c index 12dad6d690..bf693d8ad2 100644 --- a/keyboards/meira/keymaps/takmiya/keymap.c +++ b/keyboards/meira/keymaps/takmiya/keymap.c @@ -153,7 +153,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif // persistent_default_layer_set(1UL<<_QWERTY); } diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c index 528beb168b..ea6e42a961 100644 --- a/keyboards/meishi/keymaps/default/keymap.c +++ b/keyboards/meishi/keymaps/default/keymap.c @@ -21,10 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void matrix_init_user(void) { } diff --git a/keyboards/model01/config.h b/keyboards/model01/config.h deleted file mode 100644 index c2160979cd..0000000000 --- a/keyboards/model01/config.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2018 James Laird-Wah - -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 . -*/ - -#pragma once - -#include - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x1209 -#define PRODUCT_ID 0x2301 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Keyboardio -#define PRODUCT Model 01 -#define DESCRIPTION (QMK) - -/* key matrix size; rows are doubled for split */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - -/* The scanners already debounce for us */ -#define DEBOUNCE 0 - -/* RGB matrix constants */ -#define DRIVER_LED_TOTAL 64 diff --git a/keyboards/model01/info.json b/keyboards/model01/info.json deleted file mode 100644 index 60c914d5c0..0000000000 --- a/keyboards/model01/info.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "keyboard_name": "model01", - "keyboard_folder": "model01", - "url": "https://keyboard.io", - "maintainer": "qmk", - "width": 18.5, - "height": 7.5, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"PROG", "x":0, "y":0.4, "h":1.3}, - {"label":"1", "x":1, "y":0.2, "h":1.5}, - {"label":"2", "x":2, "y":0.1, "h":1.1}, - {"label":"3", "x":3, "y":0}, - {"label":"4", "x":4, "y":0.1}, - {"label":"5", "x":5, "y":0.3}, - - {"label":"6", "x":12.5, "y":0.3}, - {"label":"7", "x":13.5, "y":0.1}, - {"label":"8", "x":14.5, "y":0}, - {"label":"9", "x":15.5, "y":0.1, "h":1.1}, - {"label":"0", "x":16.5, "y":0.2, "h":1.5}, - {"label":"NUM", "x":17.5, "y":0.4, "h":1.3}, - - {"label":"GRAVE", "x":0, "y":1.7}, - {"label":"Q", "x":1, "y":1.7}, - {"label":"W", "x":2, "y":1.2}, - {"label":"E", "x":3, "y":1}, - {"label":"R", "x":4, "y":1.1}, - {"label":"T", "x":5, "y":1.3}, - {"label":"LED", "x":6, "y":0.6, "h":1.5}, - - {"label":"ANY", "x":11.5, "y":0.6, "h":1.5}, - {"label":"Y", "x":12.5, "y":1.3}, - {"label":"U", "x":13.5, "y":1.1}, - {"label":"I", "x":14.5, "y":1}, - {"label":"O", "x":15.5, "y":1.2}, - {"label":"P", "x":16.5, "y":1.7}, - {"label":"EQUAL", "x":17.5, "y":1.7}, - - {"label":"PAGEUP", "x":0, "y":2.7}, - {"label":"A", "x":1, "y":2.7}, - {"label":"S", "x":2, "y":2.2}, - {"label":"D", "x":3, "y":2}, - {"label":"F", "x":4, "y":2.1}, - {"label":"G", "x":5, "y":2.3}, - {"label":"TAB", "x":6, "y":2.1, "h":1.3}, - - {"label":"ENTER", "x":11.5, "y":2.1, "h":1.3}, - {"label":"H", "x":12.5, "y":2.3}, - {"label":"J", "x":13.5, "y":2.1}, - {"label":"K", "x":14.5, "y":2}, - {"label":"L", "x":15.5, "y":2.2}, - {"label":"SEMICOLON", "x":16.5, "y":2.7}, - {"label":"QUOTE", "x":17.5, "y":2.7}, - - {"label":"PAGEDOWN", "x":0, "y":3.7, "h":1.2}, - {"label":"Z", "x":1, "y":3.7}, - {"label":"X", "x":2, "y":3.2, "h":1.15}, - {"label":"C", "x":3, "y":3}, - {"label":"V", "x":4, "y":3.1}, - {"label":"B", "x":5, "y":3.3}, - {"label":"ESC", "x":6, "y":3.4, "h":1.1}, - - {"label":"BUTTERFLY", "x":11.5, "y":3.4, "h":1.1}, - {"label":"N", "x":12.5, "y":3.3}, - {"label":"M", "x":13.5, "y":3.1}, - {"label":"COMMA", "x":14.5, "y":3}, - {"label":"DOT", "x":15.5, "y":3.2, "h":1.15}, - {"label":"SLASH", "x":16.5, "y":3.7}, - {"label":"MINS", "x":17.5, "y":3.7, "h":1.2}, - - {"label":"LCTL", "x":4.75, "y":4.3}, - {"label":"RCTL", "x":12.75, "y":4.3}, - {"label":"BACKSPACE", "x":5.75, "y":4.5}, - {"label":"SPACE", "x":11.75, "y":4.5}, - {"label":"LGUI", "x":6.75, "y":4.7}, - {"label":"RALT", "x":10.75, "y":4.7}, - {"label":"LSHIFT", "x":7.75, "y":5.1}, - {"label":"RSHIFT", "x":9.75, "y":5.1}, - - {"label":"FN", "x":6.25, "y":6.1, "h":1.4}, - {"label":"FN", "x":11.25, "y":6.1, "h":1.4} - ] - } - } -} diff --git a/keyboards/model01/keymaps/default/config.h b/keyboards/model01/keymaps/default/config.h deleted file mode 100644 index 8ab9d8b025..0000000000 --- a/keyboards/model01/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2018 James Laird-Wah - * - * 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 . - */ - -#pragma once - -/* place overrides here */ diff --git a/keyboards/model01/keymaps/default/keymap.c b/keyboards/model01/keymaps/default/keymap.c deleted file mode 100644 index 5ee865972e..0000000000 --- a/keyboards/model01/keymaps/default/keymap.c +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright 2018 James Laird-Wah - * - * 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 . - */ -#include QMK_KEYBOARD_H - -/* layer constants */ -enum { - DEF = 0, - NUM, - FUN, -}; - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DEF] = LAYOUT( - RESET , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , TG(NUM), - KC_GRV , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, _______, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_EQL , - KC_PGUP, KC_A , KC_S , KC_D , KC_F , KC_G , KC_TAB , KC_ENT , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, - KC_PGDN, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_ESC , _______, KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_MINS, - KC_LCTL, KC_RCTL, - KC_BSPC, KC_SPC , - KC_LGUI, KC_RALT, - KC_LSFT, KC_RSFT, - MO(FUN), MO(FUN) - ), -[NUM] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, KC_P7 , KC_P8 , KC_P9 , KC_PMNS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P4 , KC_P5 , KC_P6 , KC_PPLS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1 , KC_P2 , KC_P3 , KC_PEQL, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0 , KC_PDOT, KC_PAST, KC_PSLS, KC_PENT, - _______, _______, - _______, _______, - _______, _______, - _______, _______, - _______, _______ - ), -[FUN] = LAYOUT( - _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - KC_TAB , _______, KC_MS_U, _______, KC_BTN3, _______, RGB_TOG, KC_MPRV, KC_MNXT, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_F12 , - KC_HOME, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN1, _______, _______, KC_MPLY, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, - KC_END , KC_PSCR, KC_INS , _______, KC_BTN2, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSLS, KC_PIPE, - _______, _______, - KC_DEL , KC_ENT , - _______, _______, - _______, _______, - _______, _______ - ) -}; - -/* template for new layouts: -LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, - _______, _______, - _______, _______, - _______, _______, - _______, _______ - ) -*/ - -static void set_numpad_colours(int on, void (*write)(int, uint8_t, uint8_t, uint8_t)) { - if (!on) { - for (int i=44; i<=60; i++) - write(i, 0, 0, 0); - write(63, 0, 0, 0); - return; - } - - /* main number keys */ - for (int i=44; i<=47; i++) - write(i, 255, 0, 0); - for (int i=49; i<=54; i++) - write(i, 255, 0, 0); - - /* accessory keys */ - write(48, 128, 128, 0); - for (int i=55; i<=59; i++) - write(i, 128, 128, 0); - - // enter - write(63, 0, 128, 0); - - // num key - write(60, 128, 0, 128); -} - -#ifdef RGB_MATRIX_ENABLE -/* the RGB matrix effects will overwrite the numpad indicator. - * this handy mechanism allows to override the matrix effects. - */ -void rgb_matrix_indicators_user(void) { - if (layer_state & (1<. - */ - -#pragma once - -/* place overrides here */ diff --git a/keyboards/model01/keymaps/tw1t611/keymap.c b/keyboards/model01/keymaps/tw1t611/keymap.c deleted file mode 100644 index b4bd53e3fe..0000000000 --- a/keyboards/model01/keymaps/tw1t611/keymap.c +++ /dev/null @@ -1,50 +0,0 @@ -#include QMK_KEYBOARD_H -#include "keymap_german.h" - -/* layer constants */ -enum { - DEF = 0, - MOD, -}; - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[DEF] = LAYOUT( - _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , DE_SS , - KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, KC_MUTE, KC_Y , KC_U , KC_I , KC_O , KC_P , DE_AE , - KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , DE_PARA, _______, KC_H , KC_J , KC_K , KC_L , DE_SLSH, DE_OE , - DE_PIPE, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, KC_N , KC_M , DE_COMM, DE_DOT , DE_MINS, DE_UE , - KC_LALT, KC_LGUI, - KC_SPC , KC_ENT , - KC_LSFT, MO(MOD), - KC_BSPC, KC_DEL , - KC_LCTL, KC_RCTL - ), -[MOD] = LAYOUT( - KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - DE_CIRC, DE_QUOT, DE_DQOT, DE_LCBR, DE_RCBR, DE_GRV , RGB_TOG, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , DE_EQL , DE_PERC, - DE_TILD, DE_EXLM, DE_DLR , DE_LPRN, DE_RPRN, DE_AMPR, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, DE_QST , DE_ASTR, - DE_BSLS, DE_HASH, DE_LESS, DE_LBRC, DE_RBRC, DE_MORE, _______, RESET , DE_AT , DE_EURO, DE_SCLN, DE_COLN, DE_UNDS, DE_PLUS, - _______, _______, - _______, _______, - _______, _______, - _______, _______, - _______, _______ - ) -}; - -/* template for new layouts: -LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, - _______, _______, - _______, _______, - _______, _______, - _______, _______ - ) -*/ - -/* vim: set ts=2 sw=2 et: */ diff --git a/keyboards/model01/keymaps/tw1t611/readme.md b/keyboards/model01/keymaps/tw1t611/readme.md deleted file mode 100644 index b9d728831c..0000000000 --- a/keyboards/model01/keymaps/tw1t611/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# Keymap for Keyboardio's Model01 by tw1t611 - -Features: -- german keymap -- vim optimized diff --git a/keyboards/model01/leds.c b/keyboards/model01/leds.c deleted file mode 100644 index b21c1a5c8a..0000000000 --- a/keyboards/model01/leds.c +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright 2018 James Laird-Wah - * - * 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 . - */ -#include -#include -#include -#include -#include -#include "model01.h" - -#define I2C_TIMEOUT 1000 - -void set_all_leds_to(uint8_t r, uint8_t g, uint8_t b) { - uint8_t buf[] = { - TWI_CMD_LED_SET_ALL_TO, - b, g, r - }; - i2c_transmit(I2C_ADDR(LEFT), buf, sizeof(buf), I2C_TIMEOUT); - i2c_transmit(I2C_ADDR(RIGHT), buf, sizeof(buf), I2C_TIMEOUT); - _delay_us(10); -} - -void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) { - uint8_t buf[] = { - TWI_CMD_LED_SET_ONE_TO, - led & 0x1f, - b, g, r - }; - int hand = (led >= 32) ? RIGHT : LEFT; - i2c_transmit(I2C_ADDR(hand), buf, sizeof(buf), I2C_TIMEOUT); - _delay_us(10); -} - -#ifdef RGB_MATRIX_ENABLE - -__attribute__ ((weak)) -led_config_t g_led_config = { { - { 27, 26, 20, 19, 12, 11, 4, 3 }, - { 28, 25, 21, 18, 13, 10, 5, 2 }, - { 29, 24, 22, 17, 14, 9, 6, 1 }, - { 30, 31, 23, 16, 15, 8, 7, 0 }, - { 60, 59, 52, 51, 44, 43, 37, 36 }, - { 61, 58, 53, 50, 45, 42, 38, 35 }, - { 62, 57, 54, 49, 46, 41, 39, 34 }, - { 63, 56, 55, 48, 47, 40, 32, 33 } -}, { - { 3, 35 }, { 0, 26 }, { 0, 17 }, { 0, 6 }, { 14, 5 }, { 15, 16 }, { 16, 25 }, { 17, 34 }, - { 31, 29 }, { 31, 19 }, { 30, 11 }, { 30, 1 }, { 45, 0 }, { 45, 8 }, { 46, 17 }, { 46, 27 }, - { 60, 27 }, { 60, 18 }, { 60, 9 }, { 60, 0 }, { 74, 2 }, { 74, 11 }, { 75, 20 }, { 74, 28 }, - { 89, 30 }, { 89, 19 }, { 89, 7 }, { 70, 38 }, { 82, 41 }, { 93, 45 }, { 104, 50 }, { 74, 64 }, - { 149, 64 }, { 119, 50 }, { 130, 45 }, { 141, 41 }, { 153, 38 }, { 134, 7 }, { 134, 19 }, { 134, 30 }, - { 149, 28 }, { 148, 20 }, { 149, 11 }, { 149, 2 }, { 163, 0 }, { 163, 9 }, { 163, 18 }, { 163, 27 }, - { 177, 27 }, { 177, 17 }, { 178, 8 }, { 178, 0 }, { 193, 1 }, { 193, 11 }, { 192, 19 }, { 192, 29 }, - { 206, 34 }, { 207, 25 }, { 208, 16 }, { 209, 5 }, { 224, 6 }, { 223, 17 }, { 223, 26 }, { 220, 35 } -}, { - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4 -} }; - - -static struct { - uint8_t b; - uint8_t g; - uint8_t r; -} __attribute__((packed)) led_state[64]; - -static void set_color(int index, uint8_t r, uint8_t g, uint8_t b) { - led_state[index].r = r; - led_state[index].g = g; - led_state[index].b = b; -} - -static void set_color_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i=0; i. - */ -#pragma once - -#include -#include - -void set_all_leds_to(uint8_t r, uint8_t g, uint8_t b); -void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b); diff --git a/keyboards/model01/matrix.c b/keyboards/model01/matrix.c deleted file mode 100644 index f1f9024c7c..0000000000 --- a/keyboards/model01/matrix.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright 2018 James Laird-Wah - * - * 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 . - */ -#include -#include -#include -#include "model01.h" - -/* If no key events have occurred, the scanners will time out on reads. - * So we don't want to be too permissive here. */ -#define I2C_TIMEOUT 10 - -static matrix_row_t rows[MATRIX_ROWS]; -#define ROWS_PER_HAND (MATRIX_ROWS / 2) - -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - -static int i2c_read_hand(int hand) { - uint8_t buf[5]; - i2c_status_t ret = i2c_receive(I2C_ADDR(hand), buf, sizeof(buf), I2C_TIMEOUT); - if (ret != I2C_STATUS_SUCCESS) - return 1; - - if (buf[0] != TWI_REPLY_KEYDATA) - return 2; - - int start_row = hand ? ROWS_PER_HAND : 0; - uint8_t *out = &rows[start_row]; - memcpy(out, &buf[1], 4); - return 0; -} - -static int i2c_set_keyscan_interval(int hand, int delay) { - uint8_t buf[] = {TWI_CMD_KEYSCAN_INTERVAL, delay}; - i2c_status_t ret = i2c_transmit(I2C_ADDR(hand), buf, sizeof(buf), I2C_TIMEOUT); - return ret; -} - -void matrix_init(void) { - /* Ensure scanner power is on - else right hand will not work */ - DDRC |= _BV(7); - PORTC |= _BV(7); - - i2c_init(); - i2c_set_keyscan_interval(LEFT, 2); - i2c_set_keyscan_interval(RIGHT, 2); - memset(rows, 0, sizeof(rows)); - - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) { - uint8_t ret = 0; - ret |= i2c_read_hand(LEFT); - ret |= i2c_read_hand(RIGHT); - matrix_scan_quantum(); - return ret; -} - -inline -matrix_row_t matrix_get_row(uint8_t row) { - return rows[row]; -} - -void matrix_print(void) { - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -/* vim: set ts=2 sw=2 et: */ diff --git a/keyboards/model01/model01.c b/keyboards/model01/model01.c deleted file mode 100644 index 29615ca866..0000000000 --- a/keyboards/model01/model01.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2018 James Laird-Wah - * - * 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 . - */ -#include -#include -#include -#include "model01.h" - -void matrix_init_kb(void) { - /* the bootloader can leave LEDs on, so */ - set_all_leds_to(0, 0, 0); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - diff --git a/keyboards/model01/model01.h b/keyboards/model01/model01.h deleted file mode 100644 index a83e33cd86..0000000000 --- a/keyboards/model01/model01.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2018 James Laird-Wah - * - * 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 . - */ -#pragma once - -#include - -#define LAYOUT( \ - L07, L06, L05, L04, L03, L02, R05, R04, R03, R02, R01, R00, \ - L17, L16, L15, L14, L13, L12, L01, R06, R15, R14, R13, R12, R11, R10, \ - L27, L26, L25, L24, L23, L22, L11, R16, R25, R24, R23, R22, R21, R20, \ - L37, L36, L35, L34, L33, L32, L21, R26, R35, R34, R33, R32, R31, R30, \ - L00, R07, \ - L10, R17, \ - L20, R27, \ - L30, R37, \ - L31, R36 \ - ) { \ - {L00, L01, L02, L03, L04, L05, L06, L07}, \ - {L10, L11, L12, L13, L14, L15, L16, L17}, \ - {L20, L21, L22, L23, L24, L25, L26, L27}, \ - {L30, L31, L32, L33, L34, L35, L36, L37}, \ - {R00, R01, R02, R03, R04, R05, R06, R07}, \ - {R10, R11, R12, R13, R14, R15, R16, R17}, \ - {R20, R21, R22, R23, R24, R25, R26, R27}, \ - {R30, R31, R32, R33, R34, R35, R36, R37} \ - } - -#include "wire-protocol-constants.h" -#define I2C_ADDR_LEFT (0x58 << 1) -#define I2C_ADDR_RIGHT (I2C_ADDR_LEFT + 6) -#define I2C_ADDR(hand) ((hand) ? I2C_ADDR_RIGHT : I2C_ADDR_LEFT) -#define LEFT 0 -#define RIGHT 1 - -#include "leds.h" - -/* vim: set ts=2 sw=2 et: */ diff --git a/keyboards/model01/readme.md b/keyboards/model01/readme.md deleted file mode 100644 index 34bd291e2e..0000000000 --- a/keyboards/model01/readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# Keyboardio Model 01 - -A split keyboard. - -Keyboard Maintainer: QMK Community -Hardware Supported: Keyboardio Model 01 -Hardware Availability: [Keyboardio](https://shop.keyboard.io) - -Make example for this keyboard (after setting up your build environment): - - make model01:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. -Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - -## Programming the Keyboard - -To program the keyboard, if you have avrdude installed: - - make model01:default:avrdude - -When prompted to reset your keyboard, press the prog key at upper left. If the -keyboard does not reset, you can hold the prog key while plugging it into your -computer. The prog key will light up red in programming mode. - -## Features - -This implements the standard keymap, including mousekeys. - -It doesn't do cursor warping - QMK does not support absolute mouse positioning. - -LED support is limited. Gamma compensation and the high speed batch update -functions supported by the hardware are not implemented. The high current power -switch is also not implemented, so if you try and turn all the LEDs on at full -brightness, something may conk out. - -Hotplugging the two halves works but is not extensively tested. diff --git a/keyboards/model01/rules.mk b/keyboards/model01/rules.mk deleted file mode 100644 index 29c028ac85..0000000000 --- a/keyboards/model01/rules.mk +++ /dev/null @@ -1,35 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode - -CUSTOM_MATRIX = yes -QUANTUM_LIB_SRC += i2c_master.c -SRC += leds.c \ - matrix.c - -# You can set RGB_MATRIX_ENABLE = no in your rules.mk to disable this and save the Flash -RGB_MATRIX_ENABLE = custom # Enable RGB matrix effects. diff --git a/keyboards/model01/wire-protocol-constants.h b/keyboards/model01/wire-protocol-constants.h deleted file mode 100644 index 90a528582a..0000000000 --- a/keyboards/model01/wire-protocol-constants.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is taken from the KeyboardioScanner module: - * https://github.com/keyboardio/KeyboardioScanner/blob/master/wire-protocol-constants.h - * - * Copyright (C) 2015-2018 Keyboard.io, Inc - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#pragma once - -#define TWI_CMD_NONE 0x00 -#define TWI_CMD_VERSION 0x01 -#define TWI_CMD_KEYSCAN_INTERVAL 0x02 -#define TWI_CMD_LED_SET_ALL_TO 0x03 -#define TWI_CMD_LED_SET_ONE_TO 0x04 -#define TWI_CMD_COLS_USE_PULLUPS 0x05 -#define TWI_CMD_LED_SPI_FREQUENCY 0x06 - -#define LED_SPI_FREQUENCY_4MHZ 0x07 -#define LED_SPI_FREQUENCY_2MHZ 0x06 -#define LED_SPI_FREQUENCY_1MHZ 0x05 -#define LED_SPI_FREQUENCY_512KHZ 0x04 -#define LED_SPI_FREQUENCY_256KHZ 0x03 -#define LED_SPI_FREQUENCY_128KHZ 0x02 -#define LED_SPI_FREQUENCY_64KHZ 0x01 -#define LED_SPI_OFF 0x00 - - -// 512KHZ seems to be the sweet spot in early testing -// so make it the default -#define LED_SPI_FREQUENCY_DEFAULT LED_SPI_FREQUENCY_512KHZ - - -#define TWI_CMD_LED_BASE 0x80 - -#define TWI_REPLY_NONE 0x00 -#define TWI_REPLY_KEYDATA 0x01 diff --git a/keyboards/navi10/rev3/rules.mk b/keyboards/navi10/rev3/rules.mk index b98e7eb2d6..d5a072f161 100644 --- a/keyboards/navi10/rev3/rules.mk +++ b/keyboards/navi10/rev3/rules.mk @@ -28,6 +28,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/nomu30/keymaps/center_sprit/keymap.c b/keyboards/nomu30/keymaps/center_sprit/keymap.c index 8ef037f42b..cc540b891f 100644 --- a/keyboards/nomu30/keymaps/center_sprit/keymap.c +++ b/keyboards/nomu30/keymaps/center_sprit/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_BSLO: return TAPPING_LAYER_TERM; diff --git a/keyboards/nomu30/keymaps/like_jis/keymap.c b/keyboards/nomu30/keymaps/like_jis/keymap.c index 203d0a7a41..fc2d26ad7a 100644 --- a/keyboards/nomu30/keymaps/like_jis/keymap.c +++ b/keyboards/nomu30/keymaps/like_jis/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_BSLO: return TAPPING_LAYER_TERM; diff --git a/keyboards/omnikey_bh/config.h b/keyboards/omnikey_bh/config.h new file mode 100644 index 0000000000..6c9be77b6b --- /dev/null +++ b/keyboards/omnikey_bh/config.h @@ -0,0 +1,51 @@ +#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 blindassassin111 +#define PRODUCT Omnikey Blackheart PCB +#define DESCRIPTION Teensy++ Board for Omnikey keyboards + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 23 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, D4 } +#define MATRIX_COL_PINS { C2, C3, C4, C7, C1, C0, E1, E0, D7, F7, F6, F5, F4, F3, F2, F1, F0, E6, E7, B0, B1, B2, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* 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 + +/* force n-key rollover*/ +#define FORCE_NKRO + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/omnikey_bh/info.json b/keyboards/omnikey_bh/info.json new file mode 100644 index 0000000000..50d64e143c --- /dev/null +++ b/keyboards/omnikey_bh/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Omnikey BH PCB", + "url": "", + "maintainer": "qmk", + "width": 25.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "key_count": 123, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2.5, "y":0}, {"label":"K003", "x":4.5, "y":0}, {"label":"K004", "x":5.5, "y":0}, {"label":"K005", "x":6.5, "y":0}, {"label":"K006", "x":7.5, "y":0}, {"label":"K007", "x":9, "y":0}, {"label":"K008", "x":10, "y":0}, {"label":"K009", "x":11, "y":0}, {"label":"K010", "x":12, "y":0}, {"label":"K011", "x":13.5, "y":0}, {"label":"K012", "x":14.5, "y":0}, {"label":"K013", "x":15.5, "y":0}, {"label":"K014", "x":16.5, "y":0}, {"label":"K015", "x":18, "y":0}, {"label":"K016", "x":19, "y":0}, {"label":"K017", "x":20, "y":0}, {"label":"K100", "x":0, "y":1.5}, {"label":"K101", "x":1, "y":1.5}, {"label":"K102", "x":2.5, "y":1.5}, {"label":"K103", "x":3.5, "y":1.5}, {"label":"K104", "x":4.5, "y":1.5}, {"label":"K105", "x":5.5, "y":1.5}, {"label":"K106", "x":6.5, "y":1.5}, {"label":"K107", "x":7.5, "y":1.5}, {"label":"K108", "x":8.5, "y":1.5}, {"label":"K109", "x":9.5, "y":1.5}, {"label":"K110", "x":10.5, "y":1.5}, {"label":"K111", "x":11.5, "y":1.5}, {"label":"K112", "x":12.5, "y":1.5}, {"label":"K113", "x":13.5, "y":1.5}, {"label":"K114", "x":14.5, "y":1.5}, {"label":"K115", "x":15.5, "y":1.5, "w":2}, {"label":"K116", "x":18, "y":1.5}, {"label":"K117", "x":19, "y":1.5}, {"label":"K118", "x":20, "y":1.5}, {"label":"K119", "x":21.5, "y":1.5}, {"label":"K120", "x":22.5, "y":1.5}, {"label":"K121", "x":23.5, "y":1.5}, {"label":"K122", "x":24.5, "y":1.5}, {"label":"K200", "x":0, "y":2.5}, {"label":"K201", "x":1, "y":2.5}, {"label":"K202", "x":2.5, "y":2.5, "w":1.5}, {"label":"K203", "x":4, "y":2.5}, {"label":"K204", "x":5, "y":2.5}, {"label":"K205", "x":6, "y":2.5}, {"label":"K206", "x":7, "y":2.5}, {"label":"K207", "x":8, "y":2.5}, {"label":"K208", "x":9, "y":2.5}, {"label":"K209", "x":10, "y":2.5}, {"label":"K210", "x":11, "y":2.5}, {"label":"K211", "x":12, "y":2.5}, {"label":"K212", "x":13, "y":2.5}, {"label":"K213", "x":14, "y":2.5}, {"label":"K214", "x":15, "y":2.5}, {"label":"K215", "x":16, "y":2.5, "w":1.5}, {"label":"K216", "x":18, "y":2.5}, {"label":"K217", "x":19, "y":2.5}, {"label":"K218", "x":20, "y":2.5}, {"label":"K219", "x":21.5, "y":2.5}, {"label":"K220", "x":22.5, "y":2.5}, {"label":"K221", "x":23.5, "y":2.5}, {"label":"K222", "x":24.5, "y":2.5}, {"label":"K300", "x":0, "y":3.5}, {"label":"K301", "x":1, "y":3.5}, {"label":"K302", "x":2.5, "y":3.5, "w":1.75}, {"label":"K303", "x":4.25, "y":3.5}, {"label":"K304", "x":5.25, "y":3.5}, {"label":"K305", "x":6.25, "y":3.5}, {"label":"K306", "x":7.25, "y":3.5}, {"label":"K307", "x":8.25, "y":3.5}, {"label":"K308", "x":9.25, "y":3.5}, {"label":"K309", "x":10.25, "y":3.5}, {"label":"K310", "x":11.25, "y":3.5}, {"label":"K311", "x":12.25, "y":3.5}, {"label":"K312", "x":13.25, "y":3.5}, {"label":"K313", "x":14.25, "y":3.5}, {"label":"K314", "x":15.25, "y":3.5, "w":2.25}, {"label":"K315", "x":18, "y":3.5}, {"label":"K316", "x":19, "y":3.5}, {"label":"K317", "x":20, "y":3.5}, {"label":"K318", "x":21.5, "y":3.5}, {"label":"K319", "x":22.5, "y":3.5}, {"label":"K320", "x":23.5, "y":3.5}, {"label":"K321", "x":24.5, "y":3.5}, {"label":"K400", "x":0, "y":4.5}, {"label":"K401", "x":1, "y":4.5}, {"label":"K402", "x":2.5, "y":4.5, "w":2.25}, {"label":"K403", "x":4.75, "y":4.5}, {"label":"K404", "x":5.75, "y":4.5}, {"label":"K405", "x":6.75, "y":4.5}, {"label":"K406", "x":7.75, "y":4.5}, {"label":"K407", "x":8.75, "y":4.5}, {"label":"K408", "x":9.75, "y":4.5}, {"label":"K409", "x":10.75, "y":4.5}, {"label":"K410", "x":11.75, "y":4.5}, {"label":"K411", "x":12.75, "y":4.5}, {"label":"K412", "x":13.75, "y":4.5}, {"label":"K413", "x":14.75, "y":4.5, "w":1.75}, {"label":"K414", "x":16.5, "y":4.5}, {"label":"K415", "x":18, "y":4.5}, {"label":"K416", "x":19, "y":4.5}, {"label":"K417", "x":20, "y":4.5}, {"label":"K418", "x":21.5, "y":4.5}, {"label":"K419", "x":22.5, "y":4.5}, {"label":"K420", "x":23.5, "y":4.5}, {"label":"K421", "x":24.5, "y":4.5, "h":2}, {"label":"K500", "x":0, "y":5.5}, {"label":"K501", "x":1, "y":5.5}, {"label":"K502", "x":2.5, "y":5.5, "w":1.5}, {"label":"K503", "x":4, "y":5.5}, {"label":"K504", "x":5, "y":5.5, "w":1.5}, {"label":"K507", "x":6.5, "y":5.5, "w":7}, {"label":"K512", "x":13.5, "y":5.5}, {"label":"K513", "x":14.5, "y":5.5}, {"label":"K514", "x":15.5, "y":5.5}, {"label":"K515", "x":16.5, "y":5.5}, {"label":"K516", "x":18, "y":5.5}, {"label":"K517", "x":19, "y":5.5}, {"label":"K518", "x":20, "y":5.5}, {"label":"K519", "x":21.5, "y":5.5, "w":2}, {"label":"K520", "x":23.5, "y":5.5}] + } + } +} diff --git a/keyboards/omnikey_bh/keymaps/default/keymap.c b/keyboards/omnikey_bh/keymaps/default/keymap.c new file mode 100644 index 0000000000..e4865adde3 --- /dev/null +++ b/keyboards/omnikey_bh/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT(\ + KC_F11, KC_F12, 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_SLCK, KC_PAUS, + KC_F1, KC_F2, 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_EQL, + KC_F7, KC_F8, 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(1), XXXXXXX, KC_UP, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + + [1] = LAYOUT(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ + + ), +}; + +void led_set_user(uint8_t usb_led) { + DDRB |= (1 << 4) | (1 << 5) | (1 << 6); + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + PORTB |= (1 << 4); + } else { + PORTB &= ~(1 << 4); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + PORTB |= (1 << 5); + } else { + PORTB &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + PORTB |= (1 << 6); + } else { + PORTB &= ~(1 << 6); + } +} diff --git a/keyboards/omnikey_bh/omnikey_bh.c b/keyboards/omnikey_bh/omnikey_bh.c new file mode 100644 index 0000000000..c2f52f30c3 --- /dev/null +++ b/keyboards/omnikey_bh/omnikey_bh.c @@ -0,0 +1 @@ +#include "omnikey_bh.h" diff --git a/keyboards/omnikey_bh/omnikey_bh.h b/keyboards/omnikey_bh/omnikey_bh.h new file mode 100644 index 0000000000..f36184f390 --- /dev/null +++ b/keyboards/omnikey_bh/omnikey_bh.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, \ + K500, K501, K502, K503, K504, K507, K512, K513, K514, K515, K516, K517, K518, K519, K520 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, KC_NO }, \ + { K500, K501, K502, K503, K504, KC_NO, KC_NO, K507, KC_NO, KC_NO, KC_NO, KC_NO, K512, K513, K514, K515, K516, K517, K518, K519, K520, KC_NO, KC_NO } \ +} diff --git a/keyboards/omnikey_bh/readme.md b/keyboards/omnikey_bh/readme.md new file mode 100644 index 0000000000..7de22f29a4 --- /dev/null +++ b/keyboards/omnikey_bh/readme.md @@ -0,0 +1,14 @@ +Omnikey BH PCB +=== + +A replacement PCB for Omnikey keyboards. Supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs. + +Keyboard Maintainer: QMK Community and blindassassin111 +Hardware Supported: Omnikey BH PCB +Hardware Availability: https://deskthority.net/group-buys-f50/omnikey-replacement-pcb-t18276.html + +Make example for this keyboard (after setting up your build environment): + + make omnikey_bh:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/omnikey_bh/rules.mk b/keyboards/omnikey_bh/rules.mk new file mode 100644 index 0000000000..59f163e2f4 --- /dev/null +++ b/keyboards/omnikey_bh/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= no # Console for debug +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= no diff --git a/keyboards/omnikey_blackheart/config.h b/keyboards/omnikey_blackheart/config.h deleted file mode 100644 index 6c9be77b6b..0000000000 --- a/keyboards/omnikey_blackheart/config.h +++ /dev/null @@ -1,51 +0,0 @@ -#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 blindassassin111 -#define PRODUCT Omnikey Blackheart PCB -#define DESCRIPTION Teensy++ Board for Omnikey keyboards - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 23 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { B7, D0, D1, D2, D3, D4 } -#define MATRIX_COL_PINS { C2, C3, C4, C7, C1, C0, E1, E0, D7, F7, F6, F5, F4, F3, F2, F1, F0, E6, E7, B0, B1, B2, B3 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* number of backlight levels */ -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 0 -#endif - -/* 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 - -/* force n-key rollover*/ -#define FORCE_NKRO - -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 0 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif - -#endif diff --git a/keyboards/omnikey_blackheart/info.json b/keyboards/omnikey_blackheart/info.json deleted file mode 100644 index 138c954b77..0000000000 --- a/keyboards/omnikey_blackheart/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Omnikey Blackheart PCB", - "url": "", - "maintainer": "qmk", - "width": 25.5, - "height": 6.5, - "layouts": { - "LAYOUT": { - "key_count": 123, - "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2.5, "y":0}, {"label":"K003", "x":4.5, "y":0}, {"label":"K004", "x":5.5, "y":0}, {"label":"K005", "x":6.5, "y":0}, {"label":"K006", "x":7.5, "y":0}, {"label":"K007", "x":9, "y":0}, {"label":"K008", "x":10, "y":0}, {"label":"K009", "x":11, "y":0}, {"label":"K010", "x":12, "y":0}, {"label":"K011", "x":13.5, "y":0}, {"label":"K012", "x":14.5, "y":0}, {"label":"K013", "x":15.5, "y":0}, {"label":"K014", "x":16.5, "y":0}, {"label":"K015", "x":18, "y":0}, {"label":"K016", "x":19, "y":0}, {"label":"K017", "x":20, "y":0}, {"label":"K100", "x":0, "y":1.5}, {"label":"K101", "x":1, "y":1.5}, {"label":"K102", "x":2.5, "y":1.5}, {"label":"K103", "x":3.5, "y":1.5}, {"label":"K104", "x":4.5, "y":1.5}, {"label":"K105", "x":5.5, "y":1.5}, {"label":"K106", "x":6.5, "y":1.5}, {"label":"K107", "x":7.5, "y":1.5}, {"label":"K108", "x":8.5, "y":1.5}, {"label":"K109", "x":9.5, "y":1.5}, {"label":"K110", "x":10.5, "y":1.5}, {"label":"K111", "x":11.5, "y":1.5}, {"label":"K112", "x":12.5, "y":1.5}, {"label":"K113", "x":13.5, "y":1.5}, {"label":"K114", "x":14.5, "y":1.5}, {"label":"K115", "x":15.5, "y":1.5, "w":2}, {"label":"K116", "x":18, "y":1.5}, {"label":"K117", "x":19, "y":1.5}, {"label":"K118", "x":20, "y":1.5}, {"label":"K119", "x":21.5, "y":1.5}, {"label":"K120", "x":22.5, "y":1.5}, {"label":"K121", "x":23.5, "y":1.5}, {"label":"K122", "x":24.5, "y":1.5}, {"label":"K200", "x":0, "y":2.5}, {"label":"K201", "x":1, "y":2.5}, {"label":"K202", "x":2.5, "y":2.5, "w":1.5}, {"label":"K203", "x":4, "y":2.5}, {"label":"K204", "x":5, "y":2.5}, {"label":"K205", "x":6, "y":2.5}, {"label":"K206", "x":7, "y":2.5}, {"label":"K207", "x":8, "y":2.5}, {"label":"K208", "x":9, "y":2.5}, {"label":"K209", "x":10, "y":2.5}, {"label":"K210", "x":11, "y":2.5}, {"label":"K211", "x":12, "y":2.5}, {"label":"K212", "x":13, "y":2.5}, {"label":"K213", "x":14, "y":2.5}, {"label":"K214", "x":15, "y":2.5}, {"label":"K215", "x":16, "y":2.5, "w":1.5}, {"label":"K216", "x":18, "y":2.5}, {"label":"K217", "x":19, "y":2.5}, {"label":"K218", "x":20, "y":2.5}, {"label":"K219", "x":21.5, "y":2.5}, {"label":"K220", "x":22.5, "y":2.5}, {"label":"K221", "x":23.5, "y":2.5}, {"label":"K222", "x":24.5, "y":2.5}, {"label":"K300", "x":0, "y":3.5}, {"label":"K301", "x":1, "y":3.5}, {"label":"K302", "x":2.5, "y":3.5, "w":1.75}, {"label":"K303", "x":4.25, "y":3.5}, {"label":"K304", "x":5.25, "y":3.5}, {"label":"K305", "x":6.25, "y":3.5}, {"label":"K306", "x":7.25, "y":3.5}, {"label":"K307", "x":8.25, "y":3.5}, {"label":"K308", "x":9.25, "y":3.5}, {"label":"K309", "x":10.25, "y":3.5}, {"label":"K310", "x":11.25, "y":3.5}, {"label":"K311", "x":12.25, "y":3.5}, {"label":"K312", "x":13.25, "y":3.5}, {"label":"K313", "x":14.25, "y":3.5}, {"label":"K314", "x":15.25, "y":3.5, "w":2.25}, {"label":"K315", "x":18, "y":3.5}, {"label":"K316", "x":19, "y":3.5}, {"label":"K317", "x":20, "y":3.5}, {"label":"K318", "x":21.5, "y":3.5}, {"label":"K319", "x":22.5, "y":3.5}, {"label":"K320", "x":23.5, "y":3.5}, {"label":"K321", "x":24.5, "y":3.5}, {"label":"K400", "x":0, "y":4.5}, {"label":"K401", "x":1, "y":4.5}, {"label":"K402", "x":2.5, "y":4.5, "w":2.25}, {"label":"K403", "x":4.75, "y":4.5}, {"label":"K404", "x":5.75, "y":4.5}, {"label":"K405", "x":6.75, "y":4.5}, {"label":"K406", "x":7.75, "y":4.5}, {"label":"K407", "x":8.75, "y":4.5}, {"label":"K408", "x":9.75, "y":4.5}, {"label":"K409", "x":10.75, "y":4.5}, {"label":"K410", "x":11.75, "y":4.5}, {"label":"K411", "x":12.75, "y":4.5}, {"label":"K412", "x":13.75, "y":4.5}, {"label":"K413", "x":14.75, "y":4.5, "w":1.75}, {"label":"K414", "x":16.5, "y":4.5}, {"label":"K415", "x":18, "y":4.5}, {"label":"K416", "x":19, "y":4.5}, {"label":"K417", "x":20, "y":4.5}, {"label":"K418", "x":21.5, "y":4.5}, {"label":"K419", "x":22.5, "y":4.5}, {"label":"K420", "x":23.5, "y":4.5}, {"label":"K421", "x":24.5, "y":4.5, "h":2}, {"label":"K500", "x":0, "y":5.5}, {"label":"K501", "x":1, "y":5.5}, {"label":"K502", "x":2.5, "y":5.5, "w":1.5}, {"label":"K503", "x":4, "y":5.5}, {"label":"K504", "x":5, "y":5.5, "w":1.5}, {"label":"K507", "x":6.5, "y":5.5, "w":7}, {"label":"K512", "x":13.5, "y":5.5}, {"label":"K513", "x":14.5, "y":5.5}, {"label":"K514", "x":15.5, "y":5.5}, {"label":"K515", "x":16.5, "y":5.5}, {"label":"K516", "x":18, "y":5.5}, {"label":"K517", "x":19, "y":5.5}, {"label":"K518", "x":20, "y":5.5}, {"label":"K519", "x":21.5, "y":5.5, "w":2}, {"label":"K520", "x":23.5, "y":5.5}] - } - } -} diff --git a/keyboards/omnikey_blackheart/keymaps/default/keymap.c b/keyboards/omnikey_blackheart/keymaps/default/keymap.c deleted file mode 100644 index e4865adde3..0000000000 --- a/keyboards/omnikey_blackheart/keymaps/default/keymap.c +++ /dev/null @@ -1,45 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT(\ - KC_F11, KC_F12, 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_SLCK, KC_PAUS, - KC_F1, KC_F2, 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_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_EQL, - KC_F7, KC_F8, 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(1), XXXXXXX, KC_UP, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT - ), - - [1] = LAYOUT(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ - - ), -}; - -void led_set_user(uint8_t usb_led) { - DDRB |= (1 << 4) | (1 << 5) | (1 << 6); - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - PORTB |= (1 << 4); - } else { - PORTB &= ~(1 << 4); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - PORTB |= (1 << 5); - } else { - PORTB &= ~(1 << 5); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - PORTB |= (1 << 6); - } else { - PORTB &= ~(1 << 6); - } -} diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.c b/keyboards/omnikey_blackheart/omnikey_blackheart.c deleted file mode 100644 index e54047fa68..0000000000 --- a/keyboards/omnikey_blackheart/omnikey_blackheart.c +++ /dev/null @@ -1 +0,0 @@ -#include "omnikey_blackheart.h" diff --git a/keyboards/omnikey_blackheart/omnikey_blackheart.h b/keyboards/omnikey_blackheart/omnikey_blackheart.h deleted file mode 100644 index 5d2d948c49..0000000000 --- a/keyboards/omnikey_blackheart/omnikey_blackheart.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef omnikey_blackheart -#define omnikey_blackheart - -#include "quantum.h" - -#define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, \ - K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, \ - K500, K501, K502, K503, K504, K507, K512, K513, K514, K515, K516, K517, K518, K519, K520 \ -) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, K120, K121, K122 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219, K220, K221, K222 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, K319, K320, K321, KC_NO }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, K416, K417, K418, K419, K420, K421, KC_NO }, \ - { K500, K501, K502, K503, K504, KC_NO, KC_NO, K507, KC_NO, KC_NO, KC_NO, KC_NO, K512, K513, K514, K515, K516, K517, K518, K519, K520, KC_NO, KC_NO } \ -} - -#endif \ No newline at end of file diff --git a/keyboards/omnikey_blackheart/readme.md b/keyboards/omnikey_blackheart/readme.md deleted file mode 100644 index 04bb49818c..0000000000 --- a/keyboards/omnikey_blackheart/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Omnikey Blackheart PCB -=== - -A replacement PCB for Omnikey keyboards. Supports 101, 102, Plus, Ultra T, Ultra, Prime and Stellar, as well as customs. - -Keyboard Maintainer: QMK Community and blindassassin111 -Hardware Supported: Omnikey blackheart PCB -Hardware Availability: https://deskthority.net/group-buys-f50/omnikey-replacement-pcb-t18276.html - -Make example for this keyboard (after setting up your build environment): - - make omnikey_blackheart:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/omnikey_blackheart/rules.mk b/keyboards/omnikey_blackheart/rules.mk deleted file mode 100644 index 59f163e2f4..0000000000 --- a/keyboards/omnikey_blackheart/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# MCU name -MCU = at90usb1286 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = halfkay - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE ?= yes # Mouse keys -EXTRAKEY_ENABLE ?= yes # Audio control and System control -CONSOLE_ENABLE ?= no # Console for debug -COMMAND_ENABLE ?= no # Commands for debug and configuration -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no diff --git a/keyboards/pancake/config.h b/keyboards/pancake/config.h deleted file mode 100644 index 5a01a572e4..0000000000 --- a/keyboards/pancake/config.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#pragma once -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xB195 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Spaceman -#define PRODUCT Pancake -#define DESCRIPTION Choc Ortho Keyboard - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/pancake/feather/config.h b/keyboards/pancake/feather/config.h deleted file mode 100644 index eac91a5ada..0000000000 --- a/keyboards/pancake/feather/config.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#pragma once -#include "config_common.h" - -/* Pancake default pinout */ -#define MATRIX_ROW_PINS { B5, D7, C6, D0 } -#define MATRIX_COL_PINS { C7, D6, B7, B6, F0, D2, D3, F1, F4, F5, F6, F7 } -#define UNUSED_PINS - -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 \ No newline at end of file diff --git a/keyboards/pancake/feather/readme.md b/keyboards/pancake/feather/readme.md deleted file mode 100644 index 8b13789179..0000000000 --- a/keyboards/pancake/feather/readme.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/pancake/feather/rules.mk b/keyboards/pancake/feather/rules.mk deleted file mode 100644 index c54fbf06e0..0000000000 --- a/keyboards/pancake/feather/rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Processor frequency -F_CPU = 8000000 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# Build Options -# comment out to disable the options. -# -BLUETOOTH = AdafruitBLE -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled -AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below -RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. - -LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/pancake/info.json b/keyboards/pancake/info.json deleted file mode 100644 index 6d2b2a9bb4..0000000000 --- a/keyboards/pancake/info.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "keyboard_name": "Pancake", - "keyboard_folder": "Pancake", - "url": "", - "maintainer": "rionlion100 (Spaceman)", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT_planck_mit": { - "key_count": 47, - "layout": [ - { "w": 1, "x": 0, "y": 0 }, - { "w": 1, "x": 1, "y": 0 }, - { "w": 1, "x": 2, "y": 0 }, - { "w": 1, "x": 3, "y": 0 }, - { "w": 1, "x": 4, "y": 0 }, - { "w": 1, "x": 5, "y": 0 }, - { "w": 1, "x": 6, "y": 0 }, - { "w": 1, "x": 7, "y": 0 }, - { "w": 1, "x": 8, "y": 0 }, - { "w": 1, "x": 9, "y": 0 }, - { "w": 1, "x": 10, "y": 0 }, - { "w": 1, "x": 11, "y": 0 }, - { "w": 1, "x": 0, "y": 1 }, - { "w": 1, "x": 1, "y": 1 }, - { "w": 1, "x": 2, "y": 1 }, - { "w": 1, "x": 3, "y": 1 }, - { "w": 1, "x": 4, "y": 1 }, - { "w": 1, "x": 5, "y": 1 }, - { "w": 1, "x": 6, "y": 1 }, - { "w": 1, "x": 7, "y": 1 }, - { "w": 1, "x": 8, "y": 1 }, - { "w": 1, "x": 9, "y": 1 }, - { "w": 1, "x": 10, "y": 1 }, - { "w": 1, "x": 11, "y": 1 }, - { "w": 1, "x": 0, "y": 2 }, - { "w": 1, "x": 1, "y": 2 }, - { "w": 1, "x": 2, "y": 2 }, - { "w": 1, "x": 3, "y": 2 }, - { "w": 1, "x": 4, "y": 2 }, - { "w": 1, "x": 5, "y": 2 }, - { "w": 1, "x": 6, "y": 2 }, - { "w": 1, "x": 7, "y": 2 }, - { "w": 1, "x": 8, "y": 2 }, - { "w": 1, "x": 9, "y": 2 }, - { "w": 1, "x": 10, "y": 2 }, - { "w": 1, "x": 11, "y": 2 }, - { "w": 1, "x": 0, "y": 3 }, - { "w": 1, "x": 1, "y": 3 }, - { "w": 1, "x": 2, "y": 3 }, - { "w": 1, "x": 3, "y": 3 }, - { "w": 1, "x": 4, "y": 3 }, - { "w": 2, "x": 5, "y": 3 }, - { "w": 1, "x": 7, "y": 3 }, - { "w": 1, "x": 8, "y": 3 }, - { "w": 1, "x": 9, "y": 3 }, - { "w": 1, "x": 10, "y": 3 }, - { "w": 1, "x": 11, "y": 3 } ] - }, - "LAYOUT_ortho_4x12": { - "key_count": 48, - "layout": [ - { "w": 1, "x": 0, "y": 0 }, - { "w": 1, "x": 1, "y": 0 }, - { "w": 1, "x": 2, "y": 0 }, - { "w": 1, "x": 3, "y": 0 }, - { "w": 1, "x": 4, "y": 0 }, - { "w": 1, "x": 5, "y": 0 }, - { "w": 1, "x": 6, "y": 0 }, - { "w": 1, "x": 7, "y": 0 }, - { "w": 1, "x": 8, "y": 0 }, - { "w": 1, "x": 9, "y": 0 }, - { "w": 1, "x": 10, "y": 0 }, - { "w": 1, "x": 11, "y": 0 }, - { "w": 1, "x": 0, "y": 1 }, - { "w": 1, "x": 1, "y": 1 }, - { "w": 1, "x": 2, "y": 1 }, - { "w": 1, "x": 3, "y": 1 }, - { "w": 1, "x": 4, "y": 1 }, - { "w": 1, "x": 5, "y": 1 }, - { "w": 1, "x": 6, "y": 1 }, - { "w": 1, "x": 7, "y": 1 }, - { "w": 1, "x": 8, "y": 1 }, - { "w": 1, "x": 9, "y": 1 }, - { "w": 1, "x": 10, "y": 1 }, - { "w": 1, "x": 11, "y": 1 }, - { "w": 1, "x": 0, "y": 2 }, - { "w": 1, "x": 1, "y": 2 }, - { "w": 1, "x": 2, "y": 2 }, - { "w": 1, "x": 3, "y": 2 }, - { "w": 1, "x": 4, "y": 2 }, - { "w": 1, "x": 5, "y": 2 }, - { "w": 1, "x": 6, "y": 2 }, - { "w": 1, "x": 7, "y": 2 }, - { "w": 1, "x": 8, "y": 2 }, - { "w": 1, "x": 9, "y": 2 }, - { "w": 1, "x": 10, "y": 2 }, - { "w": 1, "x": 11, "y": 2 }, - { "w": 1, "x": 0, "y": 3 }, - { "w": 1, "x": 1, "y": 3 }, - { "w": 1, "x": 2, "y": 3 }, - { "w": 1, "x": 3, "y": 3 }, - { "w": 1, "x": 4, "y": 3 }, - { "w": 1, "x": 5, "y": 3 }, - { "w": 1, "x": 6, "y": 3 }, - { "w": 1, "x": 7, "y": 3 }, - { "w": 1, "x": 8, "y": 3 }, - { "w": 1, "x": 9, "y": 3 }, - { "w": 1, "x": 10, "y": 3 }, - { "w": 1, "x": 11, "y": 3 } ] - } - } -} diff --git a/keyboards/pancake/keymaps/default/keymap.c b/keyboards/pancake/keymaps/default/keymap.c deleted file mode 100644 index cebc6fccba..0000000000 --- a/keyboards/pancake/keymaps/default/keymap.c +++ /dev/null @@ -1,90 +0,0 @@ -#include QMK_KEYBOARD_H -enum layers { - _DEFAULT, - _LOWER, - _RAISE, - _FN -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define FN MO(_FN) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Default - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | " | ; | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | GUI | FN | Lower| Space |Raise | / | Left | Down |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DEFAULT] = LAYOUT_ortho_4x12( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_SCLN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , - KC_LCTL, KC_LALT, KC_LGUI, FN, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT -), - - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | _ | + | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | { | } | Vol+ | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | ? | | Vol- | | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_ortho_4x12( - 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_UNDS, KC_PLUS, _______, KC_PIPE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_VOLU, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_QUES, _______, KC_VOLD, _______ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | - | = | | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | [ | ] | Vol- | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | Vol+ | | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_ortho_4x12( - 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_MINS, KC_EQL, _______, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_VOLU, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______ -), - - /* FN - * ,-----------------------------------------------------------------------------------. - * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | F11 | F12 | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | TRNS | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_FN] = LAYOUT_ortho_4x12( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - - -}; - diff --git a/keyboards/pancake/keymaps/default/readme.md b/keyboards/pancake/keymaps/default/readme.md deleted file mode 100644 index 8b13789179..0000000000 --- a/keyboards/pancake/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/pancake/pancake.c b/keyboards/pancake/pancake.c deleted file mode 100644 index d77dbfbe01..0000000000 --- a/keyboards/pancake/pancake.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#include "pancake.h" diff --git a/keyboards/pancake/pancake.h b/keyboards/pancake/pancake.h deleted file mode 100644 index 312d789b42..0000000000 --- a/keyboards/pancake/pancake.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#pragma once - -#include "quantum.h" - -#define LAYOUT_planck_mit( \ - k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, \ - k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, \ - k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, \ - k300, k301, k302, k303, k304, k305, k307, k308, k309, k310, k311 \ -) \ -{ \ - { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011 }, \ - { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111 }, \ - { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211 }, \ - { k300, k301, k302, k303, k304, k305, k305, k307, k308, k309, k310, k311 } \ -} - -#define LAYOUT_ortho_4x12( \ - k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, \ - k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, \ - k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, \ - k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311 \ -) \ -{ \ - { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011 }, \ - { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111 }, \ - { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211 }, \ - { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311 } \ -} diff --git a/keyboards/pancake/promicro/config.h b/keyboards/pancake/promicro/config.h deleted file mode 100644 index ee02bff2b8..0000000000 --- a/keyboards/pancake/promicro/config.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2019 Spaceman - * - * 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 . - */ -#pragma once -#include "config_common.h" - -/* Pancake default pinout */ -#define MATRIX_ROW_PINS { B1, B3, B2, B6 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, E6, B4, B5, D7, C6, D4, D0, D1 } -#define UNUSED_PINS \ No newline at end of file diff --git a/keyboards/pancake/promicro/readme.md b/keyboards/pancake/promicro/readme.md deleted file mode 100644 index 8b13789179..0000000000 --- a/keyboards/pancake/promicro/readme.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/keyboards/pancake/promicro/rules.mk b/keyboards/pancake/promicro/rules.mk deleted file mode 100644 index 6ed9e88e99..0000000000 --- a/keyboards/pancake/promicro/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled -AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below -RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. - -LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/pancake/readme.md b/keyboards/pancake/readme.md deleted file mode 100644 index 3e3125f4d7..0000000000 --- a/keyboards/pancake/readme.md +++ /dev/null @@ -1,12 +0,0 @@ -# Pancake - -Ortho 40% Ortho Keyboard with an option for the adafruit feather - -Keyboard Maintainer: Spaceman AKA:[Rionlion100](https://github.com/rionlion100) -Hardware Availability: [GB](https://geekhack.org/index.php?topic=101371.0) - -Make example for this keyboard (after setting up your build environment): - - make pancake:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/plaid/config.h b/keyboards/plaid/config.h deleted file mode 100644 index 4d7bedee5f..0000000000 --- a/keyboards/plaid/config.h +++ /dev/null @@ -1,248 +0,0 @@ -/* -Copyright 2019 Takuya Urakawa (dm9records.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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ -#define VENDOR_ID 0x16c0 -#define PRODUCT_ID 0x27db -#define DEVICE_VER 0x0002 -#define MANUFACTURER dm9records -#define PRODUCT Plaid -#define DESCRIPTION 12x4 ortholinear keyboard with through hole components - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B4, B5, B3, D4 } -#define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1, D0 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -#define USB_MAX_POWER_CONSUMPTION 100 - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - -// #define RGB_DI_PIN E2 -// #ifdef RGB_DI_PIN -// #define RGBLED_NUM 16 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// #endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * 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 */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_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_HELP H -//#define MAGIC_KEY_HELP_ALT 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 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#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 B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#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 - -/* - * 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 1 - -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/plaid/info.json b/keyboards/plaid/info.json deleted file mode 100644 index 13bd05c149..0000000000 --- a/keyboards/plaid/info.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "keyboard_name": "Plaid // Through Hole", - "keyboard_folder": "planid", - "url": "https://github.com/hsgw/plaid", - "maintainer": "hsgw", - "width": 12, - "height": 4, - "layouts": { - "LAYOUT_plaid_mit": { - "key_count": 47, - "layout": [ - { "w": 1, "x": 0, "y": 0 }, - { "w": 1, "x": 1, "y": 0 }, - { "w": 1, "x": 2, "y": 0 }, - { "w": 1, "x": 3, "y": 0 }, - { "w": 1, "x": 4, "y": 0 }, - { "w": 1, "x": 5, "y": 0 }, - { "w": 1, "x": 6, "y": 0 }, - { "w": 1, "x": 7, "y": 0 }, - { "w": 1, "x": 8, "y": 0 }, - { "w": 1, "x": 9, "y": 0 }, - { "w": 1, "x": 10, "y": 0 }, - { "w": 1, "x": 11, "y": 0 }, - { "w": 1, "x": 0, "y": 1 }, - { "w": 1, "x": 1, "y": 1 }, - { "w": 1, "x": 2, "y": 1 }, - { "w": 1, "x": 3, "y": 1 }, - { "w": 1, "x": 4, "y": 1 }, - { "w": 1, "x": 5, "y": 1 }, - { "w": 1, "x": 6, "y": 1 }, - { "w": 1, "x": 7, "y": 1 }, - { "w": 1, "x": 8, "y": 1 }, - { "w": 1, "x": 9, "y": 1 }, - { "w": 1, "x": 10, "y": 1 }, - { "w": 1, "x": 11, "y": 1 }, - { "w": 1, "x": 0, "y": 2 }, - { "w": 1, "x": 1, "y": 2 }, - { "w": 1, "x": 2, "y": 2 }, - { "w": 1, "x": 3, "y": 2 }, - { "w": 1, "x": 4, "y": 2 }, - { "w": 1, "x": 5, "y": 2 }, - { "w": 1, "x": 6, "y": 2 }, - { "w": 1, "x": 7, "y": 2 }, - { "w": 1, "x": 8, "y": 2 }, - { "w": 1, "x": 9, "y": 2 }, - { "w": 1, "x": 10, "y": 2 }, - { "w": 1, "x": 11, "y": 2 }, - { "w": 1, "x": 0, "y": 3 }, - { "w": 1, "x": 1, "y": 3 }, - { "w": 1, "x": 2, "y": 3 }, - { "w": 1, "x": 3, "y": 3 }, - { "w": 1, "x": 4, "y": 3 }, - { "w": 2, "x": 5, "y": 3 }, - { "w": 1, "x": 7, "y": 3 }, - { "w": 1, "x": 8, "y": 3 }, - { "w": 1, "x": 9, "y": 3 }, - { "w": 1, "x": 10, "y": 3 }, - { "w": 1, "x": 11, "y": 3 } ] - }, - "LAYOUT_plaid_grid": { - "key_count": 48, - "layout": [ - { "w": 1, "x": 0, "y": 0 }, - { "w": 1, "x": 1, "y": 0 }, - { "w": 1, "x": 2, "y": 0 }, - { "w": 1, "x": 3, "y": 0 }, - { "w": 1, "x": 4, "y": 0 }, - { "w": 1, "x": 5, "y": 0 }, - { "w": 1, "x": 6, "y": 0 }, - { "w": 1, "x": 7, "y": 0 }, - { "w": 1, "x": 8, "y": 0 }, - { "w": 1, "x": 9, "y": 0 }, - { "w": 1, "x": 10, "y": 0 }, - { "w": 1, "x": 11, "y": 0 }, - { "w": 1, "x": 0, "y": 1 }, - { "w": 1, "x": 1, "y": 1 }, - { "w": 1, "x": 2, "y": 1 }, - { "w": 1, "x": 3, "y": 1 }, - { "w": 1, "x": 4, "y": 1 }, - { "w": 1, "x": 5, "y": 1 }, - { "w": 1, "x": 6, "y": 1 }, - { "w": 1, "x": 7, "y": 1 }, - { "w": 1, "x": 8, "y": 1 }, - { "w": 1, "x": 9, "y": 1 }, - { "w": 1, "x": 10, "y": 1 }, - { "w": 1, "x": 11, "y": 1 }, - { "w": 1, "x": 0, "y": 2 }, - { "w": 1, "x": 1, "y": 2 }, - { "w": 1, "x": 2, "y": 2 }, - { "w": 1, "x": 3, "y": 2 }, - { "w": 1, "x": 4, "y": 2 }, - { "w": 1, "x": 5, "y": 2 }, - { "w": 1, "x": 6, "y": 2 }, - { "w": 1, "x": 7, "y": 2 }, - { "w": 1, "x": 8, "y": 2 }, - { "w": 1, "x": 9, "y": 2 }, - { "w": 1, "x": 10, "y": 2 }, - { "w": 1, "x": 11, "y": 2 }, - { "w": 1, "x": 0, "y": 3 }, - { "w": 1, "x": 1, "y": 3 }, - { "w": 1, "x": 2, "y": 3 }, - { "w": 1, "x": 3, "y": 3 }, - { "w": 1, "x": 4, "y": 3 }, - { "w": 1, "x": 5, "y": 3 }, - { "w": 1, "x": 6, "y": 3 }, - { "w": 1, "x": 7, "y": 3 }, - { "w": 1, "x": 8, "y": 3 }, - { "w": 1, "x": 9, "y": 3 }, - { "w": 1, "x": 10, "y": 3 }, - { "w": 1, "x": 11, "y": 3 } ] - } - } -} diff --git a/keyboards/plaid/keymaps/brickbots/config.h b/keyboards/plaid/keymaps/brickbots/config.h deleted file mode 100644 index 5733b9e4b0..0000000000 --- a/keyboards/plaid/keymaps/brickbots/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/plaid/keymaps/brickbots/keymap.c b/keyboards/plaid/keymaps/brickbots/keymap.c deleted file mode 100644 index 20b6eac682..0000000000 --- a/keyboards/plaid/keymaps/brickbots/keymap.c +++ /dev/null @@ -1,411 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ - -#include QMK_KEYBOARD_H - -extern keymap_config_t keymap_config; - -enum plaid_layers { - _QWERTY, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _PLOVER, - _ADJUST -}; - -enum plaid_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - EXT_PLV, - LED_1, - LED_2, - LED_3, - LED_4, - LED_5, - LED_6, - LED_7, - LED_8, - LED_9, - LED_0 -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -// array of keys considered modifiers for led purposes -const uint16_t modifiers[] = { - KC_LCTL, - KC_RCTL, - KC_LALT, - KC_RALT, - KC_LSFT, - KC_RSFT, - KC_LGUI, - KC_RGUI, - LOWER, - RAISE -}; - -//Setup consts for LED modes -#define LEDMODE_ON 1 //always on -#define LEDMODE_OFF 0 //always off -#define LEDMODE_MODS 2 //On with modifiers -#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress -#define LEDMODE_KEY 4 //On with any keypress, off with key release -#define LEDMODE_ENTER 5 // On with enter key - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ltrl | Rctl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_plaid_grid( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_TAB, 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 , - KC_LCTL, KC_RCTL, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT_plaid_grid( - 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 , - KC_LCTL, KC_RALT, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_plaid_grid( - 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 , - KC_LCTL, KC_RALT, 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] = LAYOUT_plaid_grid( - 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_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 Up |Pg Dn | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_plaid_grid( - 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_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* 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] = LAYOUT_plaid_grid( - 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 | | | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_plaid_grid( - RESET,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,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, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) - - -}; - -//Setup config struct for LED -typedef union { - uint32_t raw; - struct { - uint8_t red_mode :8; - uint8_t green_mode :8; - }; -} led_config_t; -led_config_t led_config; - -//Set leds to saved state during powerup -void keyboard_post_init_user(void) { - // Call the post init code. - led_config.raw = eeconfig_read_user(); - - if(led_config.red_mode == LEDMODE_ON) { - writePinHigh(LED_RED); - } - - if(led_config.green_mode == LEDMODE_ON) { - writePinHigh(LED_GREEN); - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - led_config.raw = 0; - led_config.red_mode = LEDMODE_ON; - led_config.green_mode = LEDMODE_MODS; - eeconfig_update_user(led_config.raw); - eeconfig_update_user(led_config.raw); -} - -uint32_t layer_state_set_user(uint32_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { - switch (led_mode) { - case LEDMODE_MODS: - for (int i=0;ievent.pressed) { - writePinHigh(led); - } - else { - writePinLow(led); - } - } - } - break; - case LEDMODE_BLINKIN: - if (record->event.pressed) { - if(rand() % 2 == 1) { - if(rand() % 2 == 0) { - writePinLow(led); - } - else { - writePinHigh(led); - } - } - } - break; - case LEDMODE_KEY: - if (record->event.pressed) { - writePinHigh(led); - return; - } - else { - writePinLow(led); - return; - } - break; - case LEDMODE_ENTER: - if (keycode==KC_ENT) { - writePinHigh(led); - } - else { - writePinLow(led); - } - break; - - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - /* If the either led mode is keypressed based, call the led updater - then let it fall through the keypress handlers. Just to keep - the logic out of this procedure */ - if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { - led_keypress_update(LED_RED, led_config.red_mode, keycode, record); - } - if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { - led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); - } - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - case PLOVER: - if (record->event.pressed) { - 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) { - layer_off(_PLOVER); - } - return false; - break; - case LED_1: - if (record->event.pressed) { - if (led_config.red_mode==LEDMODE_ON) { - led_config.red_mode=LEDMODE_OFF; - writePinLow(LED_RED); - } - else { - led_config.red_mode=LEDMODE_ON; - writePinHigh(LED_RED); - } - } - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_2: - if (record->event.pressed) { - if (led_config.green_mode==LEDMODE_ON) { - led_config.green_mode=LEDMODE_OFF; - writePinLow(LED_GREEN); - } - else { - led_config.green_mode=LEDMODE_ON; - writePinHigh(LED_GREEN); - } - } - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_3: - led_config.red_mode=LEDMODE_MODS; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_4: - led_config.green_mode=LEDMODE_MODS; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_5: - led_config.red_mode=LEDMODE_BLINKIN; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_6: - led_config.green_mode=LEDMODE_BLINKIN; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_7: - led_config.red_mode=LEDMODE_KEY; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_8: - led_config.green_mode=LEDMODE_KEY; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_9: - led_config.red_mode=LEDMODE_ENTER; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_0: - led_config.green_mode=LEDMODE_ENTER; - eeconfig_update_user(led_config.raw); - return false; - break; - } - return true; -} diff --git a/keyboards/plaid/keymaps/brickbots/readme.md b/keyboards/plaid/keymaps/brickbots/readme.md deleted file mode 100644 index 48a12fa8bb..0000000000 --- a/keyboards/plaid/keymaps/brickbots/readme.md +++ /dev/null @@ -1,36 +0,0 @@ -# Brickbots keymap for plaid -Original copyright 2019 Takuya Urakawa (dm9records.com) -LED Support added by Richard Sutherland (rich@brickbots.com) - -This layout is based on the Planck layout, with esc/tab swapped and an extra -ctrl key in the bottom left corner. It includes an adjust layer (6) -accessible by holding the lower and raise modifiers (MO3 and MO4) together. -The adjustment layer is used to set the behavior of the two LEDs: - -**Modifier Mode:** -Activates when any modifier (shift, alt, os, MO) key is held -down. LED turns off when key is release - -**Blinkinlights Mode:** -Random chance of state change on each keystroke. - -**Keypress Mode:** -On for any keypress as long as the key is pressed - -**Carriage Mode:** -Turns on when enter is pressed, turns off when any next key is pressed - -To set the behavior of an LED, and save it to eeprom, hold the -raise/lower keys together to access the adjust layer, then use -the keys indicated below to set the behaviors - -* q = Toggle Red LED state, deactivates any other modes -* w = Toggle Green LED state, deactivates any other modes -* e = Set RED LED to modifier mode -* r = Set GREEN LED to modifier mode -* t = Set RED LED to Blinkinlights mode -* y = set GREEN LED to Blinkinlights mode -* u = set RED LED to Keypress mode -* i = set GREEN LED to Keypress mode -* o = set RED LED to Carriage mode -* p = set GREEN LED to Carriage mode diff --git a/keyboards/plaid/keymaps/default/config.h b/keyboards/plaid/keymaps/default/config.h deleted file mode 100644 index 5733b9e4b0..0000000000 --- a/keyboards/plaid/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/plaid/keymaps/default/keymap.c deleted file mode 100644 index 6a858a4a73..0000000000 --- a/keyboards/plaid/keymaps/default/keymap.c +++ /dev/null @@ -1,410 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ - -#include QMK_KEYBOARD_H - - -enum plaid_layers { - _QWERTY, - _COLEMAK, - _DVORAK, - _LOWER, - _RAISE, - _PLOVER, - _ADJUST -}; - -enum plaid_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - PLOVER, - EXT_PLV, - LED_1, - LED_2, - LED_3, - LED_4, - LED_5, - LED_6, - LED_7, - LED_8, - LED_9, - LED_0 -}; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -// array of keys considered modifiers for led purposes -const uint16_t modifiers[] = { - KC_LCTL, - KC_RCTL, - KC_LALT, - KC_RALT, - KC_LSFT, - KC_RSFT, - KC_LGUI, - KC_RGUI, - LOWER, - RAISE -}; - -//Setup consts for LED modes -#define LEDMODE_ON 1 //always on -#define LEDMODE_OFF 0 //always off -#define LEDMODE_MODS 2 //On with modifiers -#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress -#define LEDMODE_KEY 4 //On with any keypress, off with key release -#define LEDMODE_ENTER 5 // On with enter key - -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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_plaid_grid( - 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 , - KC_LCTL, KC_RALT, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT_plaid_grid( - 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 , - KC_LCTL, KC_RALT, 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_plaid_grid( - 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 , - KC_LCTL, KC_RALT, 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] = LAYOUT_plaid_grid( - 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_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 Up |Pg Dn | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_plaid_grid( - 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_PGUP, KC_PGDN, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -/* 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] = LAYOUT_plaid_grid( - 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 | | | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_plaid_grid( - RESET,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,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, TERM_ON, TERM_OFF, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) - - -}; - -//Setup config struct for LED -typedef union { - uint32_t raw; - struct { - uint8_t red_mode :8; - uint8_t green_mode :8; - }; -} led_config_t; -led_config_t led_config; - -//Set leds to saved state during powerup -void keyboard_post_init_user(void) { - // Call the post init code. - led_config.raw = eeconfig_read_user(); - - if(led_config.red_mode == LEDMODE_ON) { - writePinHigh(LED_RED); - } - - if(led_config.green_mode == LEDMODE_ON) { - writePinHigh(LED_GREEN); - } -} - -void eeconfig_init_user(void) { // EEPROM is getting reset! - led_config.raw = 0; - led_config.red_mode = LEDMODE_ON; - led_config.green_mode = LEDMODE_MODS; - eeconfig_update_user(led_config.raw); - eeconfig_update_user(led_config.raw); -} - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { - switch (led_mode) { - case LEDMODE_MODS: - for (int i=0;ievent.pressed) { - writePinHigh(led); - } - else { - writePinLow(led); - } - } - } - break; - case LEDMODE_BLINKIN: - if (record->event.pressed) { - if(rand() % 2 == 1) { - if(rand() % 2 == 0) { - writePinLow(led); - } - else { - writePinHigh(led); - } - } - } - break; - case LEDMODE_KEY: - if (record->event.pressed) { - writePinHigh(led); - return; - } - else { - writePinLow(led); - return; - } - break; - case LEDMODE_ENTER: - if (keycode==KC_ENT) { - writePinHigh(led); - } - else { - writePinLow(led); - } - break; - - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - /* If the either led mode is keypressed based, call the led updater - then let it fall through the keypress handlers. Just to keep - the logic out of this procedure */ - if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { - led_keypress_update(LED_RED, led_config.red_mode, keycode, record); - } - if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) { - led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record); - } - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - case PLOVER: - if (record->event.pressed) { - 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) { - layer_off(_PLOVER); - } - return false; - break; - case LED_1: - if (record->event.pressed) { - if (led_config.red_mode==LEDMODE_ON) { - led_config.red_mode=LEDMODE_OFF; - writePinLow(LED_RED); - } - else { - led_config.red_mode=LEDMODE_ON; - writePinHigh(LED_RED); - } - } - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_2: - if (record->event.pressed) { - if (led_config.green_mode==LEDMODE_ON) { - led_config.green_mode=LEDMODE_OFF; - writePinLow(LED_GREEN); - } - else { - led_config.green_mode=LEDMODE_ON; - writePinHigh(LED_GREEN); - } - } - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_3: - led_config.red_mode=LEDMODE_MODS; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_4: - led_config.green_mode=LEDMODE_MODS; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_5: - led_config.red_mode=LEDMODE_BLINKIN; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_6: - led_config.green_mode=LEDMODE_BLINKIN; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_7: - led_config.red_mode=LEDMODE_KEY; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_8: - led_config.green_mode=LEDMODE_KEY; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_9: - led_config.red_mode=LEDMODE_ENTER; - eeconfig_update_user(led_config.raw); - return false; - break; - case LED_0: - led_config.green_mode=LEDMODE_ENTER; - eeconfig_update_user(led_config.raw); - return false; - break; - } - return true; -} diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/plaid/keymaps/default/readme.md deleted file mode 100644 index 5a08a1fff3..0000000000 --- a/keyboards/plaid/keymaps/default/readme.md +++ /dev/null @@ -1,35 +0,0 @@ -# The default keymap for plaid -Original copyright 2019 Takuya Urakawa (dm9records.com) -LED Support added by Richard Sutherland (rich@brickbots.com) - -This layout is based on the Planck layout, and includes an adjust layer (6) -accessible by holding the lower and raise modifiers (MO3 and MO4) together. -The adjustment layer is used to set the behavior of the two LEDs: - -**Modifier Mode:** -Activates when any modifier (shift, alt, os, MO) key is held -down. LED turns off when key is release - -**Blinkinlights Mode:** -Random chance of state change on each keystroke. - -**Keypress Mode:** -On for any keypress as long as the key is pressed - -**Carriage Mode:** -Turns on when enter is pressed, turns off when any next key is pressed - -To set the behavior of an LED, and save it to eeprom, hold the -raise/lower keys together to access the adjust layer, then use -the keys indicated below to set the behaviors - -* q = Toggle Red LED state, deactivates any other modes -* w = Toggle Green LED state, deactivates any other modes -* e = Set RED LED to modifier mode -* r = Set GREEN LED to modifier mode -* t = Set RED LED to Blinkinlights mode -* y = set GREEN LED to Blinkinlights mode -* u = set RED LED to Keypress mode -* i = set GREEN LED to Keypress mode -* o = set RED LED to Carriage mode -* p = set GREEN LED to Carriage mode diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/config.h b/keyboards/plaid/keymaps/thehalfdeafchef/config.h deleted file mode 100644 index 4bcbc6f673..0000000000 --- a/keyboards/plaid/keymaps/thehalfdeafchef/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2019 Ian Canino (ian@thecommittedbug.io) - * - * 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 . - */ - -#pragma once - -// place overrides here diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c b/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c deleted file mode 100644 index bdf6c54c31..0000000000 --- a/keyboards/plaid/keymaps/thehalfdeafchef/keymap.c +++ /dev/null @@ -1,182 +0,0 @@ -#include QMK_KEYBOARD_H - -enum plaid_layers { - _QWERTY, - _DVORAK, - _COLEMAK, - _LOWER, - _RAISE, - _FUNCTION, -}; - -enum plaid_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LED }; - -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) - -#define LED_ON 1 -#define LED_OFF 0 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | LS/( | Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | - * `-----------------------------------------------------------------------------------' - */ - [_QWERTY] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), - - /* Colemak - * ,-----------------------------------------------------------------------------------. - * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | LS/( | Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | - * `-----------------------------------------------------------------------------------' - */ - - [_COLEMAK] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), - - /* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Tab | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) | - * `-----------------------------------------------------------------------------------' - */ - - [_DVORAK] = LAYOUT_planck_mit(KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, KC_RSPC), - - /* LOWER - * ,----------------------------------------------------------------------------. - * | | | MPRV | MPLY | MNXT | | | | PGUP| UP | PGDN|PSCR | - * |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+ - * | | | MUTE | VOLD | VOLU | | | | LEFT| DOWN|RIGHT| | - * |------+------+------+------+------+-----+-----+-----+-----+-----+-----+-----+ - * | | | MAIL | WBAK | WFWD | | | | HOME| | END | | - * |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+ - * | | | | | | DEL | | | | | | - * `----------------------------------------------------------------------------' - */ - - [_LOWER] = LAYOUT_planck_mit(KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_MAIL, KC_WBAK, KC_WFWD, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), - - /* RAISE - * ,--------------------------------------------------------------------------------. - * | NLCK | 1 | 2 | 3 | - | | | | ! | # | $ | + | - * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ - * | / | 4 | 5 | 6 | + | | | | % | ! | ! | = | - * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ - * | * | 7 | 8 | 9 | , | | | | _ | - | @ | ~ | - * |------+------+------+------+------+-----+-----+-----+------+------+------+------+ - * | | 0 | . | Ent | = | | | | | | ` | - * `--------------------------------------------------------------------------------' - */ - - [_RAISE] = LAYOUT_planck_mit(KC_NLCK, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_DLR, KC_PLUS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_PERC, KC_ASTR, KC_AMPR, KC_EQL, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PCMM, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_MINS, KC_AT, KC_TILDE, KC_NO, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV), - - /* Function (Lower + Raise) - * ,-----------------------------------------------------------------------------------------------------------------------. - * | RESET| LCA_T(F1) | LCA_T(F2) | LCA_T(F3) | LCA_T(F4) | LCA_T(F5) | LCA_T(F6) | LCA_T(F7) | | | | | - * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ - * | | | | | | QWERTY | DVORAK | COLEMAK | | | | | - * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ - * | | | | | | | | | | | | | - * |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+ - * | | | | | | LED | | | | | | - * `-----------------------------------------------------------------------------------------------------------------------' - */ - - [_FUNCTION] = LAYOUT_planck_mit(RESET, LCA_T(KC_F1), LCA_T(KC_F2), LCA_T(KC_F3), LCA_T(KC_F4), LCA_T(KC_F5), LCA_T(KC_F6), LCA_T(KC_F7), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QWERTY, DVORAK, COLEMAK, 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, LED, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)}; - -// constants to toggle LED behavior - -// Setup config struct for LED -typedef union { - uint32_t raw; - struct { - bool red_mode : 1; - bool green_mode : 1; - }; -} led_config_t; -led_config_t led_config; - -void keyboard_post_init_user(void) { led_config.raw = eeconfig_read_user(); } - -void eeconfig_init_user(void) { // EEPROM is getting reset! - led_config.raw = 0; - led_config.red_mode = LED_ON; - led_config.green_mode = LED_ON; - eeconfig_update_user(led_config.raw); - eeconfig_update_user(led_config.raw); -} - -// When LOWER and RAISE are held together, go to the FUNCTION layer -uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FUNCTION); } - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - switch (layer) { - case _LOWER: - writePinHigh(LED_RED); - break; - case _RAISE: - writePinHigh(LED_GREEN); - break; - default: - writePinLow(LED_GREEN); - writePinLow(LED_RED); - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - return false; - break; - case LED: - if (record->event.pressed) { - if (led_config.red_mode == LED_ON && led_config.green_mode == LED_ON) { - led_config.red_mode = LED_OFF; - led_config.green_mode = LED_OFF; - } else if (led_config.red_mode == LED_OFF && led_config.green_mode == LED_OFF) { - led_config.red_mode = LED_ON; - led_config.green_mode = LED_ON; - } - } - eeconfig_update_user(led_config.raw); - return false; - break; - } - return true; -} diff --git a/keyboards/plaid/keymaps/thehalfdeafchef/readme.md b/keyboards/plaid/keymaps/thehalfdeafchef/readme.md deleted file mode 100644 index bd09965b55..0000000000 --- a/keyboards/plaid/keymaps/thehalfdeafchef/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -![Plaid Layout Image](https://i.imgur.com/WnVnwEG.png) - -# The Half Deaf Chef Plaid Layout - -Opinionated keymaps optimized for programmers. The Left and Right Shift tap as parenthesis and the bracket keys are to either side of the layer keys (LOWER, RAISE). A 'right-side' up number pad in a layer with a complementary 'symbol' pad on the opposite side. An additional layer is provided to switch to virtual console on Linux based systems running xorg. These changes are propagated among all the layouts. diff --git a/keyboards/plaid/plaid.c b/keyboards/plaid/plaid.c deleted file mode 100644 index 28f56d7f93..0000000000 --- a/keyboards/plaid/plaid.c +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ -#include "plaid.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - led_set_user(usb_led); -} diff --git a/keyboards/plaid/plaid.h b/keyboards/plaid/plaid.h deleted file mode 100644 index d791cf7c00..0000000000 --- a/keyboards/plaid/plaid.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ - -#pragma once - -#include "quantum.h" - -#define LAYOUT_plaid_mit( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ -} - -#define LAYOUT_plaid_grid( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ -} - -// Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ - ) \ - LAYOUT_plaid_grid( \ - KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ - KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ - KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ - KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ - ) - -#define KEYMAP LAYOUT_plaid_grid -#define LAYOUT_ortho_4x12 LAYOUT_plaid_grid -#define LAYOUT_planck_mit LAYOUT_plaid_mit -#define LAYOUT_kc_ortho_4x12 KC_KEYMAP -#define KC_LAYOUT_ortho_4x12 KC_KEYMAP - -#define LED_RED C5 -#define LED_GREEN C4 diff --git a/keyboards/plaid/readme.md b/keyboards/plaid/readme.md deleted file mode 100644 index a491d05d3b..0000000000 --- a/keyboards/plaid/readme.md +++ /dev/null @@ -1,23 +0,0 @@ -# plaid // Through Hole - -![plaid](https://i.imgur.com/tTi9yR9h.jpg) - -12x4 ortholinear keyboard with only through hole components. - -Keyboard Maintainer: [hsgw](https://github.com/hsgw) -Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/plaid) -Hardware Availability: Group buy in r/mk - -Make example for this keyboard (after setting up your build environment): - make plaid:default - -Flashing example for this keyboard: - - make plaid:default:flash - -## Bootloader -use usbasploader in my repository. -https://github.com/hsgw/USBaspLoader/tree/plaid - - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/plaid/rules.mk b/keyboards/plaid/rules.mk deleted file mode 100644 index 7c4112c9aa..0000000000 --- a/keyboards/plaid/rules.mk +++ /dev/null @@ -1,36 +0,0 @@ -# MCU name -MCU = atmega328p - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = USBasp - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs - -LAYOUTS = ortho_4x12 planck_mit -LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/keymaps/ab/keymap.c b/keyboards/planck/keymaps/ab/keymap.c index c028e7949f..8835bfc87d 100644 --- a/keyboards/planck/keymaps/ab/keymap.c +++ b/keyboards/planck/keymaps/ab/keymap.c @@ -26,22 +26,12 @@ extern keymap_config_t keymap_config; // Func macro definitions. #define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER #define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE -#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) -#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift -#define ZM_NRM FUNC(4) // Zoom normal -#define ZM_IN FUNC(5) // Zoom out -#define ZM_OUT FUNC(6) // Zoom in -#define EM_UNDO FUNC(7) // Emacs Undo - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), - [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), - [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), - [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), - [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), - }; +#define CTL_CAPS MT(MOD_LCTL, KC_CAPS) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for Enter, hold for Shift +#define ZM_NRM C(KC_0) // Zoom normal +#define ZM_IN C(KC_MINS) // Zoom out +#define ZM_OUT C(KC_PLUS) // Zoom in +#define EM_UNDO C(KC_UNDS) // Emacs Undo // This config can be found at Keyboard layout editor site: http://goo.gl/zjXL2l const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/angerthosenear/keymap.c b/keyboards/planck/keymaps/angerthosenear/keymap.c index 6a497641e6..6e9c69333e 100644 --- a/keyboards/planck/keymaps/angerthosenear/keymap.c +++ b/keyboards/planck/keymaps/angerthosenear/keymap.c @@ -16,21 +16,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [2] = LAYOUT_planck_grid( /* RAISE */ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, - KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), [3] = LAYOUT_planck_grid( /* LOWER */ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_DEL, - KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END ) }; - - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/austin/keymap.c b/keyboards/planck/keymaps/austin/keymap.c index 16bca79510..3461ca9551 100644 --- a/keyboards/planck/keymaps/austin/keymap.c +++ b/keyboards/planck/keymaps/austin/keymap.c @@ -12,25 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, - KC_FN3, KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + DF(0), KC_LGUI, KC_LALT, KC_LCTL, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [2] = LAYOUT_planck_grid( /* RAISE */ 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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), [3] = LAYOUT_planck_grid( /* LOWER */ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, - KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ) }; - - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index ade4ea30f0..66533e53a2 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE_QWERTY_LAYER] = LAYOUT_planck_grid( TD(TD_ESC_GRV), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, - F(5), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_NAVS, F(6), + MT(MOD_LCTL, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT_NAVS, MT(MOD_RCTL, KC_ENT), KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, LT_GUIL, ALL_T(KC_RBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_LBRC), LT_GUIR ), @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LOWER_LAYER] = LAYOUT_planck_grid( LGUI(KC_GRV), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_3), - F(5), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, F(6), + MT(MOD_LCTL, KC_TAB), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, MT(MOD_RCTL, KC_ENT), KC_LSPO, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, ___x___, KC_NDSH, KC_MDSH, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, LT_GUIL, ALL_T(KC_LBRC), M(LALT_BRACE), KC_LGUI, LOWER, KC_BSPC, KC_BSPC, RAISE, KC_RGUI, M(RALT_BRACE), ALL_T(KC_RBRC), LT_GUIR ), @@ -224,12 +224,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - // Modifiers - [5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_TAB), - [6] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index 23af2277bd..46d077ddc3 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_planck_grid( 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, F(0) , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT), KC_LCTRL,KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), @@ -179,10 +179,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/planck/keymaps/charlie/keymap.c b/keyboards/planck/keymaps/charlie/keymap.c index 29d0502238..4a3adba513 100644 --- a/keyboards/planck/keymaps/charlie/keymap.c +++ b/keyboards/planck/keymaps/charlie/keymap.c @@ -2,52 +2,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_planck_grid( /* Native */ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, FUNC(2), + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, DF(1), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TAB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_DEL, KC_LCTL, KC_NO, KC_LSFT, KC_LALT, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [1] = LAYOUT_planck_grid( /* QWERTY->PHOTOSHOP */ - KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, FUNC(1), - KC_O, KC_G, KC_S, KC_U, KC_T, FUNC(27), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9, - KC_TAB, FUNC(4), FUNC(5), FUNC(6), KC_F1, FUNC(7), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, FUNC(9), - KC_COMM, KC_DOT, KC_R, FUNC(11), MO(2), KC_SPC, FUNC(12), KC_F2, FUNC(8), KC_F3, KC_F14 + KC_DELETE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, DF(0), + KC_O, KC_G, KC_S, KC_U, KC_T, C(KC_R), KC_F21, KC_F10, KC_F11, KC_F7, KC_F8, KC_F9, + KC_TAB, C(S(A(KC_F9))), C(S(KC_I)), S(KC_M), KC_F1, A(KC_BSPC), KC_F18, KC_F19, KC_F23, KC_F20, KC_F22, C(S(A(KC_F12))), + KC_COMM, KC_DOT, KC_R, C(KC_H), MO(2), KC_SPC, C(KC_S), KC_F2, C(S(A(KC_X))), KC_F3, KC_F14 ), - [2] = LAYOUT_planck_grid( /* 2: FUNC(3 PHOTOSHOP */ - KC_ESC, FUNC(25), FUNC(26), 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, FUNC(19), FUNC(20), FUNC(21), - KC_C, KC_NO, FUNC(22), FUNC(5), KC_NO, FUNC(23), KC_NO, KC_NO, KC_NO, KC_NO, FUNC(13), KC_NO, - FUNC(14), FUNC(15), FUNC(16), FUNC(17), MO(2), KC_SPC, FUNC(18), KC_NO, KC_NO, KC_F24, KC_NO + [2] = LAYOUT_planck_grid( /* PHOTOSHOP */ + KC_ESC, C(KC_Z), C(KC_Y), 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, C(S(A(KC_F7))), C(S(A(KC_F8))), C(S(KC_X)), + KC_C, KC_NO, S(KC_MINS), C(S(KC_I)), KC_NO, C(S(KC_BSPC)), KC_NO, KC_NO, KC_NO, KC_NO, C(S(KC_F5)), KC_NO, + C(KC_F2), C(S(KC_F2)), C(KC_0), C(S(KC_H)), MO(2), KC_SPC, C(S(KC_S)), KC_NO, KC_NO, KC_F24, KC_NO ) }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_DEFAULT_LAYER_SET(0), // set Qwerty layout - [2] = ACTION_DEFAULT_LAYER_SET(1), // set Photoshop presets - - [4] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F9), // photo folder AHK - [5] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_I), // select inverse - [6] = ACTION_MODS_KEY(MOD_LSFT, KC_M), // marquee select - [7] = ACTION_MODS_KEY(MOD_LALT, KC_BSPC), // fill - [8] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_X), // warp - [9] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT | MOD_LSFT, KC_F12), // merge all new layer - [10] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), // zoom out - [11] = ACTION_MODS_KEY(MOD_LCTL, KC_H), // RBG sliders - [12] = ACTION_MODS_KEY(MOD_LCTL, KC_S), // save - [13] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_F5), // layer mask from transparancy - [14] = ACTION_MODS_KEY(MOD_LCTL, KC_F2), // stroke - [15] = ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_F2), // stroke layer - [16] = ACTION_MODS_KEY(MOD_LCTL, KC_0), // zoom 0 - [17] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_H), // HSV sliders - [18] = ACTION_MODS_KEY(MOD_LCTL | MOD_LSFT, KC_S), // save as - [19] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F7), // gaussian blur - [20] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F8), // motion blur - [21] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_X), // liquify filter - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // prev layer blending - [23] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_BSPC), // KC_NOrmal layer blending - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // next layer blending - [25] = ACTION_MODS_KEY(MOD_LCTL, KC_Z), // step back - [26] = ACTION_MODS_KEY(MOD_LCTL, KC_Y), // step forward - [27] = ACTION_MODS_KEY(MOD_LCTL, KC_R), // rasterize - -}; diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 018cff4e54..805ebd7fd3 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -23,8 +23,8 @@ enum planck_keycodes { }; // Key code names -#define SFT_ENT FUNC(0) // Tap for enter, hold for right shift -#define LOCK FUNC(1) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift +#define LOCK TG(_LOCKED) #define KC_PSTE KC_PASTE #ifdef TAP_DANCE_ENABLE @@ -41,12 +41,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -// Function definitions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [1] = ACTION_LAYER_TOGGLE(_LOCKED) -}; - // Layout definitions const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/david/keymap.c b/keyboards/planck/keymaps/david/keymap.c index 57aafed2a0..d093efe04a 100644 --- a/keyboards/planck/keymaps/david/keymap.c +++ b/keyboards/planck/keymaps/david/keymap.c @@ -12,24 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, - KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + DF(0), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [2] = LAYOUT_planck_grid( /* RAISE */ 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_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, DF(0), DF(1), RESET, M(0), M(1), M(2), KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, KC_F11, KC_F12, M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), [3] = LAYOUT_planck_grid( /* LOWER */ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, - KC_TRNS, FUNC(3), FUNC(4), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, DF(0), DF(1), RESET, M(0), M(1), M(2), S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ) }; - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index a244da2e42..1055c754f0 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c @@ -34,8 +34,8 @@ enum planck_keycodes { #include "dynamic_macro.h" // Key code names -#define SFT_ENT FUNC(0) // Tap for enter, hold for right shift -#define LOCK FUNC(1) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift +#define LOCK TG(_LOCKED) #define KC_PSTE KC_PASTE #define ZOOM_IN LCTL(KC_EQL) #define ZOOM_OUT LCTL(KC_MINS) @@ -55,12 +55,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; #endif -// Function definitions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [1] = ACTION_LAYER_TOGGLE(_LOCKED) -}; - // Layout definitions const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/dzobert/keymap.c b/keyboards/planck/keymaps/dzobert/keymap.c index 17b1bef019..6012c068a9 100644 --- a/keyboards/planck/keymaps/dzobert/keymap.c +++ b/keyboards/planck/keymaps/dzobert/keymap.c @@ -5,14 +5,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_TAB, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSPC, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - KC_FN4, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + DF(1), KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT // Space is repeated to accommadate for both spacebar wiring positions ), [1] = LAYOUT_planck_grid( /* Colemak */ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_TAB, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_BSPC, KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - KC_FN3, KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + DF(0), KC_RSFT, KC_LGUI, KC_LSFT, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [2] = LAYOUT_planck_grid( /* RAISE */ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, @@ -27,9 +27,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_KP_DOT, KC_KP_ENTER, KC_KP_PLUS ) }; - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index 4a8a7d0c51..3beadd8e2d 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -196,7 +196,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistant_default_layer_set(1UL<<_DVORAK); } @@ -246,7 +246,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -264,7 +264,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -285,12 +285,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -302,7 +302,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/espynn/keymap.c b/keyboards/planck/keymaps/espynn/keymap.c index 924a8c35c6..305fb6e759 100644 --- a/keyboards/planck/keymaps/espynn/keymap.c +++ b/keyboards/planck/keymaps/espynn/keymap.c @@ -36,21 +36,11 @@ extern keymap_config_t keymap_config; // Func macro definitions. #define LWR_PGDN LT(_LOWER, KC_PGDN) // Tap for PgDn, hold for LOWER #define RSE_PGUP LT(_RAISE, KC_PGUP) // Tap for PgUp, hold for RAISE -#define CTL_CAPS FUNC(2) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) -#define SFT_ENT FUNC(3) // Tap for Enter, hold for Shift -#define ZM_NRM FUNC(4) // Zoom normal -#define ZM_IN FUNC(5) // Zoom out -#define ZM_OUT FUNC(6) // Zoom in - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), - [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [4] = ACTION_MODS_KEY(MOD_LCTL, KC_0), - [5] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), - [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PLUS), - [7] = ACTION_MODS_KEY(MOD_LCTL, KC_UNDS), - }; +#define CTL_CAPS MT(MOD_LCTL, KC_CAPS) // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK) +#define SFT_ENT MT(MOD_RSFT, KC_ENT) // Tap for Enter, hold for Shift +#define ZM_NRM C(KC_0) // Zoom normal +#define ZM_IN C(KC_MINS) // Zoom out +#define ZM_OUT C(KC_PLUS) // Zoom in // This config can be found at Keyboard layout editor site: https://goo.gl/cF7uIO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/ishtob/keymap.c b/keyboards/planck/keymaps/ishtob/keymap.c index e036d8a5a3..aeb36b3687 100644 --- a/keyboards/planck/keymaps/ishtob/keymap.c +++ b/keyboards/planck/keymaps/ishtob/keymap.c @@ -198,10 +198,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - ACTION_SWAP_HANDS_TAP_KEY(KC_SPC), -}; - #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); @@ -230,7 +226,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -239,7 +235,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case COLEMAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); + PLAY_SONG(tone_colemak); #endif persistant_default_layer_set(1UL<<_COLEMAK); } @@ -248,7 +244,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case DVORAK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + PLAY_SONG(tone_dvorak); #endif persistant_default_layer_set(1UL<<_DVORAK); } @@ -289,7 +285,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_RAISE); layer_off(_LOWER); @@ -307,7 +303,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { case EXT_PLV: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + PLAY_SONG(tone_plover_gb); #endif layer_off(_PLOVER); } @@ -331,12 +327,12 @@ void startup_user() rgblight_mode(RGB_MATRIX_CYCLE_ALL); #endif //RGB_matrix wait_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); wait_ms(150); stop_all_notes(); } @@ -348,7 +344,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/joe/keymap.c b/keyboards/planck/keymaps/joe/keymap.c index b759a86cea..49b2948e65 100644 --- a/keyboards/planck/keymaps/joe/keymap.c +++ b/keyboards/planck/keymaps/joe/keymap.c @@ -7,25 +7,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_planck_grid( /* Joe colemak */ FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT , - F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, + MT(MOD_LSFT, KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_planck_grid( /* Joe soft Colemak */ FN3_ESC, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_MINS, KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_ENT , - F(15), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, + MT(MOD_LSFT, KC_TAB), CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT ), [2] = LAYOUT_planck_grid( /* Joe NUMPAD */ FN3_ESC, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, LSFT(KC_9), LSFT(KC_0), KC_PSLS, KC_P7, KC_P8, KC_P9 , KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, LSFT(KC_5), KC_PEQL, KC_PAST, KC_P4, KC_P5, KC_P6 , - F(15), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 , + MT(MOD_LSFT, KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PCMM, KC_PMNS, KC_P1, KC_P2, KC_P3 , KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4), KC_TRNS, KC_TRNS, MO(5), KC_PPLS, KC_P0, KC_PDOT, KC_PENT ), [3] = LAYOUT_planck_grid( /* Joe 1337 haxOr5*/ FN3_ESC, KC_Q, KC_W, KC_F, KC_P, KC_6, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS, KC_BSPC, KC_4, KC_R, KC_5, KC_7, KC_D, KC_H, KC_N, KC_3, KC_1, KC_0, KC_ENT , - F(15), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, + MT(MOD_LSFT, KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_QUOT, KC_LCTL, KC_LGUI, KC_LALT, KC_LSFT, MO(4),KC_SPC, KC_SPC, MO(5),KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT ), [4] = LAYOUT_planck_grid( /* Joe LOWER fn1 */ @@ -44,21 +44,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , KC_NO, KC_MPLY, KC_MPRV, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , - F(6), F(7), F(8), F(9), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L)) + DF(0), DF(1), DF(2), DF(3), MO(4), KC_TRNS, KC_TRNS, MO(5), KC_POWER, KC_WAKE, KC_SLEP, LCTL(LALT(KC_L)) ) }; -const uint16_t PROGMEM fn_actions[] = { - /* toggle layers */ - [6] = ACTION_DEFAULT_LAYER_SET(0), - [7] = ACTION_DEFAULT_LAYER_SET(1), - [8] = ACTION_DEFAULT_LAYER_SET(2), - [9] = ACTION_DEFAULT_LAYER_SET(3), - - /* tab on tap, shift on hold */ - [15] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { diff --git a/keyboards/planck/keymaps/kyle/keymap.c b/keyboards/planck/keymaps/kyle/keymap.c index a788aa859f..896dfe9397 100644 --- a/keyboards/planck/keymaps/kyle/keymap.c +++ b/keyboards/planck/keymaps/kyle/keymap.c @@ -12,24 +12,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, 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, - KC_FN3, KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + DF(0), KC_LCTL, KC_LALT, KC_LGUI, MO(3), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), [2] = LAYOUT_planck_grid( /* RAISE */ 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_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), [3] = LAYOUT_planck_grid( /* LOWER */ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, - KC_TRNS, FUNC(3), FUNC(4), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), + KC_TRNS, DF(0), DF(1), LSFT(RSFT(KC_PAUSE)), LSFT(RSFT(KC_D)), KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), S(KC_BSLS), KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ) }; - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 9bd4b7a60b..26ca6a5505 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P | * `-----------------------------------------------------------------------' */ - KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, F(4), + KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, TG(5), KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | Tab | ALT | | Space |CrJmp| GUI |Left |Down |Right| * `-----------------------------------------------------------------------' */ - MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, F(4), + MO(6), KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, TG(5), KC_ENT, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_SCLN, KC_LCTL, KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DE_DOT, KC_UP, DE_SLSH, KC_NO, KC_NO, KC_TAB, KC_LALT, KC_NO, KC_SPC, KC_SPC, LCTL(KC_SPC), KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT @@ -129,11 +129,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [4] = ACTION_LAYER_TOGGLE(5), // toggle Gaming - [5] = ACTION_MODS_TAP_KEY(KC_LSFT, KC_CAPS), //Shift on press, Caps on tap -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/planck/keymaps/matrixman/keymap.c b/keyboards/planck/keymaps/matrixman/keymap.c index 20982a24ea..7525e345bb 100644 --- a/keyboards/planck/keymaps/matrixman/keymap.c +++ b/keyboards/planck/keymaps/matrixman/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(_NAV_L,KC_Q), KC_W, KC_E, KC_R, KC_T, KC_DELETE, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, LT(_NAV_R,KC_P) ,KC_A, KC_S, KC_D, KC_F, KC_G, CTL_T(KC_ESC), CTL_T(KC_SCLN), KC_H, KC_J, KC_K, KC_L, KC_QUOT ,SFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALT_T(KC_TAB), ALT_T(KC_INS), KC_N, KC_M, KC_COMM, KC_DOT, SFT_T(KC_SLSH) - ,KC_LCTRL, KC_LGUI, KC_FN0, KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, KC_FN0, KC_RCTRL, KC_ENT + ,KC_LCTRL, KC_LGUI, LM(_NAV_ALT, MOD_LALT), KC_TAB, LT(_SYMB_L, KC_ESC), KC_LSFT, KC_LSFT, LT(_SYMB_R,KC_SPC), KC_BSPC, LM(_NAV_ALT, MOD_LALT), KC_RCTRL, KC_ENT ), // accessed via the left symb-layer key, includes a semicolon where the right symb-layer key was [_SYMB_L] = LAYOUT_planck_grid( @@ -53,11 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MODS(_NAV_ALT, MOD_LALT) - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/planck/keymaps/max/keymap.c b/keyboards/planck/keymaps/max/keymap.c index 1e5d6a61c2..b84404e1e5 100644 --- a/keyboards/planck/keymaps/max/keymap.c +++ b/keyboards/planck/keymaps/max/keymap.c @@ -16,20 +16,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [2] = LAYOUT_planck_grid( /* RAISE */ 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_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, DF(0), DF(1), RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), [3] = LAYOUT_planck_grid( /* LOWER */ S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC, - KC_TRNS, FUNC(3), FUNC(4), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS, + KC_TRNS, DF(0), DF(1), RESET, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), S(KC_RBRC), KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, S(KC_BSLS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ) }; - -const uint16_t PROGMEM fn_actions[] = { - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - -}; diff --git a/keyboards/planck/keymaps/mollat/keymap.c b/keyboards/planck/keymaps/mollat/keymap.c index 2952a0ca8f..f993d299b6 100644 --- a/keyboards/planck/keymaps/mollat/keymap.c +++ b/keyboards/planck/keymaps/mollat/keymap.c @@ -82,10 +82,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [_LCTL] = ACTION_MODS_TAP_KEY(KC_LCTL, M(12)), // does not work -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/planck/keymaps/piemod/keymap.c b/keyboards/planck/keymaps/piemod/keymap.c index 57002cc386..d75b8bf53b 100644 --- a/keyboards/planck/keymaps/piemod/keymap.c +++ b/keyboards/planck/keymaps/piemod/keymap.c @@ -1,13 +1,13 @@ #include QMK_KEYBOARD_H #define DVORAK 0 -#define ARROW 1 //F(1) -#define SYMBOL 2 // F(2) -#define NUMBER 3 // F(3) -#define FUNCTION 4 // F(4) -#define EMACS 5 // F(5) -#define CUSTOM_MACROS 6 // F(6) -#define MOUSE 7 // F(7) +#define ARROW 1 +#define SYMBOL 2 +#define NUMBER 3 +#define FUNCTION 4 +#define EMACS 5 +#define CUSTOM_MACROS 6 +#define MOUSE 7 #define LT_1A LT(1, KC_A) #define LT_2O LT(2, KC_O) @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_QUOTE, LT_7COM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DELETE, KC_TAB, LT_1A, LT_2O, LT_3E, LT_4U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, KC_LSHIFT, KC_SCOLON, LT_5Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_MINUS, - F(10), LT_6CTL, KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + C(KC_LALT), LT_6CTL, KC_MENU, KC_LALT, KC_LGUI, KC_BSPACE, KC_SPACE, KC_RCTRL, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT ), [ARROW] = LAYOUT_planck_grid( @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMBOL] = LAYOUT_planck_grid( KC_TILD, KC_GRAVE, KC_NO, KC_EQUAL, KC_PLUS, KC_NO, KC_LBRACKET, KC_RBRACKET, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, - KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, F(21), + KC_NO, KC_NO, KC_TRNS, KC_SCOLON, KC_COLN, KC_NO, KC_LCBR, KC_RCBR, KC_DLR, KC_PERC, KC_CIRC, S(KC_SLSH), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, KC_SLASH, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ASTR, KC_SLASH, KC_MINUS, KC_PLUS, KC_EQUAL ), @@ -75,31 +75,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - - enum function_id { - TEENSY_KEY, - CUSTOM_KEY, - L_CTRL_ALT_ENT, - R_CTRL_ALT_ENT, - }; - - int CAPSLOCKED = 0; - - const uint16_t PROGMEM fn_actions[] = { - - // DVORAK 0 - // ARROW 1, F(1) - // SYMBOL 2, F(2) - // NUMBER 3, F(3) - // FUNCTION 4, F(4) - // EMACS 5, F(5) - // MACROS 6, F(6) - // MOUSE 7, F(7) - - // Special Keys - [10] = ACTION_MODS_KEY(KC_LCTRL, KC_LALT), // FN10 = Ctrl + Alt. - - // Symbols - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // FN21 = Question mark. - - }; diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 78123c44ce..8428c2335f 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -99,7 +99,7 @@ enum keyboard_macros { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_RSFT) #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -234,10 +234,6 @@ void persistent_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_RSFT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index 178422cd8b..8974555fb9 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c @@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -185,12 +185,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -202,7 +202,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index 550117d000..f3f60b7d1d 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c @@ -107,7 +107,7 @@ enum { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_RSFT) #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -243,10 +243,6 @@ void persistant_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_RSFT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 3cea2e721e..3fbbae0278 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -53,6 +53,7 @@ #define MUSIC_MAP #undef AUDIO_VOICES +// Note: following undef isn't really necessary on STM32, C6_AUDIO is AVR related #undef C6_AUDIO /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 49f6088c37..d101f36d65 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -14,7 +14,7 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c index bf9e89e1f2..d1d274f293 100644 --- a/keyboards/preonic/keymaps/that_canadian/keymap.c +++ b/keyboards/preonic/keymaps/that_canadian/keymap.c @@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -213,12 +213,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -230,7 +230,7 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index 9be496ce79..45edfa0b0f 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -23,7 +23,7 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index b98f9b52c8..f24c6a49b7 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -23,7 +23,7 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index b5b2ced5a7..b7429f757a 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -40,6 +40,7 @@ #define MUSIC_MAP #undef AUDIO_VOICES +// Note: following undef isn't really necessary on STM32, C6_AUDIO is AVR related #undef C6_AUDIO /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 4c5d2f2ffe..a5fc16a2e5 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -14,7 +14,7 @@ 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 = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index 23c4168f2b..4516f62e8d 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c @@ -78,7 +78,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -87,7 +87,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //case COLEMAK: //if (record->event.pressed) { //#ifdef AUDIO_ENABLE - //PLAY_NOTE_ARRAY(tone_colemak, false, 0); + //PLAY_SONG(tone_colemak); //#endif //persistant_default_layer_set(1UL<<_COLEMAK); //} diff --git a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c index 13edd0db8d..bca4684dc5 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c @@ -77,7 +77,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case QWERTY: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif persistant_default_layer_set(1UL<<_QWERTY); } @@ -86,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //case COLEMAK: //if (record->event.pressed) { //#ifdef AUDIO_ENABLE - //PLAY_NOTE_ARRAY(tone_colemak, false, 0); + //PLAY_SONG(tone_colemak); //#endif //persistant_default_layer_set(1UL<<_COLEMAK); //} diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index ff2b9a258c..32ff3a078b 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -26,7 +26,7 @@ NKRO_ENABLE = no # USB Nkey Rollover MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = yes # Audio output RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk index 221054879c..990edc9df2 100644 --- a/keyboards/sck/neiso/rules.mk +++ b/keyboards/sck/neiso/rules.mk @@ -28,6 +28,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index cfeda0a245..2bfe82977c 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c @@ -29,14 +29,12 @@ along with this program. If not, see . //Function //Mute microphone #define KC_SPACEFN LT(2, KC_SPACE) -#define KC_OSLS KC_FN3 -#define KC_GMLK KC_FN1 +#define KC_OSLS OSM(MOD_LSFT) +#define KC_GMLK TG(1) #define KC_FUNC MO(2) #define MICMUTE RCTL(KC_LCTL) enum function_codes { - F_OSLS = 3, - F_GMLK = 1, }; enum layer_names { @@ -146,14 +144,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -/* -* Fn action definition -*/ -const uint16_t PROGMEM fn_actions[] = { - [F_GMLK] = ACTION_LAYER_TOGGLE(1), // Disable SpaceFn and Oneshot Shift - [F_OSLS] = ACTION_MODS_ONESHOT(MOD_LSFT) // Oneshot Leftshift -}; - void matrix_init_user(void) { } diff --git a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c index c72c37d9d3..cba307ba49 100644 --- a/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c @@ -7,6 +7,13 @@ #define KC_LT5 LT(5, KC_SLSH) #define KC_LT6 LT(6, KC_SCLN) +#define KC_MTRS MT(MOD_RSFT, KC_GRV) + +#define KC_DF0 DF(0) +#define KC_DF1 DF(1) +#define KC_DF2 DF(2) +#define KC_DF3 DF(3) + /* * Hasu */ @@ -28,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, NO, BSPC, \ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, \ CAPS, A, S, D, F, G, H, J, K, L, LT6, QUOT, NO, ENT, \ - LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, FN9, NO, \ + LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, LT5, NO, MTRS, NO, \ LCTL, LGUI, LALT, SPC, RALT, MO6, MO6, MO4), /* Keymap 1: colemak ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -165,20 +172,9 @@ Lw: set Workman layout */ LAYOUT_kc( - FN5, FN6, FN7, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, FN5, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN7, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, TRNS, FN6, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout - [6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout - [7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout - [8] = ACTION_DEFAULT_LAYER_SET(3), // set workman layout - [9] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRV), -}; diff --git a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c index 0145540198..24182ad20a 100644 --- a/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c @@ -18,6 +18,9 @@ along with this program. If not, see . #define KC_MO1 MO(1) #define KC_SPFN LT(1, KC_SPC) +#define KC_SDEL S(KC_DEL) +#define KC_CINS C(KC_INS) +#define KC_SINS S(KC_INS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layout 0: Default Layer @@ -57,20 +60,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ TRNS, MPRV, MPLY, MNXT, MSTP, TRNS, TRNS, PGUP, UP, PGDN, TRNS, SLCK, PAUS, INS, \ TRNS, VOLD, MUTE, VOLU, TRNS, TRNS, HOME, LEFT, DOWN, RGHT, END, TRNS, TRNS, PENT, \ - TRNS, TRNS, PSCR, FN2, FN3, FN4, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \ + TRNS, TRNS, PSCR, SDEL, CINS, SINS, CALC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; -/* -* Fn action definition -*/ -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_MODS_KEY(MOD_LSFT, KC_DEL), /* Cut */ - [3] = ACTION_MODS_KEY(MOD_LCTL, KC_INS), /* Copy */ - [4] = ACTION_MODS_KEY(MOD_LSFT, KC_INS), /* Paste */ -}; - - void matrix_init_user(void) { } diff --git a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c index 3b38ed501b..6286f24371 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c @@ -3,6 +3,16 @@ #define KC_MO6 MO(6) #define KC_MO7 MO(7) +#define KC_DF0 DF(0) +#define KC_DF1 DF(1) +#define KC_DF2 DF(2) +#define KC_DF3 DF(3) + +#define KC_TG4 TG(4) +#define KC_TG5 TG(5) + +#define KC_CSES C(S(KC_ESC)) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -139,10 +149,10 @@ FnS: toggle Arrow overlay */ LAYOUT_kc( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ - TRNS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN3, END, TRNS, TRNS, \ + TRNS, TG5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, MO7, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TG4, TRNS, TRNS, TRNS, TRNS), /* 7: Layout selector ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │ Lq │ Lc │ Ld │ Lw │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ @@ -163,19 +173,9 @@ Lw: set Workman layout */ LAYOUT_kc( - FN5, FN6, FN7, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, FN5, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN7, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, TRNS, FN6, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + DF0, DF1, DF2, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, DF0, DF3, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, DF2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, DF1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; -const uint16_t PROGMEM fn_actions[] = { - /* Poker Layout */ - [1] = ACTION_LAYER_TOGGLE(4), // toggle arrow overlay - [2] = ACTION_LAYER_TOGGLE(5), // toggle Esc overlay - [3] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // Task(RControl,RShift+Esc) - [5] = ACTION_DEFAULT_LAYER_SET(0), // set qwerty layout - [6] = ACTION_DEFAULT_LAYER_SET(1), // set colemak layout - [7] = ACTION_DEFAULT_LAYER_SET(2), // set dvorak layout - [8] = ACTION_DEFAULT_LAYER_SET(3), // set workman layout -}; diff --git a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c index d66cc93c3a..a4ab412ee2 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c @@ -1,5 +1,9 @@ #include QMK_KEYBOARD_H +#define KC_TG5 TG(5) +#define KC_TG6 TG(6) +#define KC_CSES C(S(KC_ESC)) + // Poker fix with toggle and bit operation // Fn + Esc = ` // Fn + {left, down, up, right} = {home, pgdown, pgup, end} @@ -38,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [4] = LAYOUT_kc( TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ - CAPS, FN2, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN4, END, TRNS, TRNS, \ + CAPS, TG6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), + TRNS, TRNS, TRNS, TG5, TRNS, TRNS, TRNS, TRNS), /* 5: Poker with Arrow ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ @@ -103,8 +107,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { /* Poker Layout */ [0] = ACTION_LAYER_BIT_XOR(1, 0b0101, ON_BOTH), // Poker Fn(with fix for Esc) - [1] = ACTION_LAYER_TOGGLE(5), // Poker Arrow toggle - [2] = ACTION_LAYER_TOGGLE(6), // Poker Esc toggle [3] = ACTION_LAYER_BIT_XOR(1, 0b1101, ON_BOTH), // Poker Fn(with fix for Arrow) - [4] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // FN3 Task(RControl,RShift+Esc) }; diff --git a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c index 3f63924679..64678cd56c 100644 --- a/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c @@ -1,5 +1,7 @@ #include QMK_KEYBOARD_H +#define KC_CSES C(S(KC_ESC)) + // Poker fix with set(state transition) // Fn + Esc = ` // Fn + {left, down, up, right} = {home, pgdown, pgup, end} @@ -96,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN6, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, FN5, FN4, TRNS, TRNS, TRNS), /* 5: Poker Fn'd arrow @@ -115,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN7, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ TRNS, TRNS, TRNS, FN4, FN5, HOME, PGDN, END), /* 6: Poker Fn'd Esc @@ -134,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN4, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, FN7, FN6, TRNS, TRNS, TRNS), /* 7: Poker Fn'd Arrow + Esc @@ -153,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_kc( GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ TRNS, FN5, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, CALC, TRNS, HOME, INS, TRNS, \ - TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, FN8, END, TRNS, TRNS, \ + TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, PSCR, SLCK, PAUS, TRNS, CSES, END, TRNS, TRNS, \ TRNS, TRNS, DEL, TRNS, WHOM, MUTE, VOLU, VOLD, TRNS, PGUP, PGDN, DEL, TRNS, PGUP, TRNS, \ TRNS, TRNS, TRNS, FN6, FN7, HOME, PGDN, END), }; @@ -173,6 +175,4 @@ const uint16_t PROGMEM fn_actions[] = { [5] = ACTION_LAYER_SET(1, ON_RELEASE), // FN5 move to arrow when release [6] = ACTION_LAYER_SET(2, ON_RELEASE), // FN6 move to Esc when release [7] = ACTION_LAYER_SET(3, ON_RELEASE), // FN7 move to arrow + Esc when release - - [8] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // FN8 Task(RControl,RShift+Esc) }; diff --git a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c index ee7ec6cd68..6ef273d1e3 100644 --- a/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c @@ -44,13 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, DEL, \ TRNS, TRNS, TRNS, ESC, TRNS, TRNS, TRNS, HOME, UP, END, PSCR, SLCK, PAUS, INS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PGUP, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, TRNS, TRNS, SPC, PGDN, GRV, FN1, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ + TRNS, TRNS, TRNS, TRNS, TRNS, SPC, PGDN, GRV, TILD, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde -}; diff --git a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c index d5b4937aa5..8e1496bc9c 100644 --- a/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c @@ -112,9 +112,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = LAYOUT_65_ansi( KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ - _______, F(3), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ + _______, TG(_AL), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, \ - _______, F(5), _______, F(1), F(2), _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ + _______, TG(_UL), _______, TG(_CM), TG(_DV), _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY), /* 5: Locking layer for controlling the underglow @@ -138,11 +138,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(_CM), //Toggle Colemak Layer overlay - [2] = ACTION_LAYER_TOGGLE(_DV), // Toggle Dvorak Layer overlay - [3] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [5] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay - -}; diff --git a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c index 093070cb4b..8589a797fe 100644 --- a/keyboards/sentraq/s65_x/keymaps/nall/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c @@ -66,9 +66,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FL] = LAYOUT_65_ansi( KC_GRAVE, 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_TRNS, KC_TRNS, \ - KC_TRNS, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ + KC_TRNS, TG(_AL), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ + KC_TRNS, TG(_UL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), /* 3: Locking layer for controlling the underglow @@ -92,9 +92,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay -}; - diff --git a/keyboards/spaceman/2_milk/2_milk.c b/keyboards/spaceman/2_milk/2_milk.c new file mode 100644 index 0000000000..96071c2ad5 --- /dev/null +++ b/keyboards/spaceman/2_milk/2_milk.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#include "2_milk.h" diff --git a/keyboards/spaceman/2_milk/2_milk.h b/keyboards/spaceman/2_milk/2_milk.h new file mode 100644 index 0000000000..7d90d2064f --- /dev/null +++ b/keyboards/spaceman/2_milk/2_milk.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, \ + K01 \ +) { \ + { K00 }, \ + { K01 } \ +} diff --git a/keyboards/spaceman/2_milk/config.h b/keyboards/spaceman/2_milk/config.h new file mode 100644 index 0000000000..49211535d0 --- /dev/null +++ b/keyboards/spaceman/2_milk/config.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Spaceman +#define PRODUCT 2% Milk +#define DESCRIPTION A milk themed 2% Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 1 + +/* Milk default pinout */ +#define DIRECT_PINS { \ + {D4}, \ + {C6} \ +} +#define UNUSED_PINS + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN B6 +#define RGBLED_NUM 1 +#endif diff --git a/keyboards/spaceman/2_milk/info.json b/keyboards/spaceman/2_milk/info.json new file mode 100644 index 0000000000..6c2bd78b28 --- /dev/null +++ b/keyboards/spaceman/2_milk/info.json @@ -0,0 +1,14 @@ +{ + "keyboard_name": "2% Milk", + "keyboard_folder": "2_milk", + "url": "", + "maintainer": "Spaceman", + "width": 1, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 2, + "layout": [ {"x": 0, "y": 0 }, {"x": 0, "y": 1 }] + } + } +} diff --git a/keyboards/spaceman/2_milk/keymaps/binary/keymap.c b/keyboards/spaceman/2_milk/keymaps/binary/keymap.c new file mode 100644 index 0000000000..c8df8e9ff0 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/binary/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_P0, + KC_P1 + ) +}; diff --git a/keyboards/spaceman/2_milk/keymaps/binary/readme.md b/keyboards/spaceman/2_milk/keymaps/binary/readme.md new file mode 100644 index 0000000000..5ebcbd3e58 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/binary/readme.md @@ -0,0 +1,2 @@ +# Binary keymap +0 and 1 that's it diff --git a/keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c b/keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c new file mode 100644 index 0000000000..c82a6ff216 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/copypasta/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + RCTL(KC_C), + RCTL(KC_V) + ) +}; diff --git a/keyboards/spaceman/2_milk/keymaps/copypasta/readme.md b/keyboards/spaceman/2_milk/keymaps/copypasta/readme.md new file mode 100644 index 0000000000..6c2f4e8fbf --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/copypasta/readme.md @@ -0,0 +1,2 @@ +# Copy/Paste Keymap +![Picture](https://i.imgur.com/7LMZZrL.png) diff --git a/keyboards/spaceman/2_milk/keymaps/default/keymap.c b/keyboards/spaceman/2_milk/keymaps/default/keymap.c new file mode 100644 index 0000000000..1f327eee9a --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/default/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_Z, + KC_X + ) +}; diff --git a/keyboards/spaceman/2_milk/keymaps/default/readme.md b/keyboards/spaceman/2_milk/keymaps/default/readme.md new file mode 100644 index 0000000000..4482bce34a --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# Default keymap for 2% Milk +![Picture](https://i.imgur.com/9PsZ6wa.png) diff --git a/keyboards/spaceman/2_milk/keymaps/emoji/config.h b/keyboards/spaceman/2_milk/keymaps/emoji/config.h new file mode 100644 index 0000000000..90e4d63102 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/emoji/config.h @@ -0,0 +1,2 @@ +#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC +#define TAPPING_TERM 300 \ No newline at end of file diff --git a/keyboards/spaceman/2_milk/keymaps/emoji/keymap.c b/keyboards/spaceman/2_milk/keymaps/emoji/keymap.c new file mode 100644 index 0000000000..024a6a054b --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/emoji/keymap.c @@ -0,0 +1,53 @@ +#include QMK_KEYBOARD_H + +enum tapdance_keycodes { + TD_KEY_1, + TD_KEY_2, +}; + +void dance_key_one (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); // ¯\_(ツ)_/¯ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 2) { + cycle_unicode_input_mode(+1); + reset_tap_dance (state); + } +} + +void dance_key_two (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + send_unicode_hex_string("0CA0 005F 0CA0"); // ಠ_ಠ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 2) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); // (ノಠ痊ಠ)ノ彡┻━┻ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 3) { + send_unicode_hex_string("256D 2229 256E 0028 002D 005F 002D 0029 256D 2229 256E"); // ╭∩╮(-_-)╭∩╮ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 4) { + send_unicode_hex_string("0028 3065 FFE3 0020 00B3 FFE3 0029 3065"); // (づ ̄ ³ ̄)づ + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } else if (state->count == 5) { + send_unicode_hex_string("0028 FE3A FE39 FE3A 0029"); // (︺︹︺) + SEND_STRING(SS_TAP(X_ENTER)); + reset_tap_dance (state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_KEY_1] = ACTION_TAP_DANCE_FN(dance_key_one), + [TD_KEY_2] = ACTION_TAP_DANCE_FN(dance_key_two), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + TD(TD_KEY_1), + TD(TD_KEY_2) + ), +}; diff --git a/keyboards/spaceman/2_milk/keymaps/emoji/readme.md b/keyboards/spaceman/2_milk/keymaps/emoji/readme.md new file mode 100644 index 0000000000..1d5a08730d --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/emoji/readme.md @@ -0,0 +1,39 @@ +# Emoji Keymap +![Picture](https://i.imgur.com/1zEZ9Lq.png) + +# Unicode Setup + +Unicode input in QMK works by inputting a sequence of characters to the +OS, sort of like a macro. Unfortunately, the way this is done differs +for each platform. Specifically, each platform requires a different +combination of keys to trigger Unicode input. Therefore, a +corresponding input mode has to be set in QMK. + +Documentation: [Feature Unicode](https://beta.docs.qmk.fm/features/feature_unicode#input-modes) + +On this keymap the default unicode mode it's `UC_LNX`. +You can change it permanently tapping 2 times the KeyOne to select the next mode. + +## Unicode Mode List +- UC_LNX +- UC_OSX +- UC_WIN +- UC_WINC + +# Keymap +To add more functionality to this Minimal Keyboard, +it's implemented the tap dance feature, so pressing the same key +multiples times will produce different emojis. + +## Key One + +- 1 Tap: `¯\_(ツ)_/¯` +- 2 Taps: Switch Unicode Input Type + +## Key Two + +- 1 Tap: `ಠ_ಠ` +- 2 Taps: `(ノಠ痊ಠ)ノ彡┻━┻` +- 3 Taps: `╭∩╮(-_-)╭∩╮` +- 4 Taps: `(づ ̄ ³ ̄)づ` +- 5 Taps: `(︺︹︺)` \ No newline at end of file diff --git a/keyboards/spaceman/2_milk/keymaps/emoji/rules.mk b/keyboards/spaceman/2_milk/keymaps/emoji/rules.mk new file mode 100644 index 0000000000..7a64eb9023 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/emoji/rules.mk @@ -0,0 +1,2 @@ +UNICODE_ENABLE = yes # Unicode +TAP_DANCE_ENABLE = yes # Tap Dance \ No newline at end of file diff --git a/keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c b/keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c new file mode 100644 index 0000000000..a01b47f271 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/excessbread/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_LGUI, + KC_F11 + ) +}; diff --git a/keyboards/spaceman/2_milk/keymaps/excessbread/readme.md b/keyboards/spaceman/2_milk/keymaps/excessbread/readme.md new file mode 100644 index 0000000000..a6535e62cf --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/excessbread/readme.md @@ -0,0 +1,2 @@ +# ExcessBread's keymap +requested by excessbread diff --git a/keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c b/keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c new file mode 100644 index 0000000000..20e2292f08 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/mikethetiger/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_VOLU, + KC_VOLD + ) +}; diff --git a/keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md b/keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md new file mode 100644 index 0000000000..677732b057 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/mikethetiger/readme.md @@ -0,0 +1 @@ +# mikethetiger's keymap for 2% Milk diff --git a/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk b/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk new file mode 100644 index 0000000000..b5f038ef23 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk @@ -0,0 +1,13 @@ +# Build Options +# comment out to disable the options. +# +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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/spaceman/2_milk/keymaps/mouse/keymap.c b/keyboards/spaceman/2_milk/keymaps/mouse/keymap.c new file mode 100644 index 0000000000..a8ba44fb46 --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/mouse/keymap.c @@ -0,0 +1,8 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_BTN1, + KC_BTN2 + ) +}; diff --git a/keyboards/spaceman/2_milk/keymaps/mouse/readme.md b/keyboards/spaceman/2_milk/keymaps/mouse/readme.md new file mode 100644 index 0000000000..8ecb99eddb --- /dev/null +++ b/keyboards/spaceman/2_milk/keymaps/mouse/readme.md @@ -0,0 +1,2 @@ +# left and right mouse buttons +requested by WanderingVagrant diff --git a/keyboards/spaceman/2_milk/readme.md b/keyboards/spaceman/2_milk/readme.md new file mode 100644 index 0000000000..6745aa65c8 --- /dev/null +++ b/keyboards/spaceman/2_milk/readme.md @@ -0,0 +1,19 @@ +# 2% Milk + +![2%Milk](https://i.imgur.com/Ud96uXn.png) + +A 2% Meme board themed around a milk carton + +Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) +Hardware Availability: [Open Source](https://github.com/Spaceman/Spaceboards/tree/master/Keyboards/2%25%20Milk) + +Make example for this keyboard (after setting up your build environment): + + make spaceman/2_milk:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +### Credits ++ Case design by Soft ++ PCB by PyroL ++ Name by jetpacktuxedo diff --git a/keyboards/spaceman/2_milk/rules.mk b/keyboards/spaceman/2_milk/rules.mk new file mode 100644 index 0000000000..4e6c5f7039 --- /dev/null +++ b/keyboards/spaceman/2_milk/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. diff --git a/keyboards/spaceman/pancake/config.h b/keyboards/spaceman/pancake/config.h new file mode 100644 index 0000000000..5a01a572e4 --- /dev/null +++ b/keyboards/spaceman/pancake/config.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Spaceman +#define PRODUCT Pancake +#define DESCRIPTION Choc Ortho Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define DIODE_DIRECTION COL2ROW \ No newline at end of file diff --git a/keyboards/spaceman/pancake/feather/config.h b/keyboards/spaceman/pancake/feather/config.h new file mode 100644 index 0000000000..eac91a5ada --- /dev/null +++ b/keyboards/spaceman/pancake/feather/config.h @@ -0,0 +1,26 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* Pancake default pinout */ +#define MATRIX_ROW_PINS { B5, D7, C6, D0 } +#define MATRIX_COL_PINS { C7, D6, B7, B6, F0, D2, D3, F1, F4, F5, F6, F7 } +#define UNUSED_PINS + +#define AdafruitBleResetPin D4 +#define AdafruitBleCSPin B4 +#define AdafruitBleIRQPin E6 \ No newline at end of file diff --git a/keyboards/spaceman/pancake/feather/rules.mk b/keyboards/spaceman/pancake/feather/rules.mk new file mode 100644 index 0000000000..c54fbf06e0 --- /dev/null +++ b/keyboards/spaceman/pancake/feather/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency +F_CPU = 8000000 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BLUETOOTH = AdafruitBLE +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + +LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/spaceman/pancake/info.json b/keyboards/spaceman/pancake/info.json new file mode 100644 index 0000000000..9a21f09e18 --- /dev/null +++ b/keyboards/spaceman/pancake/info.json @@ -0,0 +1,113 @@ +{ + "keyboard_name": "Pancake", + "keyboard_folder": "Pancake", + "url": "", + "maintainer": "Spaceman", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_mit": { + "key_count": 47, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 2, "x": 5, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + }, + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + } + } +} diff --git a/keyboards/spaceman/pancake/keymaps/default/keymap.c b/keyboards/spaceman/pancake/keymaps/default/keymap.c new file mode 100644 index 0000000000..cebc6fccba --- /dev/null +++ b/keyboards/spaceman/pancake/keymaps/default/keymap.c @@ -0,0 +1,90 @@ +#include QMK_KEYBOARD_H +enum layers { + _DEFAULT, + _LOWER, + _RAISE, + _FN +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FN MO(_FN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Default + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | " | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | FN | Lower| Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DEFAULT] = LAYOUT_ortho_4x12( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_SCLN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , + KC_LCTL, KC_LALT, KC_LGUI, FN, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | _ | + | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | { | } | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | ? | | Vol- | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + 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_UNDS, KC_PLUS, _______, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_QUES, _______, KC_VOLD, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | - | = | | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | [ | ] | Vol- | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Vol+ | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + 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_MINS, KC_EQL, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______ +), + + /* FN + * ,-----------------------------------------------------------------------------------. + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | F11 | F12 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | TRNS | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_ortho_4x12( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + + +}; + diff --git a/keyboards/spaceman/pancake/keymaps/default/readme.md b/keyboards/spaceman/pancake/keymaps/default/readme.md new file mode 100644 index 0000000000..7eb8cc6d8d --- /dev/null +++ b/keyboards/spaceman/pancake/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default keymap for Pancake + +designed by: Spaceman diff --git a/keyboards/spaceman/pancake/pancake.c b/keyboards/spaceman/pancake/pancake.c new file mode 100644 index 0000000000..d77dbfbe01 --- /dev/null +++ b/keyboards/spaceman/pancake/pancake.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#include "pancake.h" diff --git a/keyboards/spaceman/pancake/pancake.h b/keyboards/spaceman/pancake/pancake.h new file mode 100644 index 0000000000..312d789b42 --- /dev/null +++ b/keyboards/spaceman/pancake/pancake.h @@ -0,0 +1,44 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_planck_mit( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, \ + k300, k301, k302, k303, k304, k305, k307, k308, k309, k310, k311 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211 }, \ + { k300, k301, k302, k303, k304, k305, k305, k307, k308, k309, k310, k311 } \ +} + +#define LAYOUT_ortho_4x12( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, \ + k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311 \ +) \ +{ \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211 }, \ + { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311 } \ +} diff --git a/keyboards/spaceman/pancake/promicro/config.h b/keyboards/spaceman/pancake/promicro/config.h new file mode 100644 index 0000000000..ee02bff2b8 --- /dev/null +++ b/keyboards/spaceman/pancake/promicro/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Spaceman + * + * 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 . + */ +#pragma once +#include "config_common.h" + +/* Pancake default pinout */ +#define MATRIX_ROW_PINS { B1, B3, B2, B6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, E6, B4, B5, D7, C6, D4, D0, D1 } +#define UNUSED_PINS \ No newline at end of file diff --git a/keyboards/spaceman/pancake/promicro/rules.mk b/keyboards/spaceman/pancake/promicro/rules.mk new file mode 100644 index 0000000000..6ed9e88e99 --- /dev/null +++ b/keyboards/spaceman/pancake/promicro/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + +LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/spaceman/pancake/readme.md b/keyboards/spaceman/pancake/readme.md new file mode 100644 index 0000000000..34cf6382bc --- /dev/null +++ b/keyboards/spaceman/pancake/readme.md @@ -0,0 +1,12 @@ +# Pancake + +Ortho 40% Ortho Keyboard with an option for the adafruit feather + +Keyboard Maintainer: [Spaceman](https://github.com/Spaceman) +Hardware Availability: [GB](https://geekhack.org/index.php?topic=101371.0) + +Make example for this keyboard (after setting up your build environment): + + make spaceman/pancake:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk index abff350ea0..0d77351f32 100644 --- a/keyboards/subatomic/rules.mk +++ b/keyboards/subatomic/rules.mk @@ -23,7 +23,7 @@ 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 = yes # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/tartan/config.h b/keyboards/tartan/config.h deleted file mode 100644 index ee4393e53a..0000000000 --- a/keyboards/tartan/config.h +++ /dev/null @@ -1,246 +0,0 @@ -/* -Copyright 2019 Takuya Urakawa (dm9records.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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ -#define VENDOR_ID 0x16c0 -#define PRODUCT_ID 0x27db -#define DEVICE_VER 0x0001 -#define MANUFACTURER dm9records -#define PRODUCT Tartan -#define DESCRIPTION 60% keyboard with through hole components - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 13 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B4, B5, B3, B0, C0 } -#define MATRIX_COL_PINS { D7, D6, D5, D4, B1, B2, C1, C2, C3, C5, D1, D0, C4 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - -// #define RGB_DI_PIN E2 -// #ifdef RGB_DI_PIN -// #define RGBLED_NUM 16 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// #endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* 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 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * 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 */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_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_HELP H -//#define MAGIC_KEY_HELP_ALT 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 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#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 B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#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 - -/* - * 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 1 - -/* - * HD44780 LCD Display Configuration - */ -/* -#define LCD_LINES 2 //< number of visible lines of the display -#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - -#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - -#if LCD_IO_MODE -#define LCD_PORT PORTB //< port for the LCD lines -#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 -#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 -#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 -#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 -#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 -#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 -#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 -#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 -#define LCD_RS_PORT LCD_PORT //< port for RS line -#define LCD_RS_PIN 3 //< pin for RS line -#define LCD_RW_PORT LCD_PORT //< port for RW line -#define LCD_RW_PIN 2 //< pin for RW line -#define LCD_E_PORT LCD_PORT //< port for Enable line -#define LCD_E_PIN 1 //< pin for Enable line -#endif -*/ - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tartan/info.json b/keyboards/tartan/info.json deleted file mode 100644 index 72da8bd9d4..0000000000 --- a/keyboards/tartan/info.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "keyboard_name": "Tartan # Through Hole", - "keyboard_folder": "tartan", - "url": "https://github.com/hsgw/tartan", - "maintainer": "hsgw(Takuya Urakawa)", - "width": 13, - "height": 5, - "layouts": { - "LAYOUT_60_ansi": { - "key_count": 61, - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_ansi_split_bs": { - "key_count": 62, - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":1}, {"label":"", "x":14, "y":0, "w":1}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_ansi_split_bs_rshift": { - "key_count": 63, - "layout": [{"label":"ESC", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"BS", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_iso": { - "key_count": 62, - "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_iso_split_bs": { - "key_count": 63, - "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"£", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_iso_split_bs_rshift": { - "key_count": 64, - "layout": [{"label":"¬", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - } - } -} diff --git a/keyboards/tartan/keymaps/default/keymap.c b/keyboards/tartan/keymaps/default/keymap.c deleted file mode 100644 index 6224b4e615..0000000000 --- a/keyboards/tartan/keymaps/default/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60_ansi( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL - ), - [1] = LAYOUT_60_ansi( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; diff --git a/keyboards/tartan/keymaps/default/readme.md b/keyboards/tartan/keymaps/default/readme.md deleted file mode 100644 index c829d53103..0000000000 --- a/keyboards/tartan/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for Tartan diff --git a/keyboards/tartan/readme.md b/keyboards/tartan/readme.md deleted file mode 100644 index 83a3aebaea..0000000000 --- a/keyboards/tartan/readme.md +++ /dev/null @@ -1,25 +0,0 @@ -# Tartan # Through Hole - -![tartan](https://i.imgur.com/1qSrVcs.jpg) - -A 60% keyboard with only through hole components. - -* Keyboard Maintainer: [hsgw](https://github.com/hsgw) -* Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/tartan) -* Hardware Availability: https://5z6p.com/products/tartan/ - -Make example for this keyboard (after setting up your build environment): - - make tartan:default - -Flash firmware: - - // In bootloader mode - make tartan:default:flash - -## Bootloader -use usbasploader in my repository. -https://github.com/hsgw/USBaspLoader/tree/plaid - - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tartan/rules.mk b/keyboards/tartan/rules.mk deleted file mode 100644 index 8113001918..0000000000 --- a/keyboards/tartan/rules.mk +++ /dev/null @@ -1,36 +0,0 @@ -# MCU name -MCU = atmega328p - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = USBasp - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs - -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift -LAYOUTS_HAS_RGB = no diff --git a/keyboards/tartan/tartan.c b/keyboards/tartan/tartan.c deleted file mode 100644 index b702633cc9..0000000000 --- a/keyboards/tartan/tartan.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ -#include "tartan.h" diff --git a/keyboards/tartan/tartan.h b/keyboards/tartan/tartan.h deleted file mode 100644 index e990088894..0000000000 --- a/keyboards/tartan/tartan.h +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright 2019 Takuya Urakawa (dm9records.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 . - */ - -#pragma once - -#include "quantum.h" - -#define LAYOUT_60_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, KC_NO, k4b, KC_NO } \ -} - -#define LAYOUT_60_ansi_split_bs( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, KC_NO } \ -} - -#define LAYOUT_60_ansi_split_bs_rshift( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k4b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k4c, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, k4c } \ -} - -#define LAYOUT_60_iso( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, KC_NO, k4b, KC_NO } \ -} - -#define LAYOUT_60_iso_split_bs( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, KC_NO } \ -} - -#define LAYOUT_60_iso_split_bs_rshift( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k49, k4a, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k4b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k4c, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, KC_NO, k49, k4a, k4b, k4c } \ -} - -#define LAYOUT_all LAYOUT_60_iso_split_bs_rshift diff --git a/keyboards/the_royal/liminal/keymaps/default/keymap.c b/keyboards/the_royal/liminal/keymaps/default/keymap.c index d9d9497453..dd98661011 100644 --- a/keyboards/the_royal/liminal/keymaps/default/keymap.c +++ b/keyboards/the_royal/liminal/keymaps/default/keymap.c @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LT(_LOWER, KC_SPACE): return 160; @@ -136,7 +136,7 @@ uint16_t get_tapping_term(uint16_t keycode) { default: #ifndef TAPPING_TERM return 200; -#else +#else return TAPPING_TERM; #endif } diff --git a/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c b/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c index 3d8debee3d..62ff2b6a5d 100644 --- a/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c +++ b/keyboards/the_royal/liminal/keymaps/default_iso/keymap.c @@ -128,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LT(_LOWER, KC_SPACE): return 160; diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c index 3d282e182b..509b497802 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c @@ -114,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #define TAPPING_LAYER_TERM 150 // Custom LT Tapping term -uint16_t get_tapping_term(uint16_t keycode) { +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_BSLO: return TAPPING_LAYER_TERM; diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c index 6e22e9e23a..a9d3a802dc 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c @@ -99,7 +99,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_plover, false, 0); + PLAY_SONG(tone_plover); #endif layer_off(_NUMSYM); layer_off(_FKEYS); @@ -110,7 +110,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 7: // LAYERRESET if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_SONG(tone_qwerty); #endif layer_off(_NUMSYM); layer_off(_FKEYS); @@ -132,7 +132,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if(record->event.pressed) { #ifdef AUDIO_ENABLE stop_all_notes(); - PLAY_NOTE_ARRAY(tone_adjust, false, 0); + PLAY_SONG(tone_adjust); #endif layer_off(_NUMSYM); layer_off(_FKEYS); @@ -166,12 +166,12 @@ void matrix_init_user(void) { void startup_user() { _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); + PLAY_SONG(tone_startup); } void shutdown_user() { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + PLAY_SONG(tone_goodbye); _delay_ms(150); stop_all_notes(); } @@ -183,6 +183,6 @@ void music_on_user(void) void music_scale_user(void) { - PLAY_NOTE_ARRAY(music_scale, false, 0); + PLAY_SONG(music_scale); } #endif diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c index 18454d5649..db5f6c37c8 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c @@ -145,7 +145,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NUMPAD_LOCK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_numpad, false, 0); + PLAY_SONG(tone_numpad); #endif persistant_default_layer_set(1UL<<_NUMPAD); } @@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NAVIGATION_LOCK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_navigation, false, 0); + PLAY_SONG(tone_navigation); #endif persistant_default_layer_set(1UL<<_NAVIGATION); } @@ -163,7 +163,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case EXCEL_LOCK: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_excel, false, 0); + PLAY_SONG(tone_excel); #endif persistant_default_layer_set(1UL<<_EXCEL); } diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h index 5ba40bb35c..9c35699c92 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h @@ -67,6 +67,11 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define QMK_ESC_OUTPUT A0 // usually COL +#define QMK_ESC_INPUT F4 // usually ROW +#define QMK_LED D2 // NumLock on TKC1800 +//#define QMK_SPEAKER C6 + /* * Force NKRO * diff --git a/keyboards/tkc1800/i2c.c b/keyboards/tkc1800/i2c.c deleted file mode 100644 index cd2b835d50..0000000000 --- a/keyboards/tkc1800/i2c.c +++ /dev/null @@ -1,166 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 800000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/tkc1800/keymaps/default/config.h b/keyboards/tkc1800/keymaps/default/config.h deleted file mode 100644 index ee142927f3..0000000000 --- a/keyboards/tkc1800/keymaps/default/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2017 Mathias Andersson - * - * 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 . - */ - -#pragma once - -#define USE_I2C -#define SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc1800/keymaps/default/keymap.c index 5455934a30..4f4c7f8e9c 100644 --- a/keyboards/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc1800/keymaps/default/keymap.c @@ -13,11 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,13 +23,6 @@ enum { FUNCTION, }; -bool screenWorks = 0; - -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -88,72 +78,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if ( iota_gfx_init() ) { // turns on the display - screenWorks = 1; - } - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - if ( screenWorks ) { - iota_gfx_task(); // this is what updates the display continuously - }; - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1< - * - * 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 . - */ - -#pragma once - -#define USE_I2C -#define SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc1800/keymaps/smt/keymap.c index 9f506b443b..9b6ad80d3a 100644 --- a/keyboards/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc1800/keymaps/smt/keymap.c @@ -13,10 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl @@ -32,11 +30,6 @@ enum { FUNCTION, }; -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Qwerty","Dvorak","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap QWERTY: (Qwerty Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -151,64 +144,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Base\n"), false); + break; + case COLEMAK: + oled_write_P(PSTR("Colemak\n"), false); + break; + case DVORAK: + oled_write_P(PSTR("Dvorak\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1<. */ #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,13 +22,6 @@ enum { FUNCTION, }; -bool screenWorks = 0; - -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -88,72 +77,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if ( iota_gfx_init() ) { // turns on the display - screenWorks = 1; - } - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - if ( screenWorks ) { - iota_gfx_task(); // this is what updates the display continuously - }; - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1< - * - * 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 . - */ - -#pragma once - -#define USE_I2C -#define SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc1800/keymaps/wkl/keymap.c index 6f331c61cc..3c65b61d11 100644 --- a/keyboards/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc1800/keymaps/wkl/keymap.c @@ -13,11 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,13 +23,6 @@ enum { FUNCTION, }; -bool screenWorks = 0; - -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -71,72 +61,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - if ( iota_gfx_init() ) { // turns on the display - screenWorks = 1; - } - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - if ( screenWorks ) { - iota_gfx_task(); // this is what updates the display continuously - }; - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1< - * - * 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 . - */ - -#pragma once - -//#define USE_I2C -//#define SSD1306OLED -//#define OLED_ROTATE180 -#define SSD1306_ADDRESS 0x3C - -// place overrides here diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc1800/keymaps/yanfali/keymap.c index 8dad3446de..bbffc2d20b 100644 --- a/keyboards/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc1800/keymaps/yanfali/keymap.c @@ -13,11 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include QMK_KEYBOARD_H -#include "LUFA/Drivers/Peripheral/TWI.h" -#include "i2c.h" -#include "ssd1306.h" - //Layers @@ -26,11 +23,6 @@ enum { FUNCTION, }; -//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() -static char layer_lookup[][14] = {"Base","Function"}; - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap BASE: (Base Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. @@ -69,68 +61,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - -} - -void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -void iota_gfx_task_user(void) { - #if DEBUG_TO_SCREEN - if (debug_enable) { - return; +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + oled_write_P(PSTR("TKC1800\n"),false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case BASE: + oled_write_P(PSTR("Base\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("Function\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); } - #endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("TKC1800")); - - uint8_t layer = biton32(layer_state); - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%d", layer); - matrix_write_P(&matrix, PSTR("\nLayer: ")); - matrix_write(&matrix, layer_lookup[layer]); - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n\n%s %s %s", - (host_keyboard_leds() & (1<", "x":12.75, "y":3}, + {"label":"?", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":1.5}, + {"label":"|", "x":16.25, "y":3}, + {"label":"1", "x":17.25, "y":3}, + {"label":"2", "x":18.25, "y":3}, + {"label":"3", "x":19.25, "y":3}, + {"label":"+", "x":20.25, "y":3, "h":2}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.75}, + {"label":"~", "x":4.25, "y":4}, + {"label":"Space", "x":5.25, "y":4, "w":9}, + {"label":"Caps Lock", "x":14.25, "y":4, "w":2}, + {"label":"0", "x":16.25, "y":4, "w":2}, + {"label":".", "x":18.25, "y":4, "w":2} + ] + }, + "LAYOUT_z150_tkl": { + "key_count": 88, + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"Esc", "x":2.5, "y":0}, + {"label":"1", "x":3.5, "y":0}, + {"label":"2", "x":4.5, "y":0}, + {"label":"3", "x":5.5, "y":0}, + {"label":"4", "x":6.5, "y":0}, + {"label":"5", "x":7.5, "y":0}, + {"label":"6", "x":8.5, "y":0}, + {"label":"7", "x":9.5, "y":0}, + {"label":"8", "x":10.5, "y":0}, + {"label":"9", "x":11.5, "y":0}, + {"label":"0", "x":12.5, "y":0}, + {"label":"-", "x":13.5, "y":0}, + {"label":"=", "x":14.5, "y":0}, + {"label":"Backspace", "x":15.5, "y":0, "w":2}, + {"label":"Insert", "x":18.25, "y":0}, + {"label":"Home", "x":19.25, "y":0}, + {"label":"PgUp", "x":20.25, "y":0}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"Tab", "x":2.5, "y":1, "w":1.5}, + {"label":"Q", "x":4, "y":1}, + {"label":"W", "x":5, "y":1}, + {"label":"E", "x":6, "y":1}, + {"label":"R", "x":7, "y":1}, + {"label":"T", "x":8, "y":1}, + {"label":"Y", "x":9, "y":1}, + {"label":"U", "x":10, "y":1}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1}, + {"label":"P", "x":13, "y":1}, + {"label":"[", "x":14, "y":1}, + {"label":"]", "x":15, "y":1}, + {"label":"\\", "x":16, "y":1, "w":1.5}, + {"label":"Delete", "x":18.25, "y":1}, + {"label":"End", "x":19.25, "y":1}, + {"label":"PgDn", "x":20.25, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"Caps Lock", "x":2.5, "y":2, "w":1.75}, + {"label":"A", "x":4.25, "y":2}, + {"label":"S", "x":5.25, "y":2}, + {"label":"D", "x":6.25, "y":2}, + {"label":"F", "x":7.25, "y":2}, + {"label":"G", "x":8.25, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":";", "x":13.25, "y":2}, + {"label":"'", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":2.25}, + {"x":18.25, "y":2}, + {"x":19.25, "y":2}, + {"x":20.25, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"Shift", "x":2.5, "y":3, "w":1.25}, + {"label":"ISO \\", "x":3.75, "y":3}, + {"label":"Z", "x":4.75, "y":3}, + {"label":"X", "x":5.75, "y":3}, + {"label":"C", "x":6.75, "y":3}, + {"label":"V", "x":7.75, "y":3}, + {"label":"B", "x":8.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",", "x":11.75, "y":3}, + {"label":".", "x":12.75, "y":3}, + {"label":"/", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":1.75}, + {"label":"Fn", "x":16.5, "y":3}, + {"x":18.25, "y":3}, + {"label":"Up", "x":19.25, "y":3}, + {"x":20.25, "y":3}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, + {"label":"Win", "x":3.75, "y":4, "w":1.25}, + {"label":"Alt", "x":5, "y":4, "w":1.25}, + {"label":"Space", "x":6.25, "y":4, "w":6.25}, + {"label":"Alt", "x":12.5, "y":4, "w":1.25}, + {"label":"Win", "x":13.75, "y":4, "w":1.25}, + {"label":"Menu", "x":15, "y":4, "w":1.25}, + {"label":"Ctrl", "x":16.25, "y":4, "w":1.25}, + {"label":"Left", "x":18.25, "y":4}, + {"label":"Down", "x":19.25, "y":4}, + {"label":"Right", "x":20.25, "y":4} + ] + } + } +} diff --git a/keyboards/z150_bh/keymaps/default/keymap.c b/keyboards/z150_bh/keymaps/default/keymap.c new file mode 100644 index 0000000000..ff4f6f7f9d --- /dev/null +++ b/keyboards/z150_bh/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2018 blindassassin111 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_SLCK, MO(1), + KC_F3, KC_F4, 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_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, + KC_F5, KC_F6, 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_P4, KC_P5, KC_P6, KC_PMNS, + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT + ), + + [1] = LAYOUT( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} \ No newline at end of file diff --git a/keyboards/z150_bh/keymaps/default_tkl/keymap.c b/keyboards/z150_bh/keymaps/default_tkl/keymap.c new file mode 100644 index 0000000000..f1a24b8dda --- /dev/null +++ b/keyboards/z150_bh/keymaps/default_tkl/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2018 blindassassin111 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_z150_tkl( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_z150_tkl( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} \ No newline at end of file diff --git a/keyboards/z150_bh/readme.md b/keyboards/z150_bh/readme.md new file mode 100644 index 0000000000..a1d4845808 --- /dev/null +++ b/keyboards/z150_bh/readme.md @@ -0,0 +1,14 @@ +Z-150 BH PCB +=== + +A replacement PCB for Zenith Z-150 keyboards. + +Keyboard Maintainer: QMK Community and blindassassin111 +Hardware Supported: Z-150 BH PCB +Hardware Availability: [Deskthority Group Buy](https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html) + +Make example for this keyboard (after setting up your build environment): + + make z150_bh:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/z150_bh/rules.mk b/keyboards/z150_bh/rules.mk new file mode 100644 index 0000000000..739bea3932 --- /dev/null +++ b/keyboards/z150_bh/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = halfkay + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/z150_bh/z150_bh.c b/keyboards/z150_bh/z150_bh.c new file mode 100644 index 0000000000..6db784b56e --- /dev/null +++ b/keyboards/z150_bh/z150_bh.c @@ -0,0 +1,32 @@ +#include "z150_bh.h" + +void matrix_init_kb(void) { + setPinOutput(B0); + setPinOutput(E6); + setPinOutput(E7); + + matrix_init_user(); +}; + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(E7); + } else { + writePinLow(E7); + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B0); + } else { + writePinLow(B0); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(E6); + } else { + writePinLow(E6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/z150_bh/z150_bh.h b/keyboards/z150_bh/z150_bh.h new file mode 100644 index 0000000000..f97ac1c035 --- /dev/null +++ b/keyboards/z150_bh/z150_bh.h @@ -0,0 +1,31 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, \ + K40, K41, K42, K43, K47, K4E, K4F, K4H \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, KC_NO, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, KC_NO }, \ + { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K4E, K4F, KC_NO, K4H, KC_NO, KC_NO } \ +} + +#define LAYOUT_z150_tkl( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0H, K0I, K0J, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1H, K1I, K1J, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2G, K2H, K2I, \ + K30, K31, K32, K45, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3G, K3H, K3I, \ + K40, K41, K42, K43, K44, K47, K4C, K4D, K4E, K4F, K4G, K4H, K4I \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, KC_NO, K0H, K0I, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, KC_NO, K1H, K1I, K1J }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, KC_NO, K2G, K2H, K2I, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, K3G, K3H, K3I, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, K4C, K4D, K4E, K4F, K4G, K4H, K4I, KC_NO } \ +} diff --git a/keyboards/z150_blackheart/config.h b/keyboards/z150_blackheart/config.h deleted file mode 100644 index fc33021ffc..0000000000 --- a/keyboards/z150_blackheart/config.h +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER blindassassin111 -#define PRODUCT Z-150 PCB -#define DESCRIPTION Replacement for Zenith Z-150 PCB - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 20 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { C3, C2, C1, C0, E1 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D7, E0, C7, C6, C5, C4, F0, F1, F2, F3, F4, F5, F6, F7 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* force n-key rollover*/ -#define FORCE_NKRO - -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 0 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif diff --git a/keyboards/z150_blackheart/info.json b/keyboards/z150_blackheart/info.json deleted file mode 100644 index 016641254c..0000000000 --- a/keyboards/z150_blackheart/info.json +++ /dev/null @@ -1,191 +0,0 @@ -{ - "keyboard_name": "Z-150 Blackheart", - "url": "", - "maintainer": "qmk, blindassassin111", - "width": 21.25, - "height": 5, - "layouts": { - "LAYOUT": { - "key_count": 84, - "layout": [ - {"label":"F1", "x":0, "y":0}, - {"label":"F2", "x":1, "y":0}, - {"label":"Esc", "x":2.5, "y":0}, - {"label":"!", "x":3.5, "y":0}, - {"label":"@", "x":4.5, "y":0}, - {"label":"#", "x":5.5, "y":0}, - {"label":"$", "x":6.5, "y":0}, - {"label":"%", "x":7.5, "y":0}, - {"label":"^", "x":8.5, "y":0}, - {"label":"&", "x":9.5, "y":0}, - {"label":"*", "x":10.5, "y":0}, - {"label":"(", "x":11.5, "y":0}, - {"label":")", "x":12.5, "y":0}, - {"label":"_", "x":13.5, "y":0}, - {"label":"+", "x":14.5, "y":0}, - {"label":"Backspace", "x":15.5, "y":0, "w":1.75}, - {"label":"Num Lock", "x":17.25, "y":0}, - {"label":"Scroll Lock", "x":18.25, "y":0, "w":1.5}, - {"label":"Sys Req", "x":19.75, "y":0, "w":1.5}, - {"label":"F3", "x":0, "y":1}, - {"label":"F4", "x":1, "y":1}, - {"label":"Tab", "x":2.5, "y":1, "w":1.5}, - {"label":"Q", "x":4, "y":1}, - {"label":"W", "x":5, "y":1}, - {"label":"E", "x":6, "y":1}, - {"label":"R", "x":7, "y":1}, - {"label":"T", "x":8, "y":1}, - {"label":"Y", "x":9, "y":1}, - {"label":"U", "x":10, "y":1}, - {"label":"I", "x":11, "y":1}, - {"label":"O", "x":12, "y":1}, - {"label":"P", "x":13, "y":1}, - {"label":"{", "x":14, "y":1}, - {"label":"}", "x":15, "y":1, "w":1.25}, - {"label":"Enter", "x":15.25, "y":2, "w":2}, - {"label":"7", "x":17.25, "y":1}, - {"label":"8", "x":18.25, "y":1}, - {"label":"9", "x":19.25, "y":1}, - {"label":"PrtSc", "x":20.25, "y":1}, - {"label":"F5", "x":0, "y":2}, - {"label":"F6", "x":1, "y":2}, - {"label":"Ctrl", "x":2.5, "y":2, "w":1.75}, - {"label":"A", "x":4.25, "y":2}, - {"label":"S", "x":5.25, "y":2}, - {"label":"D", "x":6.25, "y":2}, - {"label":"F", "x":7.25, "y":2}, - {"label":"G", "x":8.25, "y":2}, - {"label":"H", "x":9.25, "y":2}, - {"label":"J", "x":10.25, "y":2}, - {"label":"K", "x":11.25, "y":2}, - {"label":"L", "x":12.25, "y":2}, - {"label":":", "x":13.25, "y":2}, - {"label":"\"", "x":14.25, "y":2}, - {"label":"4", "x":17.25, "y":2}, - {"label":"5", "x":18.25, "y":2}, - {"label":"6", "x":19.25, "y":2}, - {"label":"-", "x":20.25, "y":2}, - {"label":"F7", "x":0, "y":3}, - {"label":"F8", "x":1, "y":3}, - {"label":"Shift", "x":2.5, "y":3, "w":2.25}, - {"label":"Z", "x":4.75, "y":3}, - {"label":"X", "x":5.75, "y":3}, - {"label":"C", "x":6.75, "y":3}, - {"label":"V", "x":7.75, "y":3}, - {"label":"B", "x":8.75, "y":3}, - {"label":"N", "x":9.75, "y":3}, - {"label":"M", "x":10.75, "y":3}, - {"label":"<", "x":11.75, "y":3}, - {"label":">", "x":12.75, "y":3}, - {"label":"?", "x":13.75, "y":3}, - {"label":"Shift", "x":14.75, "y":3, "w":1.5}, - {"label":"|", "x":16.25, "y":3}, - {"label":"1", "x":17.25, "y":3}, - {"label":"2", "x":18.25, "y":3}, - {"label":"3", "x":19.25, "y":3}, - {"label":"+", "x":20.25, "y":3, "h":2}, - {"label":"F9", "x":0, "y":4}, - {"label":"F10", "x":1, "y":4}, - {"label":"Alt", "x":2.5, "y":4, "w":1.75}, - {"label":"~", "x":4.25, "y":4}, - {"label":"Space", "x":5.25, "y":4, "w":9}, - {"label":"Caps Lock", "x":14.25, "y":4, "w":2}, - {"label":"0", "x":16.25, "y":4, "w":2}, - {"label":".", "x":18.25, "y":4, "w":2} - ] - }, - "LAYOUT_z150_tkl": { - "key_count": 88, - "layout": [ - {"label":"F1", "x":0, "y":0}, - {"label":"F2", "x":1, "y":0}, - {"label":"Esc", "x":2.5, "y":0}, - {"label":"1", "x":3.5, "y":0}, - {"label":"2", "x":4.5, "y":0}, - {"label":"3", "x":5.5, "y":0}, - {"label":"4", "x":6.5, "y":0}, - {"label":"5", "x":7.5, "y":0}, - {"label":"6", "x":8.5, "y":0}, - {"label":"7", "x":9.5, "y":0}, - {"label":"8", "x":10.5, "y":0}, - {"label":"9", "x":11.5, "y":0}, - {"label":"0", "x":12.5, "y":0}, - {"label":"-", "x":13.5, "y":0}, - {"label":"=", "x":14.5, "y":0}, - {"label":"Backspace", "x":15.5, "y":0, "w":2}, - {"label":"Insert", "x":18.25, "y":0}, - {"label":"Home", "x":19.25, "y":0}, - {"label":"PgUp", "x":20.25, "y":0}, - {"label":"F3", "x":0, "y":1}, - {"label":"F4", "x":1, "y":1}, - {"label":"Tab", "x":2.5, "y":1, "w":1.5}, - {"label":"Q", "x":4, "y":1}, - {"label":"W", "x":5, "y":1}, - {"label":"E", "x":6, "y":1}, - {"label":"R", "x":7, "y":1}, - {"label":"T", "x":8, "y":1}, - {"label":"Y", "x":9, "y":1}, - {"label":"U", "x":10, "y":1}, - {"label":"I", "x":11, "y":1}, - {"label":"O", "x":12, "y":1}, - {"label":"P", "x":13, "y":1}, - {"label":"[", "x":14, "y":1}, - {"label":"]", "x":15, "y":1}, - {"label":"\\", "x":16, "y":1, "w":1.5}, - {"label":"Delete", "x":18.25, "y":1}, - {"label":"End", "x":19.25, "y":1}, - {"label":"PgDn", "x":20.25, "y":1}, - {"label":"F5", "x":0, "y":2}, - {"label":"F6", "x":1, "y":2}, - {"label":"Caps Lock", "x":2.5, "y":2, "w":1.75}, - {"label":"A", "x":4.25, "y":2}, - {"label":"S", "x":5.25, "y":2}, - {"label":"D", "x":6.25, "y":2}, - {"label":"F", "x":7.25, "y":2}, - {"label":"G", "x":8.25, "y":2}, - {"label":"H", "x":9.25, "y":2}, - {"label":"J", "x":10.25, "y":2}, - {"label":"K", "x":11.25, "y":2}, - {"label":"L", "x":12.25, "y":2}, - {"label":";", "x":13.25, "y":2}, - {"label":"'", "x":14.25, "y":2}, - {"label":"Enter", "x":15.25, "y":2, "w":2.25}, - {"x":18.25, "y":2}, - {"x":19.25, "y":2}, - {"x":20.25, "y":2}, - {"label":"F7", "x":0, "y":3}, - {"label":"F8", "x":1, "y":3}, - {"label":"Shift", "x":2.5, "y":3, "w":1.25}, - {"label":"ISO \\", "x":3.75, "y":3}, - {"label":"Z", "x":4.75, "y":3}, - {"label":"X", "x":5.75, "y":3}, - {"label":"C", "x":6.75, "y":3}, - {"label":"V", "x":7.75, "y":3}, - {"label":"B", "x":8.75, "y":3}, - {"label":"N", "x":9.75, "y":3}, - {"label":"M", "x":10.75, "y":3}, - {"label":",", "x":11.75, "y":3}, - {"label":".", "x":12.75, "y":3}, - {"label":"/", "x":13.75, "y":3}, - {"label":"Shift", "x":14.75, "y":3, "w":1.75}, - {"label":"Fn", "x":16.5, "y":3}, - {"x":18.25, "y":3}, - {"label":"Up", "x":19.25, "y":3}, - {"x":20.25, "y":3}, - {"label":"F9", "x":0, "y":4}, - {"label":"F10", "x":1, "y":4}, - {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, - {"label":"Win", "x":3.75, "y":4, "w":1.25}, - {"label":"Alt", "x":5, "y":4, "w":1.25}, - {"label":"Space", "x":6.25, "y":4, "w":6.25}, - {"label":"Alt", "x":12.5, "y":4, "w":1.25}, - {"label":"Win", "x":13.75, "y":4, "w":1.25}, - {"label":"Menu", "x":15, "y":4, "w":1.25}, - {"label":"Ctrl", "x":16.25, "y":4, "w":1.25}, - {"label":"Left", "x":18.25, "y":4}, - {"label":"Down", "x":19.25, "y":4}, - {"label":"Right", "x":20.25, "y":4} - ] - } - } -} diff --git a/keyboards/z150_blackheart/keymaps/default/keymap.c b/keyboards/z150_blackheart/keymaps/default/keymap.c deleted file mode 100644 index ff4f6f7f9d..0000000000 --- a/keyboards/z150_blackheart/keymaps/default/keymap.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2018 blindassassin111 - * - * 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 . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT( - KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_SLCK, MO(1), - KC_F3, KC_F4, 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_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, - KC_F5, KC_F6, 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_P4, KC_P5, KC_P6, KC_PMNS, - KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, - KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT - ), - - [1] = LAYOUT( - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { -} \ No newline at end of file diff --git a/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c b/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c deleted file mode 100644 index f1a24b8dda..0000000000 --- a/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2018 blindassassin111 - * - * 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 . - */ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_z150_tkl( - KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, - KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = LAYOUT_z150_tkl( - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { -} \ No newline at end of file diff --git a/keyboards/z150_blackheart/readme.md b/keyboards/z150_blackheart/readme.md deleted file mode 100644 index 331f85694e..0000000000 --- a/keyboards/z150_blackheart/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -Z-150 Blackheart PCB -=== - -A replacement PCB for Zenith Z-150 keyboards. - -Keyboard Maintainer: QMK Community and blindassassin111 -Hardware Supported: Z-150 blackheart PCB -Hardware Availability: [Deskthority Group Buy](https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html) - -Make example for this keyboard (after setting up your build environment): - - make z150_blackheart:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/z150_blackheart/rules.mk b/keyboards/z150_blackheart/rules.mk deleted file mode 100644 index 739bea3932..0000000000 --- a/keyboards/z150_blackheart/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# MCU name -MCU = at90usb1286 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = halfkay - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no diff --git a/keyboards/z150_blackheart/z150_blackheart.c b/keyboards/z150_blackheart/z150_blackheart.c deleted file mode 100644 index b754c64a12..0000000000 --- a/keyboards/z150_blackheart/z150_blackheart.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "z150_blackheart.h" - -void matrix_init_kb(void) { - setPinOutput(B0); - setPinOutput(E6); - setPinOutput(E7); - - matrix_init_user(); -}; - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - writePinHigh(E7); - } else { - writePinLow(E7); - } - - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B0); - } else { - writePinLow(B0); - } - - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - writePinHigh(E6); - } else { - writePinLow(E6); - } - - led_set_user(usb_led); -} diff --git a/keyboards/z150_blackheart/z150_blackheart.h b/keyboards/z150_blackheart/z150_blackheart.h deleted file mode 100644 index f97ac1c035..0000000000 --- a/keyboards/z150_blackheart/z150_blackheart.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, \ - K40, K41, K42, K43, K47, K4E, K4F, K4H \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, KC_NO, K0J }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, KC_NO }, \ - { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K4E, K4F, KC_NO, K4H, KC_NO, KC_NO } \ -} - -#define LAYOUT_z150_tkl( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0H, K0I, K0J, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1H, K1I, K1J, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2G, K2H, K2I, \ - K30, K31, K32, K45, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3G, K3H, K3I, \ - K40, K41, K42, K43, K44, K47, K4C, K4D, K4E, K4F, K4G, K4H, K4I \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, KC_NO, K0H, K0I, K0J }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, KC_NO, K1H, K1I, K1J }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, KC_NO, K2G, K2H, K2I, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, K3G, K3H, K3I, KC_NO }, \ - { K40, K41, K42, K43, K44, K45, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, K4C, K4D, K4E, K4F, K4G, K4H, K4I, KC_NO } \ -} diff --git a/keyboards/zinc/config.h b/keyboards/zinc/config.h index 712db0ac6d..cfb6bf4ffc 100644 --- a/keyboards/zinc/config.h +++ b/keyboards/zinc/config.h @@ -17,30 +17,5 @@ along with this program. If not, see . */ #pragma once -//#ifndef CONFIG_H -//#define CONFIG_H #include "config_common.h" - -// GCC include 'config.h" sequence in qmk_firmware/keyboards/zinc/ -// -include keyboards/zinc/config.h -// -include keyboards/zinc/rev?/config.h -// -include keyboards/zinc/rev?/keymaps/MAPNAME/config.h -// XXXX.c - -#include - -// GCC include search path in qmk_firmare/keyboards/zinc/ -// #include "..." search starts here: -// #include <...> search starts here: -// keyboards/zinc/rev?/keymaps/MAPNAME -// keyboards/zinc -// keyboards/zinc/rev? -// . -// ./tmk_core -// ...... - -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -//#endif /* CONFIG_H */ diff --git a/keyboards/zinc/i2c.c b/keyboards/zinc/i2c.c deleted file mode 100644 index 4bee5c6398..0000000000 --- a/keyboards/zinc/i2c.c +++ /dev/null @@ -1,162 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency 400kHz -#define SCL_CLOCK 400000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/zinc/keymaps/default/config.h b/keyboards/zinc/keymaps/default/config.h index 4dcb0724ff..2185dc9ebe 100644 --- a/keyboards/zinc/keymaps/default/config.h +++ b/keyboards/zinc/keymaps/default/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/default/keymap.c b/keyboards/zinc/keymaps/default/keymap.c index 0f08d21ee7..cd1bf0328b 100644 --- a/keyboards/zinc/keymaps/default/keymap.c +++ b/keyboards/zinc/keymaps/default/keymap.c @@ -139,7 +139,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ * |------+------+------+------+------+------| |------+------+------+------+------+------| * | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | MODE | HUE- | SAT- | VAL- | | | | | | | | | + * |MODE R| MODE | HUE- | SAT- | VAL- | | | | | | |PageUp| | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | * `-----------------------------------------' `-----------------------------------------' @@ -147,13 +147,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ [_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \ _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ - _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\ - _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ + RGB_RMOD,RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, KC_PGUP, _______,\ + _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KANA, KC_HOME, KC_PGDN, KC_END\ ) }; // define variables for reactive RGB -bool TOG_STATUS = false; +bool TOG_STATUS = false; // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { @@ -211,7 +211,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - + case RAISE: if (record->event.pressed) { //not sure how to have keyboard check mode and set it to a variable, so my work around @@ -244,16 +244,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_RMOD: + #if defined(RGBLIGHT_ENABLE) + if (record->event.pressed) { + rgblight_mode_noeeprom(RGB_current_config.mode); + rgblight_step_reverse(); + RGB_current_config.mode = rgblight_config.mode; + } + return false; + #endif + break; + case RGB_MOD: - #ifdef RGBLIGHT_ENABLE + #if defined(RGBLIGHT_ENABLE) if (record->event.pressed) { rgblight_mode_noeeprom(RGB_current_config.mode); rgblight_step(); RGB_current_config.mode = rgblight_config.mode; } - #endif return false; + #endif break; case EISU: diff --git a/keyboards/zinc/keymaps/default/readme_en.md b/keyboards/zinc/keymaps/default/readme_en.md new file mode 100644 index 0000000000..6447e96ed4 --- /dev/null +++ b/keyboards/zinc/keymaps/default/readme_en.md @@ -0,0 +1,131 @@ +# The Default Zinc Layout +## layout + +### Qwerty + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | Fn | Alt | Win |Lower |Space | | Space| Raise| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### Colemak + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### Dvorak + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `-----------------------------------------' `-----------------------------------------' +``` + +### Lower +``` + ,-----------------------------------------. ,-----------------------------------------. + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | - | _ | + | { | } | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | | Home | End | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------' `-----------------------------------------' +``` + +### RAISE +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------' `-----------------------------------------' +``` + +### Adjust (Lower + Raise) +``` + ,-----------------------------------------. ,-----------------------------------------. + | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | + |------+------+------+------+------+------| |------+------+------+------+------+------| + |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | + `-----------------------------------------' `-----------------------------------------' +``` + +## Compile + +go to qmk top directory. + +``` +$ cd qmk_firmware +``` +make with `zinc:` + +``` +$ make zinc:default +``` + +To make and flash with `:flash` + +``` +$ make zinc:default:flash +``` + + +## Customize + +You can customize from the command line. + +``` +# Zinc keyboard 'default' keymap: convenient command line option +make ZINC= zinc:defualt +# option= back | under | both | cont | na | ios +# ex. +# make ZINC=under zinc:defualt +# make ZINC=under,ios zinc:defualt +# make ZINC=back zinc:default +# make ZINC=back,na zinc:default +# make ZINC=back,ios zinc:default +``` + +Or edit `qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` directly. + +``` +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +``` diff --git a/keyboards/zinc/keymaps/default/readme_jp.md b/keyboards/zinc/keymaps/default/readme_jp.md index dfedb37c15..8132f5036e 100644 --- a/keyboards/zinc/keymaps/default/readme_jp.md +++ b/keyboards/zinc/keymaps/default/readme_jp.md @@ -43,6 +43,44 @@ `-----------------------------------------' `-----------------------------------------' ``` + ### Lower +``` + ,-----------------------------------------. ,-----------------------------------------. + | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | - | _ | + | { | } | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | | Home | End | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------' `-----------------------------------------' +``` + +### RAISE +``` + ,-----------------------------------------. ,-----------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | | | Next | Vol- | Vol+ | Play | + `-----------------------------------------' `-----------------------------------------' +``` + +### Adjust (Lower + Raise) +``` + ,-----------------------------------------. ,-----------------------------------------. + | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | |RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | + |------+------+------+------+------+------| |------+------+------+------+------+------| + |MODE R|RGBMOD| HUE- | SAT- | VAL- | | | | | | |PageUp| | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | EISU | EISU | EISU | | KANA | KANA | KANA | Home |PageDn| End | + `-----------------------------------------' `-----------------------------------------' +``` ## コンパイルの仕方 @@ -76,7 +114,7 @@ $ make zinc:default:clean ``` # Zinc keyboard 'default' keymap: convenient command line option make ZINC= zinc:defualt -# option= back | under | na | ios +# option= back | under | both | cont | na | ios # ex. # make ZINC=under zinc:defualt # make ZINC=under,ios zinc:defualt @@ -85,16 +123,16 @@ make ZINC= zinc:defualt # make ZINC=back,ios zinc:default ``` -あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/default/rules.mk` の以下の部分を直接編集して機能を有効化してください。 +あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/~/rules.mk` の以下の部分を直接編集して機能を有効化してください。 ``` # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - - ``` ## RGB backlight を有効にする @@ -120,4 +158,4 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に ``` IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -``` \ No newline at end of file +``` diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk index c980f7d00b..32e0f21610 100644 --- a/keyboards/zinc/keymaps/default/rules.mk +++ b/keyboards/zinc/keymaps/default/rules.mk @@ -20,6 +20,9 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) + $(info - RGB_MATRIX=$(RGB_MATRIX)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -27,6 +30,10 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc +RGB_MATRIX = no # RGB LED Matrix +RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -36,7 +43,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | matrix | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -47,9 +54,22 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif + ifeq ($(findstring matrix,$(ZINC)), matrix) + RGB_MATRIX = yes + endif + ifeq ($(findstring right,$(ZINC)), right) + RGB_MATRIX_SPLIT_RIGHT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -62,10 +82,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -73,18 +94,36 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + +ifeq ($(strip $(RGB_MATRIX)), yes) + RGBLIGHT_ENABLE = no + RGB_MATRIX_ENABLE = WS2812 +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + +endif +ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) + OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/zinc/keymaps/ginjake/config.h b/keyboards/zinc/keymaps/ginjake/config.h index 4dcb0724ff..2185dc9ebe 100644 --- a/keyboards/zinc/keymaps/ginjake/config.h +++ b/keyboards/zinc/keymaps/ginjake/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/ginjake/rules.mk b/keyboards/zinc/keymaps/ginjake/rules.mk index 2dcefc0016..2cb59fe8b8 100644 --- a/keyboards/zinc/keymaps/ginjake/rules.mk +++ b/keyboards/zinc/keymaps/ginjake/rules.mk @@ -1,12 +1,11 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug 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 @@ -21,6 +20,8 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -28,6 +29,8 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -37,7 +40,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -48,9 +51,16 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -63,10 +73,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -74,18 +85,27 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/zinc/keymaps/monks/config.h b/keyboards/zinc/keymaps/monks/config.h index 4dcb0724ff..2185dc9ebe 100644 --- a/keyboards/zinc/keymaps/monks/config.h +++ b/keyboards/zinc/keymaps/monks/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/monks/keymap.c b/keyboards/zinc/keymaps/monks/keymap.c index 5fd7c6aa85..a30e8ac5fc 100644 --- a/keyboards/zinc/keymaps/monks/keymap.c +++ b/keyboards/zinc/keymaps/monks/keymap.c @@ -119,6 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ // define variables for reactive RGB bool TOG_STATUS = false; + // Setting ADJUST layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { @@ -163,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - + case RAISE: if (record->event.pressed) { //not sure how to have keyboard check mode and set it to a variable, so my work around diff --git a/keyboards/zinc/keymaps/monks/readme_jp.md b/keyboards/zinc/keymaps/monks/readme_jp.md index f1495af4c8..e518eb7696 100644 --- a/keyboards/zinc/keymaps/monks/readme_jp.md +++ b/keyboards/zinc/keymaps/monks/readme_jp.md @@ -100,4 +100,4 @@ RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone に ``` IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) -``` \ No newline at end of file +``` diff --git a/keyboards/zinc/keymaps/monks/rules.mk b/keyboards/zinc/keymaps/monks/rules.mk index eeabc004c3..c1b98deada 100644 --- a/keyboards/zinc/keymaps/monks/rules.mk +++ b/keyboards/zinc/keymaps/monks/rules.mk @@ -1,12 +1,11 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug 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 @@ -21,6 +20,8 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -28,6 +29,8 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -37,7 +40,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -48,9 +51,16 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -63,10 +73,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -74,17 +85,27 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -94,4 +115,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) # $(info ) - diff --git a/keyboards/zinc/keymaps/toshi0383/config.h b/keyboards/zinc/keymaps/toshi0383/config.h index 33108a29e6..0d53d44247 100644 --- a/keyboards/zinc/keymaps/toshi0383/config.h +++ b/keyboards/zinc/keymaps/toshi0383/config.h @@ -21,8 +21,6 @@ along with this program. If not, see . */ #pragma once -// if you need more program area, try uncomment follow line -#include "serial_config_simpleapi.h" // place overrides here // Selection of RGBLIGHT MODE to use. diff --git a/keyboards/zinc/keymaps/toshi0383/rules.mk b/keyboards/zinc/keymaps/toshi0383/rules.mk index dca9aa7ff8..26ac02f3a0 100644 --- a/keyboards/zinc/keymaps/toshi0383/rules.mk +++ b/keyboards/zinc/keymaps/toshi0383/rules.mk @@ -1,11 +1,12 @@ # Build Options -# change yes to no to disable +# 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 -MOUSEKEY_ENABLE = no # Mouse keys +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration +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 @@ -19,6 +20,9 @@ define ZINC_CUSTOMISE_MSG $(info Zinc customize) $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_BOTH_ENABLE=$(LED_BOTH_ENABLE)) + $(info - LED_RGB_CONT=$(LED_RGB_CONT)) + $(info - RGB_MATRIX=$(RGB_MATRIX)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef @@ -26,6 +30,10 @@ endef # Zinc keyboard customize LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_BOTH_ENABLE = no # LED backlight and underglow +LED_RGB_CONT = no # LED continuous backlight or/and underglow between left Zinc and right Zinc +RGB_MATRIX = no # RGB LED Matrix +RGB_MATRIX_SPLIT_RIGHT = no # RGB Matrix for RIGHT Hand LED_ANIMATIONS = yes # LED animations IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) Link_Time_Optimization = no # if firmware size over limit, try this option @@ -35,7 +43,7 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ### Zinc keyboard 'default' keymap: convenient command line option ## make ZINC= zinc:defualt -## option= back | under | na | ios +## option= back | under | both | cont | matrix | na | ios ## ex. ## make ZINC=under zinc:defualt ## make ZINC=under,ios zinc:defualt @@ -46,9 +54,22 @@ Link_Time_Optimization = no # if firmware size over limit, try this option ifneq ($(strip $(ZINC)),) ifeq ($(findstring back,$(ZINC)), back) LED_BACK_ENABLE = yes - else ifeq ($(findstring under,$(ZINC)), under) + endif + ifeq ($(findstring under,$(ZINC)), under) LED_UNDERGLOW_ENABLE = yes endif + ifeq ($(findstring both,$(ZINC)), both) + LED_BOTH_ENABLE = yes + endif + ifeq ($(findstring cont,$(ZINC)), cont) + LED_RGB_CONT = yes + endif + ifeq ($(findstring matrix,$(ZINC)), matrix) + RGB_MATRIX = yes + endif + ifeq ($(findstring right,$(ZINC)), right) + RGB_MATRIX_SPLIT_RIGHT = yes + endif ifeq ($(findstring na,$(ZINC)), na) LED_ANIMATIONS = no endif @@ -61,10 +82,11 @@ endif ifeq ($(strip $(LED_BACK_ENABLE)), yes) RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call ZINC_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + OPT_DEFS += -DRGBLED_BOTH + $(info LED_BOTH_ENABLE option is enabled instead of LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE) + else + OPT_DEFS += -DRGBLED_BACK endif else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) RGBLIGHT_ENABLE = yes @@ -72,24 +94,43 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(LED_BOTH_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BOTH +endif + +ifeq ($(strip $(LED_RGB_CONT)), yes) + OPT_DEFS += -DRGBLED_CONT +endif + +ifeq ($(strip $(RGB_MATRIX)), yes) + RGBLIGHT_ENABLE = no + RGB_MATRIX_ENABLE = WS2812 +endif + ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE + OPT_DEFS += -DIOS_DEVICE_ENABLE endif ifeq ($(strip $(LED_ANIMATIONS)), yes) -# OPT_DEFS += -DRGBLIGHT_ANIMATIONS - OPT_DEFS += -DLED_ANIMATIONS +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + +endif + +ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) + OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT endif ifeq ($(strip $(Link_Time_Optimization)),yes) - EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) # $(info ) - diff --git a/keyboards/zinc/readme.md b/keyboards/zinc/readme.md index 3b4ce105c8..0e8d6cd65d 100644 --- a/keyboards/zinc/readme.md +++ b/keyboards/zinc/readme.md @@ -5,9 +5,9 @@ Zinc 40% row-staggered split keyboard. -Keyboard Maintainer: [monksoffunk](https://github.com/monksoffunk/) [@monksoffunkJP](https://twitter.com/monksoffunkJP) -Hardware Supported: Zinc PCB -Hardware Availability: (https://twitter.com/monksoffunkJP) +* Keyboard Maintainer: [monksoffunk](https://github.com/monksoffunk/) [@monksoffunkJP](https://twitter.com/monksoffunkJP) +* Hardware Supported: Zinc PCB +* Hardware Availability: (https://twitter.com/monksoffunkJP) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/zinc/rev1/config.h b/keyboards/zinc/rev1/config.h index 6713b3098a..1eb63df5bc 100644 --- a/keyboards/zinc/rev1/config.h +++ b/keyboards/zinc/rev1/config.h @@ -18,9 +18,6 @@ along with this program. If not, see . #pragma once -//#ifndef REV1_CONFIG_H -//#define REV1_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x9991 @@ -33,9 +30,8 @@ along with this program. If not, see . #define TAPPING_TERM 100 /* Use I2C or Serial */ -//#define USE_I2C #define USE_SERIAL -//#define USE_MATRIX_I2C +#define SOFT_SERIAL_PIN D2 /* Select hand configuration */ #define MASTER_LEFT @@ -44,18 +40,14 @@ along with this program. If not, see . /* key matrix size */ // Rows are doubled-up - #define MATRIX_ROWS 8 - #define MATRIX_ROW_PINS { F6, F7, B1, B3 } +#define MATRIX_ROWS 8 +#define MATRIX_ROW_PINS { F6, F7, B1, B3 } // wiring of each half #define MATRIX_COLS 6 #define MATRIX_COL_PINS { F4, D4, C6, D7, E6, B4 } -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +#define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 @@ -67,25 +59,44 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD // RGB LED support //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes -#ifdef RGBLED_BACK - #define RGBLED_NUM 24 -#else - #define RGBLED_NUM 6 +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #ifdef RGBLED_BACK + #ifdef RGBLED_CONT + #define RGBLED_NUM 48 + #define RGBLED_SPLIT { 24, 24 } + #else + #define RGBLED_NUM 24 + #endif + #else + #ifdef RGBLED_BOTH + #ifdef RGBLED_CONT + #define RGBLED_NUM 60 + #define RGBLED_SPLIT { 30, 30 } +// #define RGBLIGHT_LED_MAP {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29} + #else + #define RGBLED_NUM 30 + #endif + #else + #ifdef RGBLED_CONT + #define RGBLED_NUM 12 + #define RGBLED_SPLIT { 6, 6 } + #else + #define RGBLED_NUM 6 + #endif + #endif + #endif #endif #ifndef IOS_DEVICE_ENABLE - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 255 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 130 #else #define RGBLIGHT_LIMIT_VAL 120 @@ -93,10 +104,10 @@ along with this program. If not, see . #endif #define RGBLIGHT_VAL_STEP 17 #else - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 90 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 45 #else #define RGBLIGHT_LIMIT_VAL 35 @@ -136,5 +147,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -//#endif diff --git a/keyboards/zinc/rev1/matrix.c b/keyboards/zinc/rev1/matrix.c deleted file mode 100644 index df674ce143..0000000000 --- a/keyboards/zinc/rev1/matrix.c +++ /dev/null @@ -1,357 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "quantum.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -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); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - setPinOutput(B0); - setPinOutput(D5); - writePinHigh(D5); - writePinHigh(B0); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - 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); - - 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 { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) writePinLow(B0); - return 1; - } - writePinHigh(B0); - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - memcpy(&matrix[offset], - (void *)serial_master_buffer, sizeof(serial_master_buffer)); - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - writePinLow(D5); - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - writePinHigh(D5); - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - 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; -} - -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); - } -} - -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); -} diff --git a/keyboards/zinc/rev1/rev1.c b/keyboards/zinc/rev1/rev1.c index 2ce08a07c4..a9c2cfdbac 100644 --- a/keyboards/zinc/rev1/rev1.c +++ b/keyboards/zinc/rev1/rev1.c @@ -3,4 +3,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; - diff --git a/keyboards/zinc/rev1/rev1.h b/keyboards/zinc/rev1/rev1.h index aa1c408b0b..1bf2c565ae 100644 --- a/keyboards/zinc/rev1/rev1.h +++ b/keyboards/zinc/rev1/rev1.h @@ -1,22 +1,7 @@ #pragma once -#include "../zinc.h" - #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - // Standard Keymap // (TRRS jack on both halves are to the left side) #define LAYOUT( \ diff --git a/keyboards/zinc/rev1/rules.mk b/keyboards/zinc/rev1/rules.mk index e78b9258d7..d38a618090 100644 --- a/keyboards/zinc/rev1/rules.mk +++ b/keyboards/zinc/rev1/rules.mk @@ -1,4 +1 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c -SRC += ws2812.c +SPLIT_KEYBOARD = yes diff --git a/keyboards/zinc/rev1/serial_config.h b/keyboards/zinc/rev1/serial_config.h deleted file mode 100644 index 9fb5dfc671..0000000000 --- a/keyboards/zinc/rev1/serial_config.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SOFT_SERIAL_CONFIG_H -#define SOFT_SERIAL_CONFIG_H - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -#endif - -//// USE flexible API (using multi-type transaction function) -#define SERIAL_USE_MULTI_TRANSACTION - -#endif /* SOFT_SERIAL_CONFIG_H */ diff --git a/keyboards/zinc/rev1/serial_config_simpleapi.h b/keyboards/zinc/rev1/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e7..0000000000 --- a/keyboards/zinc/rev1/serial_config_simpleapi.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SERIAL_CONFIG_SIMPLEAPI_H -#define SERIAL_CONFIG_SIMPLEAPI_H - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/zinc/rev1/split_scomm.c b/keyboards/zinc/rev1/split_scomm.c deleted file mode 100644 index 50d233ce9a..0000000000 --- a/keyboards/zinc/rev1/split_scomm.c +++ /dev/null @@ -1,95 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef SERIAL_DEBUG_MODE -#include -#endif -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3], - serial_slave_buffer[4] ); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/zinc/rev1/split_scomm.h b/keyboards/zinc/rev1/split_scomm.h deleted file mode 100644 index 873d8939d8..0000000000 --- a/keyboards/zinc/rev1/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/zinc/rev1/split_util.c b/keyboards/zinc/rev1/split_util.c deleted file mode 100644 index e1ff8b4379..0000000000 --- a/keyboards/zinc/rev1/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -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 - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/zinc/reva/config.h b/keyboards/zinc/reva/config.h index 8eeb154acc..e94ffb7c65 100644 --- a/keyboards/zinc/reva/config.h +++ b/keyboards/zinc/reva/config.h @@ -30,9 +30,8 @@ along with this program. If not, see . #define TAPPING_TERM 100 /* Use I2C or Serial */ -//#define USE_I2C #define USE_SERIAL -//#define USE_MATRIX_I2C +#define SOFT_SERIAL_PIN D2 /* Select hand configuration */ #define MASTER_LEFT @@ -41,18 +40,14 @@ along with this program. If not, see . /* key matrix size */ // Rows are doubled-up - #define MATRIX_ROWS 8 - #define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_ROWS 8 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } // wiring of each half #define MATRIX_COLS 6 #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3} -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +#define DIODE_DIRECTION COL2ROW /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 @@ -64,25 +59,44 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 -#define RGBLIGHT_TIMER -//#define RGBLED_NUM 24 // Number of LEDs. see ./keymaps/default/config.h -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD // RGB LED support //#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no // see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes -#ifdef RGBLED_BACK - #define RGBLED_NUM 24 -#else - #define RGBLED_NUM 6 +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_SPLIT + #ifdef RGBLED_BACK + #ifdef RGBLED_CONT + #define RGBLED_NUM 48 + #define RGBLED_SPLIT { 24, 24 } + #else + #define RGBLED_NUM 24 + #endif + #else + #ifdef RGBLED_BOTH + #ifdef RGBLED_CONT + #define RGBLED_NUM 60 + #define RGBLED_SPLIT { 30, 30 } +// #define RGBLIGHT_LED_MAP {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29} + #else + #define RGBLED_NUM 30 + #endif + #else + #ifdef RGBLED_CONT + #define RGBLED_NUM 12 + #define RGBLED_SPLIT { 6, 6 } + #else + #define RGBLED_NUM 6 + #endif + #endif + #endif #endif #ifndef IOS_DEVICE_ENABLE - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 255 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 130 #else #define RGBLIGHT_LIMIT_VAL 120 @@ -90,10 +104,10 @@ along with this program. If not, see . #endif #define RGBLIGHT_VAL_STEP 17 #else - #if RGBLED_NUM <= 6 + #if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12)) #define RGBLIGHT_LIMIT_VAL 90 #else - #if RGBLED_NUM <= 16 + #if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32)) #define RGBLIGHT_LIMIT_VAL 45 #else #define RGBLIGHT_LIMIT_VAL 35 diff --git a/keyboards/zinc/reva/matrix.c b/keyboards/zinc/reva/matrix.c deleted file mode 100644 index 5b58500db8..0000000000 --- a/keyboards/zinc/reva/matrix.c +++ /dev/null @@ -1,357 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "quantum.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "split_scomm.h" -#endif - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -static uint8_t debouncing = DEBOUNCE; -static const int ROWS_PER_HAND = MATRIX_ROWS/2; -static uint8_t error_count = 0; -uint8_t is_master = 0 ; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -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); -static uint8_t matrix_master_scan(void); - - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - setPinOutput(B0); - setPinOutput(D5); - writePinHigh(B0); - writePinHigh(D5); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - is_master = has_usb(); - - 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); - - 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 { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - } - } - - return 1; -} - -#ifdef USE_MATRIX_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(int master_changed) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; -#ifdef SERIAL_USE_MULTI_TRANSACTION - int ret=serial_update_buffers(master_changed); -#else - int ret=serial_update_buffers(); -#endif - if (ret ) { - if(ret==2) writePinLow(B0); - return 1; - } - writePinHigh(B0); - memcpy(&matrix[slaveOffset], - (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - if (is_master) { - matrix_master_scan(); - }else{ - matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - memcpy(&matrix[offset], - (void *)serial_master_buffer, sizeof(serial_master_buffer)); - matrix_scan_quantum(); - } - return 1; -} - - -uint8_t matrix_master_scan(void) { - - int ret = _matrix_scan(); - int mchanged = 1; - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - mchanged = memcmp((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); - #endif - memcpy((void *)serial_master_buffer, - &matrix[offset], sizeof(serial_master_buffer)); -#endif - -#ifdef USE_MATRIX_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction(mchanged) ) { -#endif - // turn on the indicator led when halves are disconnected - writePinLow(D5); - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - writePinHigh(D5); - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_MATRIX_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 - #ifdef SERIAL_USE_MULTI_TRANSACTION - int change = 0; - #endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - #ifdef SERIAL_USE_MULTI_TRANSACTION - if( serial_slave_buffer[i] != matrix[offset+i] ) - change = 1; - #endif - serial_slave_buffer[i] = matrix[offset+i]; - } - #ifdef SERIAL_USE_MULTI_TRANSACTION - slave_buffer_change_count += change; - #endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); - _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); - } -} - -static matrix_row_t read_cols(void) -{ - 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; -} - -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); - } -} - -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); -} diff --git a/keyboards/zinc/reva/reva.c b/keyboards/zinc/reva/reva.c index 2ce08a07c4..a9c2cfdbac 100644 --- a/keyboards/zinc/reva/reva.c +++ b/keyboards/zinc/reva/reva.c @@ -3,4 +3,3 @@ void matrix_init_kb(void) { matrix_init_user(); }; - diff --git a/keyboards/zinc/reva/reva.h b/keyboards/zinc/reva/reva.h index aa1c408b0b..1bf2c565ae 100644 --- a/keyboards/zinc/reva/reva.h +++ b/keyboards/zinc/reva/reva.h @@ -1,22 +1,7 @@ #pragma once -#include "../zinc.h" - #include "quantum.h" -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" -#endif - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - // Standard Keymap // (TRRS jack on both halves are to the left side) #define LAYOUT( \ diff --git a/keyboards/zinc/reva/rules.mk b/keyboards/zinc/reva/rules.mk index 3ea61267a2..83895bdcb8 100644 --- a/keyboards/zinc/reva/rules.mk +++ b/keyboards/zinc/reva/rules.mk @@ -1,4 +1 @@ -SRC += reva/matrix.c -SRC += reva/split_util.c -SRC += reva/split_scomm.c -SRC += ws2812.c +SPLIT_KEYBOARD = yes \ No newline at end of file diff --git a/keyboards/zinc/reva/serial_config.h b/keyboards/zinc/reva/serial_config.h deleted file mode 100644 index 9fb5dfc671..0000000000 --- a/keyboards/zinc/reva/serial_config.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SOFT_SERIAL_CONFIG_H -#define SOFT_SERIAL_CONFIG_H - -#ifndef SOFT_SERIAL_PIN -/* Soft Serial defines */ -#define SOFT_SERIAL_PIN D2 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -#endif - -//// USE flexible API (using multi-type transaction function) -#define SERIAL_USE_MULTI_TRANSACTION - -#endif /* SOFT_SERIAL_CONFIG_H */ diff --git a/keyboards/zinc/reva/serial_config_simpleapi.h b/keyboards/zinc/reva/serial_config_simpleapi.h deleted file mode 100644 index e2d22a41e7..0000000000 --- a/keyboards/zinc/reva/serial_config_simpleapi.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SERIAL_CONFIG_SIMPLEAPI_H -#define SERIAL_CONFIG_SIMPLEAPI_H - -#undef SERIAL_USE_MULTI_TRANSACTION -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/zinc/reva/split_scomm.c b/keyboards/zinc/reva/split_scomm.c deleted file mode 100644 index 50d233ce9a..0000000000 --- a/keyboards/zinc/reva/split_scomm.c +++ /dev/null @@ -1,95 +0,0 @@ -#ifdef USE_SERIAL -#ifdef SERIAL_USE_MULTI_TRANSACTION -/* --- USE flexible API (using multi-type transaction function) --- */ - -#include -#include -#include -#include -#include "serial.h" -#ifdef SERIAL_DEBUG_MODE -#include -#endif -#ifdef CONSOLE_ENABLE - #include -#endif - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -uint8_t volatile status_com = 0; -uint8_t volatile status1 = 0; -uint8_t slave_buffer_change_count = 0; -uint8_t s_change_old = 0xff; -uint8_t s_change_new = 0xff; - -SSTD_t transactions[] = { -#define GET_SLAVE_STATUS 0 - /* master buffer not changed, only recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - 0, NULL, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define PUT_MASTER_GET_SLAVE_STATUS 1 - /* master buffer changed need send, and recive slave_buffer_change_count */ - { (uint8_t *)&status_com, - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - sizeof(slave_buffer_change_count), &slave_buffer_change_count, - }, -#define GET_SLAVE_BUFFER 2 - /* recive serial_slave_buffer */ - { (uint8_t *)&status1, - 0, NULL, - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - } -}; - -void serial_master_init(void) -{ - soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); -} - -void serial_slave_init(void) -{ - soft_serial_target_init(transactions, TID_LIMIT(transactions)); -} - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(int master_update) -{ - int status, smatstatus; - static int need_retry = 0; - - if( s_change_old != s_change_new ) { - smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); - if( smatstatus == TRANSACTION_END ) { - s_change_old = s_change_new; -#ifdef CONSOLE_ENABLE - uprintf("slave matrix = %b %b %b %b %b\n", - serial_slave_buffer[0], serial_slave_buffer[1], - serial_slave_buffer[2], serial_slave_buffer[3], - serial_slave_buffer[4] ); -#endif - } - } else { - // serial_slave_buffer dosen't change - smatstatus = TRANSACTION_END; // dummy status - } - - if( !master_update && !need_retry) { - status = soft_serial_transaction(GET_SLAVE_STATUS); - } else { - status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); - } - if( status == TRANSACTION_END ) { - s_change_new = slave_buffer_change_count; - need_retry = 0; - } else { - need_retry = 1; - } - return smatstatus; -} - -#endif // SERIAL_USE_MULTI_TRANSACTION -#endif /* USE_SERIAL */ diff --git a/keyboards/zinc/reva/split_scomm.h b/keyboards/zinc/reva/split_scomm.h deleted file mode 100644 index 873d8939d8..0000000000 --- a/keyboards/zinc/reva/split_scomm.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ -#include "serial.h" - -#else -/* --- USE flexible API (using multi-type transaction function) --- */ -// Buffers for master - slave communication -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -extern uint8_t slave_buffer_change_count; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(int master_changed); - -#endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/zinc/reva/split_util.c b/keyboards/zinc/reva/split_util.c deleted file mode 100644 index e1ff8b4379..0000000000 --- a/keyboards/zinc/reva/split_util.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" - -#ifdef USE_MATRIX_I2C -# include "i2c.h" -#else -# include "split_scomm.h" -#endif - -volatile bool isLeftHand = true; - -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 - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_master_init(); -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - -#ifdef USE_MATRIX_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/zinc/rules.mk b/keyboards/zinc/rules.mk index 63a8cc8fc3..36e717d60a 100644 --- a/keyboards/zinc/rules.mk +++ b/keyboards/zinc/rules.mk @@ -27,12 +27,8 @@ 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. -SUBPROJECT_rev1 = no -USE_I2C = yes -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes DEFAULT_FOLDER = zinc/rev1 diff --git a/keyboards/zinc/serial.c b/keyboards/zinc/serial.c deleted file mode 100644 index f6293c3dc2..0000000000 --- a/keyboards/zinc/serial.c +++ /dev/null @@ -1,589 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" - -#ifdef SOFT_SERIAL_PIN - -#ifdef __AVR_ATmega32U4__ - // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. - #ifdef USE_I2C - #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 - #error Using ATmega32U4 I2C, so can not use PD0, PD1 - #endif - #endif - - #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 - #define SERIAL_PIN_DDR DDRD - #define SERIAL_PIN_PORT PORTD - #define SERIAL_PIN_INPUT PIND - #if SOFT_SERIAL_PIN == D0 - #define SERIAL_PIN_MASK _BV(PD0) - #define EIMSK_BIT _BV(INT0) - #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) - #define SERIAL_PIN_INTERRUPT INT0_vect - #elif SOFT_SERIAL_PIN == D1 - #define SERIAL_PIN_MASK _BV(PD1) - #define EIMSK_BIT _BV(INT1) - #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) - #define SERIAL_PIN_INTERRUPT INT1_vect - #elif SOFT_SERIAL_PIN == D2 - #define SERIAL_PIN_MASK _BV(PD2) - #define EIMSK_BIT _BV(INT2) - #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) - #define SERIAL_PIN_INTERRUPT INT2_vect - #elif SOFT_SERIAL_PIN == D3 - #define SERIAL_PIN_MASK _BV(PD3) - #define EIMSK_BIT _BV(INT3) - #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) - #define SERIAL_PIN_INTERRUPT INT3_vect - #endif - #elif SOFT_SERIAL_PIN == E6 - #define SERIAL_PIN_DDR DDRE - #define SERIAL_PIN_PORT PORTE - #define SERIAL_PIN_INPUT PINE - #define SERIAL_PIN_MASK _BV(PE6) - #define EIMSK_BIT _BV(INT6) - #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) - #define SERIAL_PIN_INTERRUPT INT6_vect - #else - #error invalid SOFT_SERIAL_PIN value - #endif - -#else - #error serial.c now support ATmega32U4 only -#endif - -//////////////// for backward compatibility //////////////////////////////// -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; - #endif - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - #endif - uint8_t volatile status0 = 0; - -SSTD_t transactions[] = { - { (uint8_t *)&status0, - #if SERIAL_MASTER_BUFFER_LENGTH > 0 - sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, - #else - 0, (uint8_t *)NULL, - #endif - #if SERIAL_SLAVE_BUFFER_LENGTH > 0 - sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer - #else - 0, (uint8_t *)NULL, - #endif - } -}; - -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers() -{ - int result; - result = soft_serial_transaction(); - return result; -} - -#endif // end of Simple API (OLD API, compatible with let's split serial.c) -//////////////////////////////////////////////////////////////////////////// - -#define ALWAYS_INLINE __attribute__((always_inline)) -#define NO_INLINE __attribute__((noinline)) -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// parity check -#define ODD_PARITY 1 -#define EVEN_PARITY 0 -#define PARITY EVEN_PARITY - -#ifdef SERIAL_DELAY - // custom setup in config.h - // #define TID_SEND_ADJUST 2 - // #define SERIAL_DELAY 6 // micro sec - // #define READ_WRITE_START_ADJUST 30 // cycles - // #define READ_WRITE_WIDTH_ADJUST 8 // cycles -#else -// ============ Standard setups ============ - -#ifndef SELECT_SOFT_SERIAL_SPEED -#define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -#if __GNUC__ < 6 - #define TID_SEND_ADJUST 14 -#else - #define TID_SEND_ADJUST 2 -#endif - -#if SELECT_SOFT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 34 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #if __GNUC__ < 6 - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 36 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#elif SELECT_SOFT_SERIAL_SPEED == 5 - // Ultra Low speed - #define SERIAL_DELAY 48 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #if __GNUC__ < 6 - #define READ_WRITE_WIDTH_ADJUST 3 // cycles - #else - #define READ_WRITE_WIDTH_ADJUST 7 // cycles - #endif -#else -#error invalid SELECT_SOFT_SERIAL_SPEED value -#endif /* SELECT_SOFT_SERIAL_SPEED */ -#endif /* SERIAL_DELAY */ - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH_US 1 -#ifndef SERIAL_USE_MULTI_TRANSACTION - #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -#else - #define SLAVE_INT_ACK_WIDTH_UNIT 2 - #define SLAVE_INT_ACK_WIDTH 4 -#endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static void serial_output(void) ALWAYS_INLINE; -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static void serial_low(void) ALWAYS_INLINE; -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static void serial_high(void) ALWAYS_INLINE; -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) -{ - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT3,INT6 - EIMSK |= EIMSK_BIT; -#if SERIAL_PIN_MASK == _BV(PE6) - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -#else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -#endif -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static -void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { - serial_delay_half1(); // read the middle of pulses - if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; - } else { - byte = (byte << 1) | 0; p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb)? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if(p & 1) { serial_high(); } - else { serial_low(); } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data,8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static -uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static -void change_sender2reciver(void) { - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 -} - -inline static -void change_reciver2sender(void) { - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); //3 - serial_delay_half1(); //4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) -{ - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { - -#ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -#else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount,7); - tid = bits>>3; - bits = (bits&7) != nibble_bits_count(tid); - if( bits || pecount> 0 || tid > Transaction_table_size ) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -#endif - - // target send phase - if( trans->target2initiator_buffer_size > 0 ) - serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if( trans->initiator2target_buffer_size > 0 ) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); //weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -#else -int soft_serial_transaction(int sstd_index) { - if( sstd_index > Transaction_table_size ) - return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -#endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -#ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -#else - // send transaction table index - int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while( !serial_read_pin() ) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for( int i = 0; serial_read_pin(); i++ ) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -#endif - - // initiator recive phase - // if the target is present syncronize with it - if( trans->target2initiator_buffer_size > 0 ) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if( trans->initiator2target_buffer_size > 0 ) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0;; - sei(); - return retval; -} -#endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/zinc/serial.h b/keyboards/zinc/serial.h deleted file mode 100644 index 7e0c0847a4..0000000000 --- a/keyboards/zinc/serial.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE Simple API (OLD API, compatible with let's split serial.c) -// ex. -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 -// -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - - -#ifndef SERIAL_USE_MULTI_TRANSACTION -/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ -#if SERIAL_SLAVE_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -#endif -#if SERIAL_MASTER_BUFFER_LENGTH > 0 -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; -#endif - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); - -#endif // USE Simple API - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/zinc/zinc.h b/keyboards/zinc/zinc.h index 87d889da03..dedc9253b0 100644 --- a/keyboards/zinc/zinc.h +++ b/keyboards/zinc/zinc.h @@ -1,5 +1,4 @@ -#ifndef ZINC_H -#define ZINC_H +#pragma once #ifdef KEYBOARD_zinc_reva #include "reva.h" @@ -8,7 +7,4 @@ #include "rev1.h" #endif - #include "quantum.h" - -#endif -- cgit v1.2.3