I have an M0116, and I'd like to map the numpad to F keys by default, and use the locking capslock switch as a numlock instead. Is this possible? If I map that key to FN0 instead of LCAP, will anything bad happen?
I.e. this code:
EDIT: This works! If you have an m0116 or similar (i.e. IIGS or ADB 2) this should work for you too! Save it to keymap_m0116.c and compile with "make KEYMAP=m0116"
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default Layer: plain keymap
* +-------+
* | power |
* +-------+
* |----------------------------------------------------------. ,---------------.
* |ESC| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|End|Mut|
* |-----------------------------------------------------------| |---------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | F7| F8| F9|Vl+|
* |-----------------------------------------------------| | |---------------|
* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | F4| F5| F6|Vl-|
* |-----------------------------------------------------------| |---------------|
* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | F1| F2| F3| |
* |-----------------------------------------------------------| |-----------|Ent|
* | FN0| Alt| Gui| ` | Space | \ |Lef|Rig|Up |Dwn| | F10 | . | |
* `-----------------------------------------------------------' `---------------'
*/
KEYMAP_M0116_ANSI(
PWR,
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS,HOME, END,MUTE,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, F7, F8, F9, VOLU,
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, F4, F5, F6, VOLD,
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, F1, F2, F3,
FN0,LALT,LGUI,GRV, SPC, BSLS,LEFT,RIGHT,DOWN,UP, F10, PDOT,PENT
),
/* Default Layer: plain keymap
* +-------+
* | power |
* +-------+
* ,-----------------------------------------------------------. ,---------------.
* |ESC| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins| = | / | * |
* |-----------------------------------------------------------| |---------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| + |
* |-----------------------------------------------------| | |---------------|
* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| -|
* |-----------------------------------------------------------| |---------------|
* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| |
* |-----------------------------------------------------------| |-----------|Ent|
* | FN0| Alt| Gui| ` | Space | \ |Lef|Rig|Up |Dwn| | 0 | . | |
* `-----------------------------------------------------------' `---------------'
*/
KEYMAP_M0116_ANSI(
PWR,
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, EQL, PSLS,PAST,
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, P7, P8, P9, PMNS,
CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, P1, P2, P3,
FN0,LALT,LGUI,GRV, SPC, BSLS,LEFT,RIGHT,DOWN,UP, P0, PDOT,PENT
),
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1), // Layer activate!
};
edit: hah nope that doesn't work at all. Capslock now gives me this character for some reason: ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ
edit2: oh, I guess it would help if I actually told it what FN0 was supposed to do, huh? Updated code, now it works!!