qmk_firmware
qmk_firmware copied to clipboard
[Feature Request] provide working ISO default layout
Feature Request Type
- [ ] Core functionality
- [x] Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
- [ ] Alteration (enhancement/optimization) of existing feature(s)
- [ ] New behavior
Description
This is related to me having an Anne Pro 2 with scandinavian keys. Only makes sense if support for iso version is also added in AnnePro2-Tools: https://github.com/OpenAnnePro/AnnePro2-Tools/issues/15
Anyway, Given that iso anne-pro-2's can be flashed, the default layout does not work correctly. The one thing I found immediately is that Enter
and single quote '
are swapped. There may be other issues but this is the only I found.
To fix it, I copied a default layout and changed the base layer like so: the other layers inherit the relevant keys so they did not need changes.
// Key symbols are based on QMK. Use them to remap your keyboard
/*
* Layer _BASE_LAYER
* ,-----------------------------------------------------------------------------------------.
* | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |
* |-----------------------------------------------------------------------------------------+
* | Tab | q | w | e | r | t | y | u | i | o | p | [ | ] | Enter |
* |---------------------------------------------------------------------------------\ +
* | Caps | a | s | d | f | g | h | j | k | l | ; | ' | # | |
* |-----------------------------------------------------------------------------------------+
* | Shift | z | x | c | v | b | n | m | , | . | / | Shift |
* |-----------------------------------------------------------------------------------------+
* | Ctrl | L1 | Alt | space | Alt | FN1 | FN2 | Ctrl |
* \-----------------------------------------------------------------------------------------/
* Layer TAP in _BASE_LAYER
* ,-----------------------------------------------------------------------------------------.
* | | | | | | | | | | | | | | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | | | | | | | |
* |---------------------------------------------------------------------------------\ +
* | | | | | | | | | | | | | | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | | | | | UP |
* |-----------------------------------------------------------------------------------------+
* | | | | | | LEFT | DOWN | RIGHT |
* \-----------------------------------------------------------------------------------------/
*/
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE_LAYER] = KEYMAP( /* Base */
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT,
LT(_FN1_LAYER,KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_UP),
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LT(_FN1_LAYER,KC_LEFT), LT(_FN2_LAYER,KC_DOWN), RCTL_T(KC_RGHT)
),
I am not sure if this is 100% correct. Seems to work but this is my first contact with keyboard firmware so I hope someone who knows a bit more about the key codes can make a quality PR.
@rompetroll Have you flashed your board? I have bought a AP2 ISO (se) today and I’m planning to flash QMK to it as soon as i get it. There are example keymaps for ISO in the repository, have you tried using that? If/when I get it working I can make a PR for it as I’m somewhat familliar with C.
@JockeKv flashing works with adjusted USB device codes in annepro2-tools (https://github.com/OpenAnnePro/AnnePro2-Tools/issues/15). RGB is disabled by this though, and flashing shine did nothing in my case. Did not investigate the lighting issue further since it is not important to me. I did not try standard iso layouts either.
@rompetroll just an update on this. I got the keyboard yesterday and have managed to get the keymap fully working. It's essentially just creating a new keymap definition (the KEYMAP macro) and then use it in the keymap.c keymap. The only thing I did is basically adding the K31 key to the layout. I did not use this repo though, I used the qmk one (which this is forked from) so there may be some other differences. I am working on the LED issue (with some excellent help from the Anne Pro Dev discord channel) for now and I'll probably make a PR once I get everything working.