You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two keymaps that I want to switch between (one has a Mac layout for cmd/alt and the other has a windows layout for cmd/alt). Ideally I want the chosen default keymap to persist when the keyboard loses power.
DF(layer) - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the set_single_persistent_default_layer function inside of process_record_user.)
I added keycodes to activate my keymaps and called set_single_persistent_default_layer inside of process_record_user as shown below:
boolprocess_record_user(uint16_tkeycode, keyrecord_t*record) {
staticuint32_tkey_timer;
switch (keycode) {
caseWIN_KEY:
if (record->event.pressed) {
set_single_persistent_default_layer(WINDOWS_KEYMAP);
}
return false;
caseMAC_KEY:
if (record->event.pressed) {
set_single_persistent_default_layer(MAC_KEYMAP);
}
return false;
// code below here not included in this snippet
This successfully switches the keymaps, but when I disconnect power, it reverts to the default keymap at index 0 (the Windows keymap in my case). Given the documentation, I was under the impression that set_single_persistent_default_layer would cause the selected default layer to persist even if the keyboard loses power. Is the documentation incorrect?
System Information
Keyboard: Drop CTRL
Revision (if applicable):
Operating system: macOS Catalina 10.15.3
AVR GCC version: 8.3.0
ARM GCC version: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
QMK Firmware version: 0.8.58
Any keyboard related software installed? No
The text was updated successfully, but these errors were encountered:
The Massdrop boards have no non-volatile storage at this point, so this is a known issue.
We're waiting for Massdrop/mdloader#16 to go through before we can consider adding support for it, under #6068.
Describe the Bug
I have two keymaps that I want to switch between (one has a Mac layout for cmd/alt and the other has a windows layout for cmd/alt). Ideally I want the chosen default keymap to persist when the keyboard loses power.
The documentation on switching and toggling layers says:
I added keycodes to activate my keymaps and called
set_single_persistent_default_layer
inside ofprocess_record_user
as shown below:This successfully switches the keymaps, but when I disconnect power, it reverts to the default keymap at index 0 (the Windows keymap in my case). Given the documentation, I was under the impression that
set_single_persistent_default_layer
would cause the selected default layer to persist even if the keyboard loses power. Is the documentation incorrect?System Information
The text was updated successfully, but these errors were encountered: