LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , , , , , , , ,

Reply
 
Thread Tools
Old 05-13-2007, 07:00 AM   #1
polemon
Member
 
Registered: Jun 2005
Distribution: Fedora 11, Ubuntu 9.10, Ubuntu Server 9.10, DamnSmallLinux 3.4.4, FreeDOS 1.0, OpenBSD 4.5
Posts: 191
Thanked: 0
IR Remote: Keycodes but no scancodes?


[Log in to get rid of this advertisement]
Hi.

I have a Hauppauge WinTV-HVR110 TV-Card, and that infrared remote control that came along with it.

Now I'd like to use that remote as pseudo-keyboard for my desktop.

I learned, that there are many ways how to make that remote usable in linux.

First thing I tried, was assigning Keysymbols. This works semi-well, some keycodes are the same keycodes that my normal keybord sends. This isn't that much of a problem, since they match pretty well (Numpad on remote sends numbers, Media-key match the Media-keys on my keyboard). But some keys simply don't work.
xev doesn't get any readings from the device on those buttons, so my first thought was, that they're non-functional.

However, when I tried the remote under a text-terminal (no X), I discovered something rather interesting:

when I run showkey -k (keycodes output), I get Keycodes fore _every_ key. This leads to the conclusion, that every key on the remote actually _IS_ functional.
But when I run showkey -s (scancodes) I only get codes for the same keys, that I get keycodes under X with.

But how is this possible? I get Keycodes, for nonexistent scancodes?

The Keycodes for the scancode-less keys are strangely high: Ranging from 353 to 412.

Since I couldn't fix that problem in two days of work, I followed the advice of a friend of mine, and tried LIRC.

But this turned out not to be satisfactory as well.

Passing commands to irexec works well, however this is not really handy, when it comes to things like passing a "volume_up" event to the desktop environment.

I can send key-events to applications with irxevent, when I assign the proper keysymbol to be passed to that application.

This works well for some applications - like XINE - but I'd like to pass certain events so my KDesktop-Environment, "volupe_up" for instance. Sending XF86... keys seems to be a general problem for irxevent, though. I'd like them to have the functionality, the media key on my keyboard have, sending XF86... keycodes to the desktop.


Any ideas?

regeards

--polemon

Last edited by polemon; 05-13-2007 at 07:11 AM..
polemon is offline  
Tag This Post , , , , , , ,
Reply With Quote
Old 05-17-2007, 05:16 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware 12.2
Posts: 1,350
Thanked: 19
I hope I understood you right. You can edit $HOME/.Xmodmap. If you use a graphical login manager it's $HOME/.xresources if I remember right. Part of my .Xmodmap file:
Code:
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
keycode 160 = XF86AudioMute
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 236 = XF86Mail
keycode 229 = XF86Search
keycode 230 = XF86Go
keycode 178 = XF86HomePage
keycode 223 = XF86Sleep
keycode 222 = XF86PowerOff
keycode 227 = XF86WakeUp
The keycodes come from my keyboards extra keys, so you of course have to modify them.
Then depending on your Desktop Environment or Window Manager you should use the specific way to assign shortcuts I guess. I am running IceWM and use aumix to deal with audio volume, but I think in KDE's control center you should find a way to assign shortcuts.
titopoquito is offline     Reply With Quote
Old 02-12-2009, 07:58 PM   #3
pelainux
LQ Newbie
 
Registered: Feb 2009
Location: Chile
Distribution: Debian lenny 2.6.26
Posts: 3
Thanked: 0
Question showkeys: keycode but no scancode

I have a similar problem, Did you solve your problem?

I have connected my aluminium apple keyboard in my linux box but some keys are not working (F3 for example), showkeys report keycodes but no scancode.

xev show nothing, not detected at all for those keys.

Last edited by pelainux; 02-12-2009 at 08:00 PM.. Reason: error
pelainux is offline  
Tag This Post
Reply With Quote
Old 02-13-2009, 05:58 AM   #4
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Ruhr Area, Germany
Distribution: Slackware 12.2
Posts: 1,350
Thanked: 19
If you press the F3 key with your keyboard, do you get some scancode at the end of "dmesg" output?
titopoquito is offline     Reply With Quote
Old 02-14-2009, 08:34 AM   #5
pelainux
LQ Newbie
 
Registered: Feb 2009
Location: Chile
Distribution: Debian lenny 2.6.26
Posts: 3
Thanked: 0
Nop, I get no info in dmesg.

I have an interesting new piece of information: I have another Linux box (older), I plugged my apple keyboard on it, then I turned it on.
The keyboard didn't work until the SO start (seems the BIOS is not able to manage the USB keyboard) but after, the keyboard works with a wrong mapping but the F3 works.

After my reaserch (several hours) I conclude: "when no scancode but keycode in showkey() and no info in dmess is driver issue"
Next step: check the drivers in both computers.

Have somebody a diferent conclusion?
pelainux is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
How to make extra keys work on acer aspire 9113? They don't have scancodes! gkiagia Linux - Laptop and Netbook 4 10-20-2006 02:48 PM
mono keycodes trscookie Programming 0 10-10-2006 07:24 PM
External USB NumPad giving bad scancodes Kuhlemannp Linux - Hardware 0 07-26-2006 10:03 AM
Logitech Multimedia keys don't generate scancodes Itzac Linux - Hardware 1 03-22-2005 02:28 PM
ncurses and keycodes grantm Programming 0 07-24-2003 01:14 PM


All times are GMT -5. The time now is 04:05 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration