xmodmap is frequently used to rebind keyboard modifiers (eg. use the caps lock key as a control key instead), but leaves the user with no way of ensuring the now untoggleable state. for example, assume the following configuration script: setxkbmap -layout us xmodmap -e 'clear Lock' -e 'keysym Caps_Lock = Control_L' -e 'add Control = Control_L' this is racy against the use of the caps lock key -- when pressed between the calls (or in a startup situation, before .Xmodmap is read), caps lock is on, without any way for the user to turn it off again. given that xmodmap already takes care not to get into odd situation with pressed keys ('please release the following keys within 2 seconds'), i think that equal care should be taken with modes. my suggested behavior is that at least the `clear` command (maybe even the `remove` of the last occurrence of a key) should (in sequence of my decreasing preference, possibly in combination) * inspect the `clear` command for an additional argument that specifies whether the associated mode should stay "on" or "off" (defaulting to "off"?) * warn the user that a functionality is removed without providing a way of setting it in an indeterminate state, hinting at one of the below * provide an explicit xmodmap command to set the lock state (a la XkbLockModifiers) * reference an external command to be used after invoking xmodmap to set the states
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xmodmap/issues/1.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.