LinuxQuestions.org
Review your favorite Linux distribution.
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 01-02-2010, 07:39 AM   #1
guivho
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Rep: Reputation: 0
Enable modifiers via xmodmap


I recently got a Logitech G11-keyboard for my Ubuntu 9.10 64-bit box. My question is xmodmap related and not restricted to this particular keyboard, nor to the distro I am using. The keyboard has a.o. 18 G-keys. These have been successfully defined in /usr/share/X11/XKeysymDB as per https://help.ubuntu.com/community/LogitechG15 and I have a ~/.Xmodmap file that matches keycodes to the names in XKeysymDB.

My .Xmodmap definitions are rather simple, e.g. 'keycode 175 = G1'. So I do not define any value for modifier combinations, nor do I know how to do this.

And here's my real question. How should I define these keys so that the Crl-, Alt-, Meta-, Super- etc modifiers work with these keys?

With the current setup, the modifier versions of these keys do only work for the second keypress, e.g. the first Ctrl-G17 is perceived as a G17 keypress, and the second and remaining Ctrl-G17 presses are correctly received as a Ctrl-G17.

I would be happy to read an explanation of this behaviour, and even more so, about how to properly define them so that the base key as well as the modifier versions would be available.


Guido

--
If the odds are a million to one against something occurring, chances are 50-50 it will.

http://vanhoecke.org ... and go2 places!
 
Old 01-05-2010, 10:46 PM   #2
tommyttt
Member
 
Registered: Oct 2009
Location: Federal Way, WA
Distribution: openSUSE 11.4 x86_64, openSuSE 12.1, Fedora 15
Posts: 207

Rep: Reputation: 34
Had to search for this keyboard to see what it does. Basically, it has 18 macro programmable keys. The specs say it requires winblows but it should work under linux. I tried xmodmap but didn't get it to work consistently. Instead I use xbindkeys (http://www.nongnu.org/xbindkeys/xbindkeys.html) which is fairly easy to set up. One requirement is that the keys return an explicit keycode for each key combination. Use "xev" in a terminal to see if your keyboard qualifies.

You also might be interested in this article of LinuxPro magazine (Dec 09) issue 109. It is about using acpid hotkeys but I haven't tried it since xbindkeys work fine for me. Some of the key definitions in my distro (openSUSE 11.2) didn't work. I've got a Dell studio 1745 laptop which was made for winblows

Here is a fragment of my .xbindkeysrc file
Quote:
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.3
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
#<<<< snip >>>>>
# Control + b:2 + Release
#
# keys added by TTT 10/23/09
"eject &"
m:0x0 + c:170

# keys added by TTT 10/23/09
# this key not working yet
"xterm -geometry 132x50-0-0 -e 'ps -ux; read'"
Control_R

# keys added by TTT 10/23/09
"kfind &"
Alt_R

##################################
# End of xbindkeys configuration #
##################################
The "windblows" key on my keyboard doesn't return a keycode so can't use it.

Tom (retired penguin)

Last edited by tommyttt; 01-05-2010 at 10:47 PM.
 
Old 01-06-2010, 03:48 AM   #3
guivho
LQ Newbie
 
Registered: Jan 2009
Posts: 3

Original Poster
Rep: Reputation: 0
As I said b4, the combined XKeysymDB en ~/.Xmodmap work well for me. Tje 18 G-keys as well as the 3 M-keys and the MR key work fine for me. I just do not know why the first keypress of one of these keys together with a modifier key is detected as the unmodified key, while the same modified key pressed immediately thereafter is detected as the modified key. And of course, I'd like to fix it so that one single modified keypress is detected as such.
 
  


Reply

Tags
keyboard, xbindkeys, xmodmap


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
keyboard modifiers not working Freakwit Linux - General 2 11-24-2008 07:41 PM
Java - Search for alt or ctrl modifiers in a string meblost Programming 0 03-26-2005 10:44 AM
how can i set locale modifiers? pingY Slackware 6 01-04-2004 11:39 AM
kde "keyboard shortcuts": can't change modifiers & says no windows key peb Linux - Newbie 0 01-02-2004 05:41 PM
Keysym remapping - keyboard shortuts in a shell: how to define modifiers? larus_marinus Linux - General 0 07-03-2003 10:52 AM


All times are GMT -5. The time now is 04:04 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration