4

I am running Ubuntu 17.04 on a 2015 Macbook Pro. On the keyboard the Tilde~/Backtick</kbd> key is mapped to<and>`. I have found a few fixes for this, but have found no way to make it permanent.

I have found that the command

echo 0 > sys/module/hid_apple/parameters/iso_layout

corrects the issue, as does

setxkbmap -option apple:badmap

My issue is getting either of these commands to run inside of a script at startup/login so that I am not having to manually run it every time I want it fixed. I have tried using /etc/rc.local but in Ubuntu 17.04 when trying to enable it with systemctl I get no results. I will take anything that will work. Thanks guys!

0

2 Answers 2

7

The standard way to make changes to /sys at boot is to use sysfsutils. The package may not be installed by default, so first do:

sudo apt install sysfsutils

now edit the file /etc/sysfs.conf, for example:

sudo nano /etc/sysfs.conf

and add this line to the end of it, then save, exit, and reboot:

module/hid_apple/parameters/iso_layout = 0

This will do the same as your echo command.

1
  • @Castor_RG great to hear that :) it's a pleasure
    – Zanna
    May 18, 2017 at 3:53
1

The answer from Zanna wasn't working for me, but this answer was. So in my case I had to create /etc/modprobe.d/hid_apple.conf and set its contents to:

options hid_apple iso_layout=0

I also wanted the F keys to work like regular F1-F12 keys so I also added

options hid_apple fnmode=2

This worked after rebooting my computer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .