LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-18-2007, 06:20 PM   #1
noranthon
Member
 
Registered: Apr 2006
Location: Australia
Distribution: PCLinuxOS with Xfce
Posts: 300

Rep: Reputation: 30
Using winkey et al as modifier / compose keys


I'd like to set up the winkeys to be of some use. Evidently, you can make one the "compose" key, whatever that means: see this page which is as incomprehensible as the best Linux documentation. I tried "xev" but could not make head or tail of the output.

So, I tried to find out which key number (keycode?) is assigned to each winkey. "showkey -k" got this:
Quote:
$ showkey -k
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]

KDSKBMODE: Operation not permitted
Don't try showkey -m. It can't be stopped with Ctrl+C and if you close the console in desperation, numerous other windows open instead.

/etc/X11/Xmodmap:
Quote:
!
! This is the "Xmodmap" file for Standard Keyboards with Windows keys.
!
! If you want to have other keymappings for special X-Terminals, just
! create a "Xmodmap.${DISPLAY}" file with the according changes.
!

keycode 22 = BackSpace
keycode 115 = F13
keycode 117 = Menu
Since I don't have "special X-Terminals" (at least, I hope I don't), I suppose I could add to this file. (Or is that too easy?) But I still have to know what number to use and how to describe the keys and to assign insertion of various symbols to various keybindings.

How do I find out the codes of keys, assign a meaning to a keycode and subsequently assign symbols to various key combinations? I looked at the files mentioned in this old post but found nothing illuminating. All other previous posts I could find were too cryptic or not on point. Onk and major head scratch.

Last edited by noranthon; 02-18-2007 at 06:22 PM.
 
Old 02-18-2007, 06:32 PM   #2
johngreenwood
Member
 
Registered: Nov 2006
Location: Lancashire, United Kingdom
Distribution: Slackware 13
Posts: 243

Rep: Reputation: 31
What do you want it to do?
To use xev is very easy, just run it and look for this when pressing the windows key.
Code:
KeyPress event, serial 28, synthetic NO, window 0x2200001,
    root 0x3f, subw 0x0, time 955730, (392,-358), root:(402,257),
    state 0x10, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2200001,
    root 0x3f, subw 0x0, time 955831, (392,-358), root:(402,257),
    state 0x50, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:
In there you can see the keycode for my windows key is 115, this is the code you need for xmodmap.
 
Old 02-19-2007, 12:40 AM   #3
noranthon
Member
 
Registered: Apr 2006
Location: Australia
Distribution: PCLinuxOS with Xfce
Posts: 300

Original Poster
Rep: Reputation: 30
Thanks. Some other key was recorded at the same time but I've confirmed the number with repeated presses. Now what? I just add a line to Xmodmap:
Code:
keycode 115 = Multi_key
? That can't be right; it's never that simple.

EDIT: No. It's not that simple. You are limited to /usr/X11R6/lib/X11/locale/iso8859-1/Compose - so you need to alter that to include characters you want.

And what's this "dead key" business?

Last edited by noranthon; 02-19-2007 at 12:45 AM.
 
Old 02-19-2007, 08:48 AM   #4
johngreenwood
Member
 
Registered: Nov 2006
Location: Lancashire, United Kingdom
Distribution: Slackware 13
Posts: 243

Rep: Reputation: 31
I'm afraid I can't help you there, sorry. I only know how to make it bring up the kmenu.
 
Old 02-19-2007, 09:12 AM   #5
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
http://people.uleth.ca/~daniel.odonn...rd-in-linuxx11
 
Old 02-20-2007, 04:43 AM   #6
noranthon
Member
 
Registered: Apr 2006
Location: Australia
Distribution: PCLinuxOS with Xfce
Posts: 300

Original Poster
Rep: Reputation: 30
Ah, a new route altogether. Thank you.
 
Old 03-15-2007, 11:14 AM   #7
wensveen
LQ Newbie
 
Registered: Mar 2004
Location: Utrecht, Netherlands
Distribution: Debian unstable
Posts: 20

Rep: Reputation: 0
Is there any way to make the windows key bring up the menu with AND make win+e open a file manager? I use Gnome and it seems it's either a composable button (<Mod4>) or a single button (Super_L).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
using winkey+m in kde? hottdogg Linux - General 2 08-09-2006 11:20 PM
compose keys don't automatically load, also profile-based john riemann soong Linux - General 0 07-27-2006 02:53 PM
xfce4 modifier keys question acidream Linux - General 3 10-11-2004 03:17 PM
Modifier keys + non-latin keyboard layouts angryziber Linux - Hardware 0 10-08-2003 02:35 AM
Using modifier keys for special characters kpfeiffer Linux - Newbie 5 10-19-2002 04:25 AM


All times are GMT -5. The time now is 01:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration