Discussion:
Disabling Super key?
Girish Kulkarni
2008-07-06 09:27:54 UTC
Permalink
Is there any way I could disable the Windows key on my keyboard?

I use FreeBSD 7.0-RELEASE on a Dell Inspiron 640m laptop. My Windows
key ("Super_L") has developed a problem for some unknown reason: it
gets pressed and remains so without my touching it. I could diagnose
this only using xev, which reported a constant Super_L KeyPress event.

This means that I cannot enter text in for example Firefox or Emacs
most of the time and this is terribly irritating. I could probably
solve the problem by disabling the Super key.

Thanks,
Girish.
Girish Kulkarni
2008-07-11 11:38:18 UTC
Permalink
Did you try kbdcontrol ?
Thanks. I could do that using kbdcontrol(1) although this disables the
Windows key only in the console and not in X, where xmodmap(1) does
the job instead. I could make the effect of kbdcontrol permanent by
adding a line to ~/.bash_profile. Any idea how I could make the effect
xmodmap permanent? (Adding relevant lines to ~/.xsession doesn't seem
to help.)

Girish.

--
Girish Kulkarni - Allahabad, India - http://girish.50webs.com
Frank Shute
2008-07-11 12:32:30 UTC
Permalink
Post by Girish Kulkarni
Did you try kbdcontrol ?
Thanks. I could do that using kbdcontrol(1) although this disables
the Windows key only in the console and not in X, where xmodmap(1)
does the job instead. I could make the effect of kbdcontrol
permanent by adding a line to ~/.bash_profile. Any idea how I could
make the effect xmodmap permanent? (Adding relevant lines to
~/.xsession doesn't seem to help.)
Make a ~/.xmodmaprc with your setting(s) in it and then call it from
~/.xsession or ~/.xinitrc (depends on how you start X). E.g you want a
line like:

xmodmap -display :0.0 .xmodmaprc

in there.

For the kbdcontrol stuff, I put it in /etc/rc.local
Post by Girish Kulkarni
Girish.
Regards,
--
Frank


Contact info: http://www.shute.org.uk/misc/contact.html
Girish Kulkarni
2008-07-12 13:17:57 UTC
Permalink
Post by Frank Shute
Any idea how I could make the effect of xmodmap
permanent? (Adding relevant lines to ~/.xsession doesn't seem
to help.)
Make a ~/.xmodmaprc with your setting(s) in it and then call it
from ~/.xsession or ~/.xinitrc (depends on how you start
Thanks for your reply. This doesn't seem to be helping though. I use
~/.xsession to start X so I put the following two lines in it:

xmodmap -e 'clear mod4'
xmodmap ~/.xmodmaprc

where ~/.xmodmaprc contains relevant instructions for disabling the
Super key. I found that the Super key was not disabled even after
this. I also tried including these two lines in ~/.xinitrc.

Thanks,
Girish.
Frank Shute
2008-07-12 15:07:32 UTC
Permalink
Post by Girish Kulkarni
Post by Frank Shute
Any idea how I could make the effect of xmodmap
permanent? (Adding relevant lines to ~/.xsession doesn't seem
to help.)
Make a ~/.xmodmaprc with your setting(s) in it and then call it
from ~/.xsession or ~/.xinitrc (depends on how you start
Thanks for your reply. This doesn't seem to be helping though. I use
xmodmap -e 'clear mod4'
xmodmap ~/.xmodmaprc
where ~/.xmodmaprc contains relevant instructions for disabling the
Super key. I found that the Super key was not disabled even after
this. I also tried including these two lines in ~/.xinitrc.
First, you should check what keycode the key you want to disable
produces. You can check this by using X11/xev and pressing the key.

On my English PC keyboard, the left Windows key produces keycode 115.

I can disable it by putting the following line in ~/.xinitrc since I
use startx(1):

xmodmap -e "keycode 115="

If you use xdm(1) or similar display manager, then you want to put
that line in ~/.xsession

Don't worry about having an xmodmaprc.

You'll obviously need to restart X for the change to take effect. Or
just run it from a prompt for it to have an immediate effect.

Regards,
--
Frank


Contact info: http://www.shute.org.uk/misc/contact.html
Polytropon
2008-07-12 18:29:36 UTC
Permalink
Post by Frank Shute
If you use xdm(1) or similar display manager, then you want to put
that line in ~/.xsession
An option to have all settings in one file (traditionally the
~/.xinirc file) is to create a ~/.xsession file with these three
lines:

#!/bin/csh
source ~/.cshrc
exec ~/.xinitrc

Then, your ~/.xinitrc can contain any xmodmap call you want,
for exmaple:

xmodmap ~/.xmodmaprc

So you don't run into trouble where to configure your X session.
--
Polytropon
Post by Frank Shute
From Magdeburg, Germany
Happy FreeBSD user since 4.0
Odhiambo Washington
2008-07-12 18:50:10 UTC
Permalink
After all that advice, one last piece remains - buy another keyboard;-)
Post by Girish Kulkarni
Is there any way I could disable the Windows key on my keyboard?
I use FreeBSD 7.0-RELEASE on a Dell Inspiron 640m laptop. My Windows
key ("Super_L") has developed a problem for some unknown reason: it
gets pressed and remains so without my touching it. I could diagnose
this only using xev, which reported a constant Super_L KeyPress event.
This means that I cannot enter text in for example Firefox or Emacs
most of the time and this is terribly irritating. I could probably
solve the problem by disabling the Super key.
Thanks,
Girish.
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
--
Sent from Google Mail for mobile | mobile.google.com

Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

"Oh My God! They killed init! You Bastards!"
--from a /. post
Loading...