Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Nov 2006 11:12:41 -0500
From:      Nathan Vidican <nvidican@wmptl.com>
To:        Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
Cc:        questions@freebsd.org
Subject:   Re: HP pavillion dv8000 hotkey mappings
Message-ID:  <4561D3F9.5080908@wmptl.com>
In-Reply-To: <444psut9k4.fsf@be-well.ilk.org>
References:  <455E1159.9000605@wmptl.com> <444psut9k4.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Lowell Gilbert wrote:
> Nathan Vidican <nvidican@wmptl.com> writes:
>
>   
>> Does anyone know how to make use of the hotkeys for multimedia
>> functions? (ie: play/pause, stop, prev, next, vol-up, vol-down, mute,
>> etc) ... Have found several articles on these machines, but most
>> pertaining to the way one particular linux distro vs another makes use
>> of these keys.
>>
>> Most specifically, I'd like to get them to work from within kde, mixer
>> function more than anything (need quick mute/vol-up/down - could live
>> without the rest). I'm just not sure where/how to map the keys using
>> freebsd/xorg?
>>
>> Hoping it'll be something simple, but what? - or is this something
>> more complex regarding acpi ?
>>
>> Any ideas, suggestions, comments, or redirects greatly appreciated.
>>     
>
> If they produce x events (check with xev), then they can be mapped
> like any other event.  I recently had such a keyboard, however, and
> those keys didn't produce any events.  I didn't have a chance to play
> with it much, though; I had to get rid of it for unrelated reasons.
>
>
>   
running xev, reports keypress events when the buttons are pressed (also 
when the buttons are pressed using the wireless media remote), ie (the 
following is output on the console when pressing the 'Volume Up' button 
on the actual laptop:

KeyPress event, serial 31, synthetic NO, window 0x2600001,
root 0x44, subw 0x2600002, time 5348585, (46,24), root:(1056,685),
state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False


and again, when using the wireless IR remote, I get:

KeyRelease event, serial 31, synthetic NO, window 0x2600001,
root 0x44, subw 0x2600002, time 5346693, (46,24), root:(1056,685),
state 0x0, keycode 176 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:


So, now the question turns to how do I map these keys to functions like 
the mixer? Specifically, how to do so within KDE ? - kmix, (kde's 
interface to mixer), has the option to set global hotkeys, but only 
accepts known keyboard presses into a text box. Posing the question of 
questions; is it that I need to find out how to map unknown keys within 
a program, or that I need to figure out how to map unknown keys into 
known keys?

Is it possible to define these keys, when the laptop was original 
(booting Windows XP home), I was able to find the keypress events using 
WinAMP's global hotkey config (similar to kde's kmix's dialog) with 
keynames like 'VolUP','NextTrack', etc). I am assuming this was a 
function of the keyboard driver or some other mapping created by HP when 
they installed windows - the key now then, is how do I accomplish the 
same under xorg/kde ?

--
Nathan Vidican
nvidican@wmptl.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4561D3F9.5080908>