I'm using a mac keyboard with french mapping but 2 keys are inverted. I found a command that reverses them to find the correct keyboard configuration. xmodmap -e 'keycode 94=at numbersign periodcentered Ydiaeresis' -e 'keycode 49=less greater VoidSymbol VoidSymbol'
But this doesn't work. The command seems to be not executes as the 2 keys remains in the wrong configuration. If I execute the command from the terminal after startup everything's back to normal.
Can anyone please help me to execute this command at OS startup?
Instead of using a script, why not just add it to your ~.profile (Tap ctl+h to reveal system files "hidden" in Home Directory) so it runs as soon as you login? echo "xmodmap -e 'keycode 94=at numbersign periodcentered Ydiaeresis' -e 'keycode 49=less greater VoidSymbol VoidSymbol'
kinda hijacking now , but saw this thread and reminded me of a problem i had while back with keyboard backlight ( still not solved cause wasn't bothered ) , then tried what Aravisian said in this topic ,and add command in ~.profile rather than .bashrc like i tried before and didn't work ...
now it's working perfectly !
as soon as i log in , i can toggle the keyboard light on/off with Shift+Scroll Lock like it's supose to work
PS : wanted to go back to old topic to post the solution for me , but topic closed ...
Hi,
Thanks a lot but I doesn't work for me.
I added the command to the ~.profil but it seems not running because the 2 keyboard keys remains at the wrong place.
You're right @14nd, when I run the command in terminal the keys are working correctly then but on reboot it's back to being wrong. If I log out/in it's still right.
as far as i can see if you go to .profile folder under home profile you get the same file as if you would run gedit ~/.profile.
if you run gedit ~.profile , (that's incorrect yes) then you get to some other folder with nothing in ( on my PC )
Using the Startup Applications Preferences from ZorinOS, I added a startup program to test. Here is the command: gnome-terminal -- sh -c '/bin/date >> /home/famille/.test.txt'
I works. Each time the system boot, the date & time are added to the test.txt file. The startup config is good.
I tried something similar for my keyboard settings: /usr/bin/gnome-terminal -- sh -c 'xmodmap -e 'keycode 94=at numbersign periodcentered Ydiaeresis' -e 'keycode 49=less greater VoidSymbol VoidSymbol''
keycode 49 = less greater VoidSymbol VoidSymbol
keycode 94 = at numbersign periodcentered Ydiaeresis
I made the script executable
I run the script manually to test. It was OK.
I added the script to the ZorinOS startup program
It works some of the time but not always.
Sometimes, if the keys were correctly set, it change back to the inverted keys after a long period of inactivity and OS standby.
Just a thought: I've customized some of the keyboard settings from the Zorin setup. This should probably generate a call to xmodmap with a configuration file. Can this configuration sometimes be launched after mine, which would explain why my script sometimes seems to be ignored in the end? I do know, however, that it is executed every time the OS starts up, thanks to a trace in a log file.
How are the keyboard settings defined in the ZorinOS settings menu applied?
If xmodmap is used, do you know where the configuration file is stored?