Re: [opensuse] Mapping and re-mapping Keyboard Keys
On 27/06/17 12:22, Paul Groves wrote:
On 27/06/17 08:34, Aaron Digulla wrote:
xmodmap -pke | less
These keycodes do not seem to match the system. For example in the output of this command it says:
keycode 158 = XF86WWW NoSymbol XF86WWW
I ran setkeycodes e020 158
When I press the e020 (Internet) button xev says I have pressed code 166 (Back button).
How on earth has this happened? I specified 158 not 166. What have I done wrong?
Just been emailed this link: https://unix.stackexchange.com/questions/49650/how-to-get-keycodes-for-xmodm... To quote this article: Here you can see keycode 97 is unused on my system: |keycode 94 = less greater less greater bar brokenbar keycode 95 = F11 XF86Switch_VT_11 F11 XF86Switch_VT_11 keycode 96 = F12 XF86Switch_VT_12 F12 XF86Switch_VT_12 keycode 97 = keycode 98 = Katakana NoSymbol Katakana keycode 99 = Hiragana NoSymbol Hiragana | The keycode X uses and the keycode the kernel uses are OFF BY 8 for "historical reasons". So take 97 - 8 = 89 and use 89 with the setkeycodes command (again as root): So to make my vol - button work (xmodmap keycode 122 -8 = 114) setkeycodes e01e 114 This has worked! I have re-mapped apl the buttons apart from my hotkeys.
No but there are lots of uncommon keycodes which you can use. For example, F13-F35 or KP_F1...KP_F4.
In the output of the command xmodmap -pke | less there are no codes for F13-F35 or KP_F1 etc
I would like to set HK1 - HK4 to F13 - F16 How do I find the keycodes for these buttons
Still looking for the keycodes for F13-16 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
OK I have nearly got it. I now have a .sh script that re-maps all of my keys using set keycodes Where can I put this script so it runs at boot? I have already tried it in the root crontab using @reboot but it has no effect there. I think it might work in rc.local but it is not there in either location I thought it was: /etc/init.d/rc.local /etc/rc.local Where can I find my system's rc.local? As for the hotkeys 1-4 I have mapped them to unused keycodes 251, 252, 253 and 254 in xmodmap -pke I have: keycode 251 = keycode 252 = keycode 253 = keycode 254 = How do I make it so these keycodes are recognised as F13 to F16? I looked at the keycode for F12: keycode 96 = F12 F12 F12 F12 F12 F12 XF86Switch_VT_12 F12 F12 XF86Switch_VT_12 and assume this is correct? keycode 251 = F13 F13 F13 F13 F13 F13 XF86Switch_VT_13 F11 F11 XF86Switch_VT_13 keycode 252 = F14 F14 F14 F14 F14 F14 XF86Switch_VT_11 F11 F14 XF86Switch_VT_14 keycode 253 = F15 F15 F15 F15 F15 F15 XF86Switch_VT_11 F11 F15 XF86Switch_VT_15 keycode 254 = F16 F16 F16 F16 F16 F16 XF86Switch_VT_11 F11 F16 XF86Switch_VT_16 So now I need to know how can I add this to the xmodmap configuration. I found a very old article from 2004 that said to save the lines in ~/.Xmodmap but the file did not exist and it does not work when I log out or reboot. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:22]: [...]
So now I need to know how can I add this to the xmodmap configuration.
I found a very old article from 2004 that said to save the lines in ~/.Xmodmap but the file did not exist and it does not work when I log out or reboot.
man xmodmap: xmodmap [-options ...] [filename] ... The filename specifies a file containing xmodmap expressions to be executed. This file is usually kept in the user's home directory with a name like .xmodmaprc. so it probably will not find ".Xmodmap" as it specifies it looks for ".xmodmap". -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/06/17 14:39, Patrick Shanahan wrote:
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:22]: [...]
So now I need to know how can I add this to the xmodmap configuration.
I found a very old article from 2004 that said to save the lines in ~/.Xmodmap but the file did not exist and it does not work when I log out or reboot. man xmodmap: xmodmap [-options ...] [filename] ... The filename specifies a file containing xmodmap expressions to be executed. This file is usually kept in the user's home directory with a name like .xmodmaprc.
so it probably will not find ".Xmodmap" as it specifies it looks for ".xmodmap".
Scratch that for now. Ubuntu does not use this anymore apparently it uses xkb However, I found I found: keycode 156 = XF86Launch1 NoSymbol XF86Launch1 keycode 157 = XF86Launch2 NoSymbol XF86Launch2 keycode 210 = XF86Launch3 NoSymbol XF86Launch3 keycode 211 = XF86Launch4 NoSymbol XF86Launch4 so I have used these keycodes for HK1 to 4 and I can assign them in the gui now just to run the script at boot? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:45]:
On 27/06/17 14:39, Patrick Shanahan wrote:
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:22]: [...]
So now I need to know how can I add this to the xmodmap configuration.
I found a very old article from 2004 that said to save the lines in ~/.Xmodmap but the file did not exist and it does not work when I log out or reboot. man xmodmap: xmodmap [-options ...] [filename] ... The filename specifies a file containing xmodmap expressions to be executed. This file is usually kept in the user's home directory with a name like .xmodmaprc.
so it probably will not find ".Xmodmap" as it specifies it looks for ".xmodmap".
Scratch that for now. Ubuntu does not use this anymore apparently it uses xkb
However, I found I found:
keycode 156 = XF86Launch1 NoSymbol XF86Launch1 keycode 157 = XF86Launch2 NoSymbol XF86Launch2 keycode 210 = XF86Launch3 NoSymbol XF86Launch3 keycode 211 = XF86Launch4 NoSymbol XF86Launch4
so I have used these keycodes for HK1 to 4 and I can assign them in the gui
now just to run the script at boot?
put them in ~/.xmodmap and they will be read when <user> logs in, iiuc. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/06/17 15:10, Patrick Shanahan wrote:
On 27/06/17 14:39, Patrick Shanahan wrote:
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:22]: [...]
So now I need to know how can I add this to the xmodmap configuration.
I found a very old article from 2004 that said to save the lines in ~/.Xmodmap but the file did not exist and it does not work when I log out or reboot. man xmodmap: xmodmap [-options ...] [filename] ... The filename specifies a file containing xmodmap expressions to be executed. This file is usually kept in the user's home directory with a name like .xmodmaprc.
so it probably will not find ".Xmodmap" as it specifies it looks for ".xmodmap".
Scratch that for now. Ubuntu does not use this anymore apparently it uses xkb
However, I found I found:
keycode 156 = XF86Launch1 NoSymbol XF86Launch1 keycode 157 = XF86Launch2 NoSymbol XF86Launch2 keycode 210 = XF86Launch3 NoSymbol XF86Launch3 keycode 211 = XF86Launch4 NoSymbol XF86Launch4
so I have used these keycodes for HK1 to 4 and I can assign them in the gui
now just to run the script at boot?
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:45]: put them in ~/.xmodmap and they will be read when <user> logs in, iiuc.
I just booted to opensuse and that works but in ubuntu it doesn't. Ubuntu apparently uses xkb and ignores the ~./xmodmap file Anyway as I said If found the Launch keycodes which work fine so it solves that problem but I need to run the script with all the setkeycode commands at boot I tried the usual /etc/init.d /etc/init.d/rc.local /etc/rc.local A few places online say ubuntu no longer uses rc.local ans uses /etc/rc#.d where # is the runlevel, So i ran the command runlevel which told me normal boot is runlevel 5 So I put my script in /etc/rc5.d and gave it execute permissions, reboot and it didn't run :( Where on earth am I supposed to put this script to run at boot? If I drop to tty2 and run it manually it works but if I run it under X or from cron it cannot change key maps. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday, 28 June 2017 0:20:43 ACST Paul Groves wrote:
[...] put them in ~/.xmodmap and they will be read when <user> logs in, iiuc.
I just booted to opensuse and that works but in ubuntu it doesn't. Ubuntu apparently uses xkb and ignores the ~./xmodmap file
Anyway as I said If found the Launch keycodes which work fine so it solves that problem but I need to run the script with all the setkeycode commands at boot
I tried the usual /etc/init.d /etc/init.d/rc.local /etc/rc.local
A few places online say ubuntu no longer uses rc.local ans uses /etc/rc#.d where # is the runlevel, So i ran the command runlevel which told me normal boot is runlevel 5
So I put my script in /etc/rc5.d and gave it execute permissions, reboot and it didn't run :(
Where on earth am I supposed to put this script to run at boot? If I drop to tty2 and run it manually it works but if I run it under X or from cron it cannot change key maps.
You don’t put scripts in the rcX.d directories - put them in /etc/init.d, then (on Ubuntu) use update-rc.d to create the symlinks in the appropriate rcX.d directories. You’ll need to have all the correct headers in the file (required-start, required-stop, runlevels etc), so look at existing init.d scripts and use them as a template. Bear in mind that debian/Ubuntu has now moved to systemd, and sysvinit is now deprecated (although lots of packages still use init scripts). Instead of writing an init script, you could write a systemd unit file and have systemd execute the script. The final result should be the same, but you’re “future proofing” it by not relying on a deprecated subsystem. HTH. Rodney. -- ============================================================== Rodney Baker rodney@jeremiah31-10.net ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
[...]
I just booted to opensuse and that works but in ubuntu it doesn't. Ubuntu apparently uses xkb and ignores the ~./xmodmap file
[...]
And for future reference, Ubuntu-specific questions are probably best asked on an Ubuntu-related mailing list, rather than the openSuSE mailing list. Notwithstanding the fact that there are probably others here like myself who are familiar with both, there’s likely a larger pool from which to get expert answers that way. :) -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/06/17 16:11, Rodney Baker wrote:
[...]
I just booted to opensuse and that works but in ubuntu it doesn't. Ubuntu apparently uses xkb and ignores the ~./xmodmap file
[...]
And for future reference, Ubuntu-specific questions are probably best asked on an Ubuntu-related mailing list, rather than the openSuSE mailing list. Notwithstanding the fact that there are probably others here like myself who are familiar with both, there’s likely a larger pool from which to get expert answers that way. :)
If you check OP I did do that first, once 2 years ago and a few weeks back but no reply at all on either :( OpenSUSE list is better :D -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 27/06/17 15:59, Rodney Baker wrote:
On Wednesday, 28 June 2017 0:20:43 ACST Paul Groves wrote:
[...] put them in ~/.xmodmap and they will be read when <user> logs in, iiuc. I just booted to opensuse and that works but in ubuntu it doesn't. Ubuntu apparently uses xkb and ignores the ~./xmodmap file
Anyway as I said If found the Launch keycodes which work fine so it solves that problem but I need to run the script with all the setkeycode commands at boot
I tried the usual /etc/init.d /etc/init.d/rc.local /etc/rc.local
A few places online say ubuntu no longer uses rc.local ans uses /etc/rc#.d where # is the runlevel, So i ran the command runlevel which told me normal boot is runlevel 5
So I put my script in /etc/rc5.d and gave it execute permissions, reboot and it didn't run :(
Where on earth am I supposed to put this script to run at boot? If I drop to tty2 and run it manually it works but if I run it under X or from cron it cannot change key maps. You don’t put scripts in the rcX.d directories - put them in /etc/init.d, then (on Ubuntu) use update-rc.d to create the symlinks in the appropriate rcX.d directories. You’ll need to have all the correct headers in the file (required-start, required-stop, runlevels etc), so look at existing init.d scripts and use them as a template.
Bear in mind that debian/Ubuntu has now moved to systemd, and sysvinit is now deprecated (although lots of packages still use init scripts). Instead of writing an init script, you could write a systemd unit file and have systemd execute the script. The final result should be the same, but you’re “future proofing” it by not relying on a deprecated subsystem.
HTH. Rodney.
Perfect! I found this using your advice https://unix.stackexchange.com/questions/47695/how-to-write-startup-script-f... I made the file /etc/systemd/system/ tinykb9805.service (below) which runs my script (has to be executable) then I ran systemctl enable tinykb9805.service then I ran systemctl start tinykb9805.service and it works! Even after reboot :) File: [Unit] Description=Re-map the Tiny KB-9805 PS/2 Keyboard Hotkeys [Service] Type=oneshot ExecStart=/home/paul/ownCloud/bin/tinykb9805_map.sh [Install] WantedBy=multi-user.target Now all of my hotkeys are working fine! Thanks for all the help everyone. One annoyance though is the scroll lock LED does not work. I will start a new thread for this. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday, 28 June 2017 0:53:52 ACST Paul Groves wrote:
[...]
Bear in mind that debian/Ubuntu has now moved to systemd, and sysvinit is now deprecated (although lots of packages still use init scripts). Instead of writing an init script, you could write a systemd unit file and have systemd execute the script. The final result should be the same, but you’re “future proofing” it by not relying on a deprecated subsystem.
HTH. Rodney.
Perfect! I found this using your advice
https://unix.stackexchange.com/questions/47695/how-to-write-startup-script-f or-systemd#47715
I made the file /etc/systemd/system/ tinykb9805.service (below) which runs my script (has to be executable)
then I ran systemctl enable tinykb9805.service then I ran systemctl start tinykb9805.service
and it works! Even after reboot :)
File:
[Unit] Description=Re-map the Tiny KB-9805 PS/2 Keyboard Hotkeys
[Service] Type=oneshot ExecStart=/home/paul/ownCloud/bin/tinykb9805_map.sh
[Install] WantedBy=multi-user.target
Now all of my hotkeys are working fine!
Thanks for all the help everyone.
One annoyance though is the scroll lock LED does not work. I will start a new thread for this.
Good job! Glad you got it working. The nice thing is that the systemd approach will be portable across systemd-based distros (which should be pretty much all of them soon), so the same solution should work on openSuSE as it does on Ubuntu. And, yes, this list is better. :) -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wednesday, 28 June 2017 0:53:52 ACST Paul Groves wrote:
[...]
Bear in mind that debian/Ubuntu has now moved to systemd, and sysvinit is now deprecated (although lots of packages still use init scripts). Instead of writing an init script, you could write a systemd unit file and have systemd execute the script. The final result should be the same, but you’re “future proofing” it by not relying on a deprecated subsystem.
HTH. Rodney. Perfect! I found this using your advice
https://unix.stackexchange.com/questions/47695/how-to-write-startup-script-f or-systemd#47715
I made the file /etc/systemd/system/ tinykb9805.service (below) which runs my script (has to be executable)
then I ran systemctl enable tinykb9805.service then I ran systemctl start tinykb9805.service
and it works! Even after reboot :)
File:
[Unit] Description=Re-map the Tiny KB-9805 PS/2 Keyboard Hotkeys
[Service] Type=oneshot ExecStart=/home/paul/ownCloud/bin/tinykb9805_map.sh
[Install] WantedBy=multi-user.target
Now all of my hotkeys are working fine!
Thanks for all the help everyone.
One annoyance though is the scroll lock LED does not work. I will start a new thread for this. Good job! Glad you got it working. The nice thing is that the systemd approach will be portable across systemd-based distros (which should be pretty much all of them soon), so the same solution should work on openSuSE as it does on Ubuntu. Yes it does. I just copies it to my opensuse 42.2 install and in works
On 27/06/17 17:04, Rodney Baker wrote: perfectly fine there too
And, yes, this list is better. :)
Totally :P -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
27.06.2017 18:23, Paul Groves пишет:
I made the file /etc/systemd/system/ tinykb9805.service (below) which runs my script (has to be executable)
then I ran systemctl enable tinykb9805.service then I ran systemctl start tinykb9805.service
and it works! Even after reboot :)
File:
[Unit] Description=Re-map the Tiny KB-9805 PS/2 Keyboard Hotkeys
Using modern udev you can put custom keys in hwdb and they will be applied by udev as soon as device appears. hwdb provides efficient lookup by product/vendor and other unique device properties. You can even submit your modifications upstream so that others will benefit from them :) For primer you can look at https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Just thought this might interest some of you who are more nostalgic: https://www.youtube.com/watch?v=ykdX2O7HD0w 7 seconds in and at the end you can see my keyboard! :D Also I still have the scanner speakers and monitor and I am using all 3 to this day! :) The scanner hasn't worked on windows since XP but still works plug and play on linux (all-be-it using a parallel PCI card) Althought I had the pentium III model with win98 SE! A whole 32MB RAM out of the box (which I upgraded to 128MB so I could play MS Flight simulator 2000). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
OK so I have a new PC which has no PS/2 ports. So I have a usb to Ps/2 adapter. Now my keyboard keys do not work again. They keycodes are the same as before but the script I wrote errors with a message like this for each key: setkeycodes: failed to set scancode b0 to keycode 202: ioctl KDSETKEYCODE: Invalid argument Can anyone see why setkeycodes is failing? I cannot work it out. If I can get this to work I would like to submit the keymaps so I don't have to do this in future. (and so others can use my keyboard model too). Have a look at this guy's video. The first keyboard is the one I have. https://youtu.be/XEWuXINbS9Q Any help will be much appreciated. Thanks Paul This is my script which is being run as a service with systemd (which was working): #!/bin/sh # Tiny KB-9805 Keyboard # # Re-map Tiny Online Button (scancode e020) to XF86HomePage (xmodmap id 180) setkeycodes e020 172 # Re-map Close Program Button (scancode e023) to XF86Close (xmodmap id 182) setkeycodes e023 174 # Re-map HK1 (scancode e032) to XF86Launch1 (xmodmap id 156) setkeycodes e032 148 # Re-map HK2 (scancode e012) to XF86Launch2 (xmodmap id 157) setkeycodes e012 149 # Re-map HK3 (scancode e030) to XF86Launch3 (xmodmap id 210) setkeycodes e030 202 # Re-map HK4 (scancode e021) to XF86Launch4 (xmodmap id 211) setkeycodes e021 203 # Re-map Prev Track (scancode e02e) to XF86AudioPrev (xmodmap id 173) setkeycodes e02e 165 # Re-map Stop (scancode e024) to XF86AudioStop (xmodmap id 174) setkeycodes e024 166 # Re-map Play (scancode e022) to XF86AudioPlay / XF86AudioPause (xmodmap id 172) setkeycodes e022 164 # Re-map Next Track (scancode e019) to XF86AudioPrev (xmodmap id 171) setkeycodes e019 163 # Re-map vol + (scancode e026) to XF86AudioRaiseVolume (xmodmap id 123) setkeycodes e026 115 # Re-map vol - (scancode e01e) to XF86AudioLowerVolume (xmodmap id 122) setkeycodes e01e 114 # Re-map Mute (scancode e017) to XF86AudioMute (xmodmap id 121) setkeycodes e017 113 # Re-map Sleep (scancode e025) to XF86Sleep (xmodmap id 150) setkeycodes e025 142 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
09.03.2019 0:20, Paul Groves пишет:
OK so I have a new PC which has no PS/2 ports. So I have a usb to Ps/2 adapter. Now my keyboard keys do not work again.
They keycodes are the same as before but the script I wrote errors with a message like this for each key:
setkeycodes: failed to set scancode b0 to keycode 202: ioctl KDSETKEYCODE: Invalid argument
Can anyone see why setkeycodes is failing? I cannot work it out.
If I can get this to work I would like to submit the keymaps so I don't have to do this in future. (and so others can use my keyboard model too).
Have a look at this guy's video. The first keyboard is the one I have. https://youtu.be/XEWuXINbS9Q
Any help will be much appreciated.
Thanks Paul
This is my script which is being run as a service with systemd (which was working):
This was working using the same openSUSE flavor, release and patches?
#!/bin/sh
# Tiny KB-9805 Keyboard #
# Re-map Tiny Online Button (scancode e020) to XF86HomePage (xmodmap id 180) setkeycodes e020 172
Does it work if you boot without plymouth (plymouth.enable=0 on kernel command line) into text mode and call this command manually? Did you try to add entries to udev hwdb instead (man hwdb)? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 09/03/2019 06:02, Andrei Borzenkov wrote:
Does it work if you boot without plymouth (plymouth.enable=0 on kernel command line) into text mode and call this command manually?
no, same problem.
Did you try to add entries to udev hwdb instead (man hwdb)?
I don't know how to do this. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Still not making and progress with this. I can get the keycodes for the buttons using showkey -s in a new tty session (outside of X) Apart from backslash next to Z and Vol+ which do not show up in showkey -s They do not show up in dmesg either. I remember when this keyboard was hooked up by PS/2 dmesg would say atkbd serio0: Unknow key released............ So the first problem is, how can I get the scancodes for these buttons if they do not show in dmesg? Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 10:51]:
On 27/06/17 15:10, Patrick Shanahan wrote:
On 27/06/17 14:39, Patrick Shanahan wrote:
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:22]: [...]
So now I need to know how can I add this to the xmodmap configuration.
I found a very old article from 2004 that said to save the lines in ~/.Xmodmap but the file did not exist and it does not work when I log out or reboot. man xmodmap: xmodmap [-options ...] [filename] ... The filename specifies a file containing xmodmap expressions to be executed. This file is usually kept in the user's home directory with a name like .xmodmaprc.
so it probably will not find ".Xmodmap" as it specifies it looks for ".xmodmap".
Scratch that for now. Ubuntu does not use this anymore apparently it uses xkb
However, I found I found:
keycode 156 = XF86Launch1 NoSymbol XF86Launch1 keycode 157 = XF86Launch2 NoSymbol XF86Launch2 keycode 210 = XF86Launch3 NoSymbol XF86Launch3 keycode 211 = XF86Launch4 NoSymbol XF86Launch4
so I have used these keycodes for HK1 to 4 and I can assign them in the gui
now just to run the script at boot?
* Paul Groves <paul.groves.787@gmail.com> [06-27-17 09:45]: put them in ~/.xmodmap and they will be read when <user> logs in, iiuc.
I just booted to opensuse and that works but in ubuntu it doesn't. Ubuntu apparently uses xkb and ignores the ~./xmodmap file
Anyway as I said If found the Launch keycodes which work fine so it solves that problem but I need to run the script with all the setkeycode commands at boot
I tried the usual /etc/init.d /etc/init.d/rc.local /etc/rc.local
A few places online say ubuntu no longer uses rc.local ans uses /etc/rc#.d where # is the runlevel, So i ran the command runlevel which told me normal boot is runlevel 5
So I put my script in /etc/rc5.d and gave it execute permissions, reboot and it didn't run :(
Where on earth am I supposed to put this script to run at boot? If I drop to tty2 and run it manually it works but if I run it under X or from cron it cannot change key maps.
consider ~/.bashrc or ~/.profile -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Registered Linux User #207535 @ http://linuxcounter.net Photos: http://wahoo.no-ip.org/piwigo paka @ IRCnet freenode -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Andrei Borzenkov
-
Karl Sinn
-
Patrick Shanahan
-
Paul Groves
-
Rodney Baker