summaryrefslogtreecommitdiff
path: root/keyboards/handwired/magicforce61/keymaps
diff options
context:
space:
mode:
authorFabian Topfstedt <topfstedt@schneevonmorgen.com>2017-07-20 08:22:44 +0200
committerFabian Topfstedt <topfstedt@schneevonmorgen.com>2017-07-20 08:22:44 +0200
commitee43856ff7ba37ea89d1a8a4700efba4e4f69571 (patch)
treeb0ed5b538396b0b2b027e69ad8ceac443c067c79 /keyboards/handwired/magicforce61/keymaps
parent99b6e918eab31d4f53cabc04a995da945335ac7f (diff)
parent14c5160b1a94d5dc416002791b3c207ba0dca789 (diff)
Merge https://github.com/qmk/qmk_firmware
Diffstat (limited to 'keyboards/handwired/magicforce61/keymaps')
-rw-r--r--keyboards/handwired/magicforce61/keymaps/default/keymap.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/keyboards/handwired/magicforce61/keymaps/default/keymap.c b/keyboards/handwired/magicforce61/keymaps/default/keymap.c
new file mode 100644
index 0000000000..9559be5d21
--- /dev/null
+++ b/keyboards/handwired/magicforce61/keymaps/default/keymap.c
@@ -0,0 +1,69 @@
+#include "magicforce61.h"
+
+#define _QWERTY 0
+#define _FN1 1
+#define _FN2 2
+#define KC_ KC_TRNS
+#define KC_X0 LT(_FN2, KC_GRV)
+#define KC_X1 MO(_FN1)
+#define KC_NAV_ESC LT(_FN1, KC_ESC)
+#define KC_GUI MAGIC_UNNO_GUI
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
+ GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC ,
+ /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| */
+ TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS ,
+ /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| */
+ NAV_ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
+ /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| */
+ LSPO , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSPC ,
+ /*|---------`----`----`----`----`----`----`----`----`----`----`-------------. */
+ LCTL , RGUI ,LALT , SPACE , X1 ,RALT ,RCTL , X1
+ /*`-----+-----+-----+------------------------------+------+-----+-----' ANY */
+ ),
+
+ [_FN1] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
+ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC ,
+ /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */
+ , , UP , , , , , ,INS ,PSCR, , , , ,
+ /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */
+ ,LEFT,DOWN,RGHT, , , , PGDN , PGUP , , , , ,
+ /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */
+ , , , , , ,VOLD,VOLU,MUTE, , , ,
+ /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */
+ , , , , , , , MPLY
+ /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */
+ ),
+
+ [_FN2] = KEYMAP(
+ /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */
+ GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC ,
+ /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */
+ , , , , , , , 7 , 8 , 9 , , , , ,
+ /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */
+ , , , , , , , 4 , 5 , 6 , , , ,
+ /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */
+ , , , , , , 0 , 1 , 2 , 3 , , ,
+ /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */
+ , , , , , , ,
+ /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */
+ )
+};
+
+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;
+};