1
0
tmk_keyboard/keyboard/gh60/keymap_poker_set.c

83 lines
4.7 KiB
C
Raw Normal View History

2013-11-21 07:32:45 +00:00
#include "keymap_common.h"
2013-02-20 01:40:07 +00:00
// Poker fix with set(state transition)
// Fn + Esc = `
// Fn + {left, down, up, right} = {home, pgdown, pgup, end}
2013-11-21 07:32:45 +00:00
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
2013-04-04 16:39:17 +00:00
/* 0: qwerty */
2013-02-12 08:08:51 +00:00
KEYMAP_ANSI(
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, \
2013-02-15 06:24:50 +00:00
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \
2013-02-12 08:08:51 +00:00
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, \
LCTL,LGUI,LALT, SPC, FN0, RGUI,APP, RCTL),
2013-04-04 16:39:17 +00:00
/* 1: Poker with Arrow */
2013-02-12 08:08:51 +00:00
KEYMAP_ANSI(
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,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, UP, \
TRNS,TRNS,TRNS, TRNS, FN1, LEFT,DOWN,RGHT),
2013-04-04 16:39:17 +00:00
/* 2: Poker with Esc */
2013-02-12 08:08:51 +00:00
KEYMAP_ANSI(
ESC, 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,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, FN2, TRNS,TRNS,TRNS),
2013-04-04 16:39:17 +00:00
/* 3: Poker with Arrow and Esc */
KEYMAP_ANSI(
ESC, 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,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, UP, \
TRNS,TRNS,TRNS, TRNS, FN3, LEFT,DOWN,RGHT),
2013-04-04 16:39:17 +00:00
/* 4: Poker Fn'd */
2013-02-12 08:08:51 +00:00
KEYMAP_ANSI(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 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,DEL, TRNS,WHOM,MUTE,VOLU,VOLD,TRNS,PGUP,PGDN,DEL, TRNS, \
TRNS,TRNS,TRNS, FN5, FN4, TRNS,TRNS,TRNS),
2013-04-04 16:39:17 +00:00
/* 5: Poker Fn'd arrow */
2013-02-12 08:08:51 +00:00
KEYMAP_ANSI(
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 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,DEL, TRNS,WHOM,MUTE,VOLU,VOLD,TRNS,PGUP,PGDN,DEL, PGUP, \
TRNS,TRNS,TRNS, FN4, FN5, HOME,PGDN,END),
2013-04-04 16:39:17 +00:00
/* 6: Poker Fn'd Esc */
2013-02-12 08:08:51 +00:00
KEYMAP_ANSI(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 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, \
2013-02-12 08:08:51 +00:00
TRNS,DEL, TRNS,WHOM,MUTE,VOLU,VOLD,TRNS,PGUP,PGDN,DEL, TRNS, \
TRNS,TRNS,TRNS, FN7, FN6, TRNS,TRNS,TRNS),
2013-04-04 16:39:17 +00:00
/* 7: Poker Fn'd Arrow + Esc */
2013-02-14 06:34:33 +00:00
KEYMAP_ANSI(
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, 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,DEL, TRNS,WHOM,MUTE,VOLU,VOLD,TRNS,PGUP,PGDN,DEL, PGUP, \
TRNS,TRNS,TRNS, FN6, FN7, HOME,PGDN,END),
2013-02-12 08:08:51 +00:00
};
/*
* Fn action definition
*/
2013-11-21 07:32:45 +00:00
const uint16_t PROGMEM fn_actions[] = {
2013-02-12 08:08:51 +00:00
/* Poker Layout */
2013-04-04 16:39:17 +00:00
[0] = ACTION_LAYER_SET(4, ON_PRESS), // FN0 move to Fn'd when press
[1] = ACTION_LAYER_SET(5, ON_PRESS), // FN1 move to Fn'd arrow when press
[2] = ACTION_LAYER_SET(6, ON_PRESS), // FN2 move to Fn'd Esc when press
[3] = ACTION_LAYER_SET(7, ON_PRESS), // FN3 move to Fn'd arrow + Esc when press
2013-02-12 08:08:51 +00:00
2013-04-04 16:39:17 +00:00
//[4] = ACTION_LAYER_CLEAR(ON_RELEASE), // FN4 clear overlay when release
[4] = ACTION_LAYER_SET(0, ON_RELEASE), // FN4 clear overlay when release
[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
2013-04-04 16:39:17 +00:00
[8] = ACTION_MODS_KEY(MOD_RCTL|MOD_RSFT, KC_ESC), // FN8 Task(RControl,RShift+Esc)
};