Opened 5 years ago

Closed 5 years ago

#9142 closed enhancement (fixed)

Keyboard modifiers setting lost after reboot

Reported by: jammi Owned by: siarzhuk
Priority: low Milestone: R1
Component: Preferences/Keymap Version: R1/alpha4
Keywords: Cc: o@…
Blocked By: #9198 Blocking:
Has a Patch: no Platform: All


File -> Set Modifier Keys.. as well as just dragging Alt vs Cmd on the mini-keyboard setting reverts to default upon boot. It's very annoying for using testing, if you are accustomed to Cmd being Cmd, not Alt. If you save your custom layout, it becomes re-enabled after reboot after you open the Keymap preferences, but not before.

Change History (9)

comment:1 follow-up: Changed 5 years ago by siarzhuk

Do you using KeymapSwitcher configured and installed in the Deskbar?

comment:2 in reply to: ↑ 1 Changed 5 years ago by jammi

Replying to siarzhuk:

Do you using KeymapSwitcher configured and installed in the Deskbar?

Yes, it's installed in the Deskbar.

comment:3 Changed 5 years ago by jammi

Ok, now I get it. I think it should be more clear on this, or having the mapping stick to the keyboard instead of the layout. I wouldn't have figured this out on my own.

comment:4 Changed 5 years ago by jammi

  • Cc o@… added
  • Priority changed from high to low
  • Type changed from bug to enhancement

comment:5 Changed 5 years ago by siarzhuk

  • Owner changed from axeld to siarzhuk
  • Status changed from new to assigned

Thanks for confirmation. That is known issue using the KeymapSwitcher. The problem is BeOS-Era hack that stores Alt-Ctrl swapping settings inside of the currently selected keymap file (~/config/settings/Key_map) KeymapSwitcher overwrites this file every time it have to change keymap. At every system start it reset keymap into the first one in the list of configured - thats why you observe this reset at every reboot.

Besides of fact that sooner or later Keymap Switcher will be replaced with more convenient and well-designed tool I see following ways to fix this issue at the moment:

a) Fix KeymapSwitcher to honor the "Cmd-swap flag" during overwriting the Key_map file; b) Modify keymaps handling in the Haiku to move mentioned Cmd-swap settings into the Key_map file attributes. That includes of course fixing KeymapSwitcher to use these attributes. The attribute way just less fragile than direct writing into the Key_map file;

Any opinion, colleagues?

comment:6 Changed 5 years ago by jammi

My work-around was like this: I saved both modified keyboard layouts as custom, removed the originals from KeymapSwitcher and added the custom ones. Not optimal, and unless you understand what happens (well described by siarzhuk), it's just acting WTF-y, more or less a conflict between KeymapSwitcher vs custom layouts.

comment:7 Changed 5 years ago by siarzhuk

I have implemented workaround with preserving "Cmd-Ctrl swap" settings on overwriting Key_map file. Please check the version from here:

The version is from 15 November. Please keep in mind that compiler version gcc2/gcc4 should correspond to your system.

Good luck!

comment:8 Changed 5 years ago by siarzhuk

  • Blocked By 9198 added

comment:9 Changed 5 years ago by siarzhuk

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in hrev45188.

Note: See TracTickets for help on using tickets.