pop-os / cosmic-settings

COSMIC Settings
GNU General Public License v3.0
151 stars 81 forks source link

[FR] Add settings to remap/adjust keyboard keys #383

Open MikhailTNY opened 2 months ago

MikhailTNY commented 2 months ago

Not sure if this is permitted but here's a screenshot of Gnome Tweaks, which I used on PopOS to remap certain keys on my keyboard to match my preferences. It would be awesome if this can be either integrated or available via terminal on Cosmic DE.

image

Use case: It's easier for me to use common shortcuts, control +e/s/f etc with my thumb instead of my weaker pinky and avoiding the need to move my wrist.

Alexis-Lapierre commented 1 month ago

Theses settings looks like they are already supported by the underlying settings deamon, but it currently require to edit the config file manually.

The relevant config file is situated on your system at ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config

In my use case I use:

(
    rules: "",
    model: "",
    layout: "us",
    variant: "",
    options: Some("caps:swapescape"),
    repeat_delay: 350,
    repeat_rate: 35,
)

For yours it should be: options: Some("ctrl:swap_lalt_lctl_lwin") instead of my caps:swapescape.

(You can find more available options on the /usr/share/X11/xkb/rules/base.lst file, under the option section)

Alexis-Lapierre commented 1 month ago

So the only missing feature is being able to set this up from the GUI settings app, which is easier than implementing everything from scratch.

nilesjohnson commented 3 weeks ago

I was looking for key remap and also key repeat settings; looks like they're both here. Add my vote for GUI access to these.

shoenig commented 3 weeks ago

Just noting for anyone like me looking for how to configure Caps Lock as a Ctrl key:

cat ~/.config/cosmic/com.system76.CosmicComp/v1/xkb_config
(
    rules: "",
    model: "",
    layout: "us",
    variant: "",
    options: Some("ctrl:nocaps"),
    repeat_delay: 600,
    repeat_rate: 25,
)