2

I'm on a MBP coming from OSX. I'd like to switch Super and Ctrl in all scenarios. I know it's very easy and requires installing nothing because I did it last night while trying out this distro, but now I can't find the like I had followed that explained how to do it.

How can I switch Super and Ctrl permanently?

4

I don't like the options involving Autokey and others. For me, I found the best solution in Tweak Tool. You can install Tweak Tool in eOS's AppCenter. Under the Typing section of TweakTool you can choose Alt/Win key behavior -> Alt is swapped with Win.

You can also do Ctrl key position -> Swap Left Win key with Left Ctrl key.

I have an operating system agnostic keyboard where I swapped the Super key (aka the ⌘ key or Win key) with the Alt key to look like the Mac keyboard. So far this solution has worked ~ok~ for me, but I would definitely prefer a real solution from eOS since it is advertised as a Mac replacement.

| improve this answer | |
  • Tweak Tool really save my life. I use "Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt" under Ctrl key position – Eric Fong Jul 25 '18 at 14:35
1

sudo nano /usr/share/X11/xkb/symbols/pc

Switch Control and Super, it'll look something like this

...key <NMLK> {        [ Num_Lock              ]       };

key <LFSH> {        [ Shift_L               ]       };
key <LCTL> {        [ Super_L               ]       };
key <LWIN> {        [ Control_L             ]       };

key <RTSH> {        [ Shift_R               ]       };
key <RCTL> {        [ Super_R               ]       };
key <RWIN> {        [ Control_R             ]       };
key <MENU> {        [ Menu ..... 

Found it here https://askubuntu.com/questions/131900/how-do-i-switch-the-command-key-and-control-key-on-a-macbook-pro#158014

| improve this answer | |
0

Kinto swaps the keys the way you want, and I am the author of it. https://github.com/rbreaves/kinto

On this example below it is from when I was mapping the Cmd location to Super while under the terminal - and to avoid writing custom xkb files. Kinto actually does use Ctrl+Shift in the Cmd key location for the terminals now.. but I use some custom symbols and types files for setxkbmap and xkbcomp to accomplish it.. again too much to post here and have it all make sense, because you'd still need the rest of my code to have it run right any ways.

# permanent apple keyboard keyswap
echo "options hid_apple swap_opt_cmd=1" | sudo tee -a /etc/modprobe.d/hid_apple.conf
update-initramfs -u -k all

# Temporary & instant apple keyboard keyswap
echo '1' | sudo tee -a /sys/module/hid_apple/parameters/swap_opt_cmd

# Windows and Mac keyboards - GUI (Physical Alt is Ctrl, Physical Super is Alt, Physical Ctrl is Super)
setxkbmap -option;setxkbmap -option altwin:ctrl_alt_win

# Windows and Mac keyboards - Terminal Apps (Physical Alt is Super, Physical Super is Alt, Physical Ctrl is Ctrl)
setxkbmap -option;setxkbmap -option altwin:swap_alt_win

# If the hid_apple driver is not loaded for Apple keyboards, which can be found out
# by the lsmod command then the above setxkbmap commands will not work
# Use the following commands for Apple style keyboards without an hid_apple driver
#
# Note: this could also apply to hid_apple driver as well 
# if this option is set to 0 inside swap_opt_cmd
#
lsmod | grep hid_apple

# Apple keyboard without hid_apple - GUI
setxkbmap -option;setxkbmap -option ctrl:swap_lwin_lctl,ctrl:swap_rwin_rctl

# Apple keyboard without hid_apple - Terminal
setxkbmap -option;setxkbmap -option altwin:alt_super_win

#
# If you want a systemd service and bash script to help toggle between
# GUI and Terminal applications then look at project Kinto.
# https://github.com/rbreaves/kinto
#
# Note: The above may not work for Chromebooks running Linux, please look
# at project Kinto for that.
#
# If anyone would like to contribute to the project then please do!
#
| improve this answer | |
  • Thank you for posting this. – Seph Reed Feb 14 at 3:38
  • Unfortunately if I go around these forums, specifically askubuntu, talking about it too much I risk getting banned for resurrecting old threads it appears. It's not that you "resurrected" old threads, it's that you keep promoting your website. One post is fine, 9 is not. – Machavity Feb 14 at 20:01
  • Thank you for explaining that, while self promotion for the sake of self promotion is stupid, I felt it'd be easier for people to remember than posting the full github link every time (what I posted just redirects to the github project page). I also understand the concerns of needlessly providing links to solutions that can be solved with a few lines of codes or clear examples vs something that could eventually break. I really do just want to let individuals know there's an actual solution for it now. Maybe I will get it up into a repo soon & it won't look like spam to the bots. – R Ben R Feb 14 at 20:45
  • Looking for more guidance I finally pulled something up that helps clarify things further as I have been genuinely confused as to what the limitations exactly are in providing links at all. Granted "excessive" is kinda vague tbh. I'll go through a few or a dozen posts and not think much about it, but I guess I will just have to slow down on answering this sort of question in the future. Already focusing on more recent posts vs old ones and making it clear that I am the author. charcoal-se.org/smokey/Feedback-Guidance#disclosed-affiliation – R Ben R Feb 14 at 21:01
  • The authoritative resource - on every site in the Stack Exchange network - is /help/promotion. – tripleee Feb 17 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.