LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-05-2012, 03:52 PM   #1
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Rep: Reputation: 38
Key remap


How do I remap the most useless key on my keyboard (windoze key) to be cntrl+shift+u 2665? I have tried figuring out xmodmap with no success.

Also how would I make this permanent so the value is set on startup?


Thanks for your assistance

Dan

Last edited by interndan; 03-05-2012 at 04:26 PM.
 
Old 03-05-2012, 05:50 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

Top of the list for a DuckDuckGo search;Binding Windows Key to KDE Menu In KDE4 « OIDK – Oh, I Don ...
 
Old 03-06-2012, 02:58 PM   #3
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Original Poster
Rep: Reputation: 38
Thanks, that was some help. I figured out if I issue (in terminal) the command
Code:
xmodmap -e 'keycode 133=U2665'
I get the correct character printed when I press the windoze key. However I can't seem to get it to load this value on restart. I edited my ~/.Xmodmap, with no success.

Any Ideas?
Thanks
Dan
 
Old 03-06-2012, 07:45 PM   #4
fatalfrrog
Member
 
Registered: May 2011
Distribution: Slackware
Posts: 57

Rep: Reputation: 31
What did you do to your .Xmodmap?

And make sure you are including 'xmodmap ~/.Xmodmap' in your .xinitrc
 
Old 03-06-2012, 07:58 PM   #5
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 698
Blog Entries: 1

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Hi interndan

Are you using startx -- runlevel 3 ?
or kdm (xdm) -- runlevel 4 ?

If runlevel 3 what fatalfrrog suggested should work

If runlevel 4, you man need to create ~/.xsession and/or add 'xmodmap ....' to it

John
 
Old 03-07-2012, 12:35 PM   #6
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Original Poster
Rep: Reputation: 38
I use run level 4. Here is my ~/.Xmodmap
Code:
keycode 133=U2665'
and my ~/.xsession
Code:
# This program, based on code found in the gpg-agent man page, is
# presumably licensed under the GPL.
#
# As the effects of this default .xsession on an account using
# (t)csh are not yet known, feedback and/or suggestions are welcomed.

if [ -x "$(which gpg-agent)" ]; then
  if test -f $HOME/.gpg-agent-info &&    kill -0 $(cut -d: -f 2 $HOME/.gpg-agent-info) 2>/dev/null; then
    GPG_AGENT_INFO=$(cat $HOME/.gpg-agent-info)
    export GPG_AGENT_INFO
  else
    eval $(gpg-agent --daemon)
    echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info
  fi
fi

# Note that the new option --write-env-file may be used instead.

# You should always add the following lines to your .bashrc or whatever
# initialization file is used for all shell invocations:

~/.Xmodmap


GPG_TTY=$(tty)
export GPG_TTY
I use LXDE as my desktop environment if that makes a difference.

Thanks for you help.
 
Old 03-07-2012, 01:17 PM   #7
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,109

Rep: Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179
I think you should modify, as suggested above, the line
Code:
~/.Xmodmap
with
Code:
xmodmap ~/.Xmodmap
P.S. happy birthday!
 
Old 03-07-2012, 01:33 PM   #8
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Original Poster
Rep: Reputation: 38
That didn't work either. But I do appreciate the help. also the birthday wishes.
Thank you.
 
Old 03-07-2012, 02:25 PM   #9
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,109

Rep: Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179
you can also put
Code:
xmodmap -e 'keycode 133=U2665'
in your ~/.xsession

Last edited by ponce; 03-07-2012 at 02:28 PM.
 
Old 03-07-2012, 02:42 PM   #10
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Original Poster
Rep: Reputation: 38
That didn't work either. Again thanks.
 
Old 03-07-2012, 05:45 PM   #11
fatalfrrog
Member
 
Registered: May 2011
Distribution: Slackware
Posts: 57

Rep: Reputation: 31
Are you logging out and back in after you make the changes?
And just to be sure that your mapping is correct, open up xev from a terminal and press the Windows key. You should see a line that says something similar to: "state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES," - if the keycode is not 133, then there's your problem
 
Old 03-08-2012, 08:00 AM   #12
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Original Poster
Rep: Reputation: 38
Yes I am logging out and back in. Also the keycode is 133. Issuing the command in terminal gives the output I am trying to achieve, I just can't get it to make it a permanent change.
Thanks for your input.
 
Old 03-08-2012, 08:29 AM   #13
fatalfrrog
Member
 
Registered: May 2011
Distribution: Slackware
Posts: 57

Rep: Reputation: 31
Give this a good read: https://wiki.archlinux.org/index.php/Xmodmap
 
Old 03-08-2012, 10:24 AM   #14
croxen
Member
 
Registered: May 2002
Posts: 100

Rep: Reputation: 42
If nothing with .Xmodmap or .xinitrc seems to work, just make a small text file "keys.txt" consisting of the single line
Code:
keycode 133=U2665
and put it in your home directory.

Then (depending on your desktop environment) put
Code:
xmodmap keys.txt
among your session/startup applications. I tend to use this method in xfce4 for loading a batch of special key mappings for an old IR remote control.
 
Old 03-08-2012, 11:27 AM   #15
interndan
Member
 
Registered: Aug 2004
Location: near Marion, Ill
Distribution: Slackware 15 64bit on Desktop Slackwarearm on Raspberry PI v1b
Posts: 381

Original Poster
Rep: Reputation: 38
I finally got it working. After getting the correct format for my ~/.Xmodmap, I had to modify /etc/xdg/lxsession/autostart by adding the line
Code:
@xmodmap `/.Xmodmap
Thanks for all the assistance I would have never figured this out without all your help.

I'll mark this solved

Dan
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remap Caps Lock key to ESC MTK358 Linux - Newbie 6 06-03-2010 03:52 PM
How do I remap Alt to a Super Key? fhsm Linux - Newbie 4 01-15-2009 05:40 AM
Key remap Silverdaz Linux - Software 1 07-08-2004 11:35 AM
remap keyboard windows key khtse Slackware 2 07-01-2004 01:14 PM
Key remap Silverdaz Fedora 0 06-23-2004 08:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration