Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Mapping and re-mapping Keyboard Keys
* Paul Groves <paul.groves.787@xxxxxxxxx> [06-27-17 10:51]:


On 27/06/17 15:10, Patrick Shanahan wrote:
* Paul Groves <paul.groves.787@xxxxxxxxx> [06-27-17 09:45]:
On 27/06/17 14:39, Patrick Shanahan wrote:
* Paul Groves <paul.groves.787@xxxxxxxxx> [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.

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@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >