From: tmk Date: Thu, 2 Mar 2017 02:47:13 +0000 (+0900) Subject: fc660c: Add key mapping X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=fad7ebfc7fa87bbc51bfbec4cc9bce8f26497067;p=max%2Ftmk_keyboard.git fc660c: Add key mapping --- diff --git a/keyboard/fc660c/README.md b/keyboard/fc660c/README.md index cc528471..365cbf7e 100644 --- a/keyboard/fc660c/README.md +++ b/keyboard/fc660c/README.md @@ -37,6 +37,20 @@ Connector + 3.3V interface ``` +Key Matrix +---------- + + | |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |A |B |C |D |E |F | + |----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----|----| + | 0|Q |W |E |Tab |R |U |T |Y |O |P |[ |I |] | |\ |Del | + | 1|1 |2 |3 |Esc |4 |7 |5 |6 |9 |0 |- |8 |= | |BSpc|Ins | + | 2| |LWin|LAlt|LCtl| | | |Spc |RAlt| |RCtl| |Fn |Down|Left|Rght| + | 3| |Z |X |LSft|C |N |V |B |, |. |/ |M |RSft|Up | | | + | 4|A |S |D |Caps|F |J |G |H |L |; |' |K | | |Entr| | + | 5| | | | | | | | | | | | | | | | | + | 6| | | | | | | | | | | | | | | | | + | 7| | | | | | | | | | | | | | | | | + Scan ---- diff --git a/keyboard/fc660c/actionmap.c b/keyboard/fc660c/actionmap.c index adfba3e2..eefbc776 100644 --- a/keyboard/fc660c/actionmap.c +++ b/keyboard/fc660c/actionmap.c @@ -1,6 +1,46 @@ #include "action.h" +#include "actionmap.h" + +#define AMAP( \ + K13, K10, K11, K12, K14, K16, K17, K15, K1B, K18, K19, K1A, K1C, K1E, K1F, \ + K03, K00, K01, K02, K04, K06, K07, K05, K0B, K08, K09, K0A, K0C, K0E, K0F, \ + K43, K40, K41, K42, K44, K46, K47, K45, K4B, K48, K49, K4A, K4E, \ + K33, K31, K32, K34, K36, K37, K35, K3B, K38, K39, K3A, K3C, K3D, \ + K23, K21, K22, K27, K28, K2A, K2C, K2E, K2D, K2F \ +) { \ + { AC_##K00, AC_##K01, AC_##K02, AC_##K03, AC_##K04, AC_##K05, AC_##K06, AC_##K07, \ + AC_##K08, AC_##K09, AC_##K0A, AC_##K0B, AC_##K0C, AC_NO, AC_##K0E, AC_##K0F }, \ + { AC_##K10, AC_##K11, AC_##K12, AC_##K13, AC_##K14, AC_##K15, AC_##K16, AC_##K17, \ + AC_##K18, AC_##K19, AC_##K1A, AC_##K1B, AC_##K1C, AC_NO, AC_##K1E, AC_##K1F }, \ + { AC_NO, AC_##K21, AC_##K22, AC_##K23, AC_NO, AC_NO, AC_NO, AC_##K27, \ + AC_##K28, AC_NO, AC_##K2A, AC_NO, AC_##K2C, AC_##K2D, AC_##K2E, AC_##K2F }, \ + { AC_NO, AC_##K31, AC_##K32, AC_##K33, AC_##K34, AC_##K35, AC_##K36, AC_##K37, \ + AC_##K38, AC_##K39, AC_##K3A, AC_##K3B, AC_##K3C, AC_##K3D, AC_NO, AC_NO }, \ + { AC_##K40, AC_##K41, AC_##K42, AC_##K43, AC_##K44, AC_##K45, AC_##K46, AC_##K47, \ + AC_##K48, AC_##K49, AC_##K4A, AC_##K4B, AC_NO, AC_NO, AC_##K4E, AC_NO }, \ + { AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, \ + AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO }, \ + { AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, \ + AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO }, \ + { AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, \ + AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO, AC_NO } \ +} + +#define AC_L1 ACTION_LAYER_MOMENTARY(1) const action_t actionmaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - [0] = {}, + [0] = AMAP( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, \ + CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \ + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT,UP, \ + LCTL,LGUI,LALT, SPC, RALT,RCTL,L1, LEFT,DOWN,RGHT \ + ), + [1] = AMAP( \ + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS,TRNS,TRNS, TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGUP,TRNS,TRNS, TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,END, PGDN,TRNS, TRNS,PGUP, \ + TRNS,TRNS,TRNS, TRNS, TRNS,APP, TRNS, HOME,PGDN,END \ + ) }; -