summaryrefslogtreecommitdiff
path: root/keyboards/viterbi/keymaps/dwallace
diff options
context:
space:
mode:
authorDanny Nguyen <danny@keeb.io>2017-08-15 16:28:19 -0400
committerJack Humbert <jack.humb@gmail.com>2017-09-21 09:40:13 -0400
commit92b74e2d3612884237ecbdbea18bc5b70d859234 (patch)
treee63d916a288c5e5b478b83f4b2374ccea77e2ebd /keyboards/viterbi/keymaps/dwallace
parent72e99391439c1d8abd0aed112b06982b94be03c6 (diff)
downloadqmk_firmware-92b74e2d3612884237ecbdbea18bc5b70d859234.tar.gz
qmk_firmware-92b74e2d3612884237ecbdbea18bc5b70d859234.zip
Rename cloned Nyquist files to Viterbi, create temporary keymaps
Add WIP keymap for dwallace
Diffstat (limited to 'keyboards/viterbi/keymaps/dwallace')
-rw-r--r--keyboards/viterbi/keymaps/dwallace/Makefile5
-rw-r--r--keyboards/viterbi/keymaps/dwallace/config.h43
-rw-r--r--keyboards/viterbi/keymaps/dwallace/keymap.c83
3 files changed, 131 insertions, 0 deletions
diff --git a/keyboards/viterbi/keymaps/dwallace/Makefile b/keyboards/viterbi/keymaps/dwallace/Makefile
new file mode 100644
index 0000000000..1e57612788
--- /dev/null
+++ b/keyboards/viterbi/keymaps/dwallace/Makefile
@@ -0,0 +1,5 @@
+RGBLIGHT_ENABLE = yes
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
diff --git a/keyboards/viterbi/keymaps/dwallace/config.h b/keyboards/viterbi/keymaps/dwallace/config.h
new file mode 100644
index 0000000000..558ae0627e
--- /dev/null
+++ b/keyboards/viterbi/keymaps/dwallace/config.h
@@ -0,0 +1,43 @@
+/*
+Copyright 2017 Danny Nguyen <danny@hexwire.com>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define _MASTER_RIGHT
+// #define EE_HANDS
+
+#define TAPPING_TERM 150
+
+#undef RGBLED_NUM
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+
+#endif
diff --git a/keyboards/viterbi/keymaps/dwallace/keymap.c b/keyboards/viterbi/keymaps/dwallace/keymap.c
new file mode 100644
index 0000000000..c884c8a374
--- /dev/null
+++ b/keyboards/viterbi/keymaps/dwallace/keymap.c
@@ -0,0 +1,83 @@
+#include "viterbi.h"
+#include "action_layer.h"
+#include "eeconfig.h"
+
+extern keymap_config_t keymap_config;
+
+#define _QWERTY 0
+#define _FN 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+ FN,
+};
+
+#define KC_ KC_TRNS
+#define _______ KC_TRNS
+
+#define KC_SWIN LGUI(KC_TILD) // Switch between windows
+#define KC_SAPP LGUI(KC_TAB) // Switch between applications
+#define KC_FN1 MO(_FN)
+#define KC_LCAG LCAG(KC_NO)
+#define KC_RVAD RGB_VAD
+#define KC_RVAI RGB_VAI
+#define KC_CLRM KC_NO // TODO: Clear sticky modifiers
+#define KC_RST RESET
+
+// TODO: Make modifiers sticky
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_QWERTY] = KC_KEYMAP(
+ //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
+ GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL ,BSPC,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ TAB , Q , W , E , R , T ,LBRC, Y , U , I , O , P ,BSLS,PGUP,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ ESC , A , S , D , F , G ,RBRC, H , J , K , L ,SCLN,QUOT,ENT ,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ LSFT, Z , X , C , V , B ,SWIN, N , M ,COMM,DOT , UP ,SLSH,RSFT,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ LCTL,LCAG,LALT,LGUI,SPC ,CLRM,SAPP, FN1 ,SPC ,RGUI,LEFT,DOWN,RGHT,PGDN
+ //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
+ ),
+
+ [_FN] = KC_KEYMAP(
+ //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
+ , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , ,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ , , , ,RST , , , , , , , , , ,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ , , , , , , , , ,RVAD,RVAI, , , ,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ , , , , , , , ,MUTE,VOLD,VOLU, , , ,
+ //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
+ , , , , , , , , , , , , ,
+ //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----'
+ )
+
+};
+
+#ifdef AUDIO_ENABLE
+float tone_qwerty[][2] = SONG(QWERTY_SOUND);
+#endif
+
+void persistent_default_layer_set(uint16_t default_layer) {
+ eeconfig_update_default_layer(default_layer);
+ default_layer_set(default_layer);
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ #ifdef AUDIO_ENABLE
+ PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
+ #endif
+ persistent_default_layer_set(1UL<<_QWERTY);
+ }
+ return false;
+ break;
+ }
+ return true;
+}