qmk / qmk_configurator

The QMK Configurator
http://config.qmk.fm
689 stars 343 forks source link

Keycodes for Ctrl and OS are swapped. #479

Closed AffectionateNouns closed 5 years ago

AffectionateNouns commented 5 years ago

I don't know for sure if it's just for the DZ65RGB or if it exists on other boards, but the L_CRTL and L_OS keycodes are swapped, as well as R_CTRL and R_OS. Meaning if you select L_CTRL for the bottom leftmost key on the board (where Ctrl would normally be) it sets that to be your OS key.

yanfali commented 5 years ago

@noroadsleft ?

noroadsleft commented 5 years ago

This is actually the combination of a few different issues, but the interim cause is a recent commit to QMK Firmware that exposes a long-standing weakness in how QMK Firmware uses EEPROM (meaning this isn't a Configurator bug).

The data for storing keyboard settings across power cycles (unplugging/replugging the keyboard, installing new firmware, etc.) is stored in a section of space called EEPROM. Because QMK's EEPROM system isn't version controlled, changes to the EEPROM structure can lead to unexpected behavior. QMK doesn't currently have the capability to migrate settings across changes to the EEPROM structure. Because of this, when a new setting is being stored in EEPROM, the place on the keyboard's microcontroller where the new setting will be saved may already have data on it, and that data may pre-configure the new setting when QMK starts up. A recent commit added the capability to swap the Ctrl and OS keys in real time, and persist it across power cycle events (same as the Alt/OS or Caps Lock/Ctrl key swaps). The lack of version controlled EEPROM means the space where new QMK Firmware files saves the setting for this had a non-zero value in it, which made QMK believe you had enabled the Ctrl/OS swap.

The interim solution to this is to reset your EEPROM. QMK Toolbox may be able to do this (I'm not sure for the DZ65RGB), but Configurator has a keycode for this labeled EEPROM Reset on the Quantum tab, next to the normal Reset. Program this key in your keymap, and program a different key to CG_NORM (use the Any key feature on the Quantum tab), then compile and flash the firmware. Pressing the EEPROM Reset key should fix this, but if it doesn't, press the CG_NORM key as well.

stanrc85 commented 5 years ago

I'm using an HS60v2 (ARM) and the EEPROM reset (EEP_RST) isn't working to resolve the issue. I've tried adding CG_NORM to the keymap and hitting that but it didn't seem to have any affect either.

Update: Disregard, CG_NORM resolved the issue.

Update2: Board resets to CG swapped on every boot, when I hit CG_NORM it works but on next boot it seems to reset eeprom (all the RGB is back to default).

drashna commented 5 years ago

@stanrc85 for EEP_RST, did you unplug the board and plug it back in?

Also, this is for the HS60v2, do you have VIA enabled on it? if so, that is the problem. It's getting reset by VIA.....

https://github.com/qmk/qmk_firmware/blob/master/keyboards/hs60/v2/config.h#L138-L144

increment the addresses by 2, and it should fix it.

stanrc85 commented 5 years ago

Yeah after doing the eep_rst I have to unplug the board. I don't use VIA but I think it is enabled on my build. I'll try to increase the address later and let you know. Thanks!

drashna commented 5 years ago

I checked the address, it does collide. So it will need to be changed

stanrc85 commented 5 years ago

The magic or version addr or both?

On Fri, Aug 23, 2019, 2:43 PM Drashna Jaelre notifications@github.com wrote:

I checked the address, it does collide. So it will need to be changed

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qmk/qmk_configurator/issues/479?email_source=notifications&email_token=ALG4AKEVEJM7KUNTCJFSKI3QGAVWTA5CNFSM4IOZTILKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5BAUXQ#issuecomment-524421726, or mute the thread https://github.com/notifications/unsubscribe-auth/ALG4AKDW4JJ5UMWCJOHATVDQGAVWTANCNFSM4IOZTILA .

drashna commented 5 years ago

See the other thread.

But basically, all of the addresses.

stanrc85 commented 5 years ago

That resolved it, thanks!

yanfali commented 5 years ago

ok, closing this as it's an issue with firmware and has now been patched.

resuna commented 1 month ago

On my Y&R 6095 I had to hold down the ESC key while plugging it in to get the EEPROM reset, none of the keyboard mapping through special keys to RESET the board worked. Apparently Y&R Studios hasn't updated the firmware they ship in a while.