LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-18-2007, 09:11 AM   #1
Dark Carnival
Member
 
Registered: Jun 2003
Posts: 166

Rep: Reputation: 30
Logitech G11 Keyboard Layout Issue


Hello.

I (as the title states) have a G11 keyboard which comes with some multimedia keys which are recognized just fine. However, the keyboard also have a series of keys (G1-G18) which aren't working right.

Currently the G-keys act like so:
G1-G12 acts as F1-F12
G13-G18 acts as the numbers 1-6

Here's an example output from xev, first I'll press G5 and then I'll press F5:
Pressing G5
Code:
KeyPress event, serial 31, synthetic NO, window 0x2400001,
    root 0x13a, subw 0x0, time 1700231459, (178,-32), root:(729,401),
    state 0x0, keycode 71 (keysym 0xffc2, F5), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2400001,
    root 0x13a, subw 0x0, time 1700231516, (178,-32), root:(729,401),
    state 0x0, keycode 71 (keysym 0xffc2, F5), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
Pressing F5
Code:
KeyPress event, serial 31, synthetic NO, window 0x2400001,
    root 0x13a, subw 0x0, time 1700265410, (204,-18), root:(755,415),
    state 0x0, keycode 71 (keysym 0xffc2, F5), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 31, synthetic NO, window 0x2400001,
    root 0x13a, subw 0x0, time 1700265498, (204,-18), root:(755,415),
    state 0x0, keycode 71 (keysym 0xffc2, F5), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
This made me conclude that X11 is incapable of distinguishing between the two keys.
So, I read that key recognition functions like so:
Linux Key Recognition
Code:
{keypress} -> scancode(s) -> Linux Keycode -> X11 Keycode -> X11 keysym -> {Program receives signal}
So. I went out to the console to see if I could find the scancodes for my keys (which supposedly should be unique?) and map them to a unique keycode, thus resolving the mixup which happens further down the recognition chain.

I'm told that to capture the scancode of a key, one should write:
Code:
 showkey -s (OR) showkey --scancodes
However, doing so for G5 produces this output
Code:
kb mode was UNICODE

press any key (program terminates after 10s of las keypress)...
0x9c
0x3f 0xbf
Letting the program terminate and repeating the process, pressing F5 this time instead of G5 produces the exact same output (0x9c is printed automatically each time)

Trying to obtain the keycodes instead by running showkey -k also produces the exact same output regardless of which of the two keys I press.

How can it be that I can't capture the real scancodes ? I really want these keys to work

Update
I've googled around and some comments to similar problems seem to indicate that somewhere in kernel 2.6 development they so generously decided to rewrite the whole input interface which, among other things, means that it's no longer possible for programs like showkey to obtain the actual raw codes.. It's somehow being provided with an emulated list..

They mentioned that if the key is unrecognized you can use dmesg or go through /var/log/messages and find an error about the unrecognized key where it's scancode will ALSO be.. So from there it's just a matter of using setkeycode and you're good..

If the system DOES recognize the key.. Obtaining the scancode seems to be much harder... I read something about a program called evtest but I can't get it to work for me.. Anyone... PLEASE ? I'm splitting hairs here

Last edited by Dark Carnival; 03-18-2007 at 10:39 AM.
 
Old 03-18-2007, 11:32 AM   #2
Dark Carnival
Member
 
Registered: Jun 2003
Posts: 166

Original Poster
Rep: Reputation: 30
BUMP!
C'mon people !
You cannot seriously say that I cannot even use my blasted media keys !? I mean why the hell does anyone use anything but the 10-year-old IBM keyboards then ?
 
Old 03-18-2007, 12:53 PM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
BUMP!
C'mon people !
You cannot seriously say that I cannot even use my blasted media keys !?
Woah!
Give us a chance will you? It's Sunday, we're relaxing. It's not even 3 hours since your first post and your second post means your thread is no longer "Zero-replies", which many people tend to look at.
Some people aren't interested in keyboards and we don't get paid for this job!
Please have a little patience.

That said, there's a nice little utility called xev that gives quite a lot of detail about which keys are being pressed, and what mouse movements are happening. You might like to try it.

Edit: Sorry, I see you have already tried xev.

Last edited by tredegar; 03-18-2007 at 12:54 PM.
 
Old 11-13-2007, 07:31 PM   #4
NeilPon
LQ Newbie
 
Registered: Nov 2007
Posts: 1

Rep: Reputation: 0
Question G11 Keyboard with Ubuntu

How can I install G15Daemon with the windows interface in Ubuntu? I can't seem to find the run file.
 
  


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
Switching keyboard layout - Mandriva2006 - K.D.E. Windows Layout! itz2000 Mandriva 3 08-13-2006 06:43 PM
KDE Keyboard Shortcuts with different Keyboard Layout hellblade Linux - Software 5 04-18-2006 12:40 AM
NetBSD/Sparc. Non-US keyboard layout issue Mega Man X *BSD 0 09-27-2005 03:48 PM
Strange issue with a logitech cordless keyboard. Linux.tar.gz Linux - Hardware 1 05-22-2005 12:46 PM
Issue with keyboard layout in X server (vs console) michapma Debian 9 10-05-2004 04:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:10 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