All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2.6.35] sony-laptop.c: Adding buttons for Sony Vaio P
       [not found] <20110104154024.1DC7C3E65C9@picard.linux.it>
@ 2011-01-04 22:13 ` Mattia Dongili
       [not found]   ` <20110105131903.AB5543E65E3@picard.linux.it>
  0 siblings, 1 reply; 2+ messages in thread
From: Mattia Dongili @ 2011-01-04 22:13 UTC (permalink / raw)
  To: Stephan Mueller; +Cc: mjg, platform-driver-x86

On Tue, Jan 04, 2011 at 04:40:02PM +0100, Stephan Mueller wrote:
> Hi,
> 
> The following patch covers two special buttons on Sony Vaio VPCP111KX.

Hi!

> It maps a button labeled "ASSIST" to the help key.
> 
> Then it maps a button which is used as a zoom key in Win (switch between 
> screen resolutions). I tried to map that to the zoom key.

the way buttons work in linux is that the kernel emits some kind of
button event and some userspace application (i.e. a desktop manager
like Gnome or KDE) intercept that via Xorg and reacts according to how
they are configured. Any key can do anything, having the ZOOM button
emit the ZOOM keypress helps with defaults settings.

> This is not yet intended to be an official patch, but a question:
> 
> - is the assist key usually mapped to help?

yes.

> - shall the zoom key be mapped to zoom?

yes

> - none of the keys mapped to zoom seem to have any effect on my system - xev 
> does not report the keys when they are pressed - but dmesg does not list 
> omitted keys either - how are the zoom keys supposed to work? 

use /lib/udev/keymap to find out what is being emitted by the kernel
(you should know it actually by looking at the number associated to
SONYPI_EVENT_ZOOM_PRESSED). If the number is >255 you need remapping
that to a lower number, see here for a longer explanation:
http://www.linux.it/~malattia/wiki/index.php/Sony-laptop#Fn_keys_in_X
If the number is <255 it's just your system is not configured to handle
the key.

> --- sony-laptop.c.orig	2010-11-10 21:53:50.000000000 +0100
> +++ sony-laptop.c	2010-11-10 22:52:02.633367015 +0100
> @@ -899,6 +899,10 @@
>  	{ 0x1f, SONYPI_EVENT_ANYBUTTON_RELEASED },
>  	{ 0xa1, SONYPI_EVENT_MEDIA_PRESSED },
>  	{ 0x21, SONYPI_EVENT_ANYBUTTON_RELEASED },
> +	{ 0xa6, SONYPI_EVENT_HELP_PRESSED },
> +	{ 0x1d, SONYPI_EVENT_ANYBUTTON_RELEASED },
> +	{ 0x9d, SONYPI_EVENT_ZOOM_PRESSED },
> +	{ 0x26, SONYPI_EVENT_ANYBUTTON_RELEASED },

So ZOOM sends 0x9d when pressed and 0x1d when released? Could you please
load sony-laptop with debug=1 and send me the output of dmesg after
pressing the ZOOM button?
I already have a pending patch that adds a number of buttons (including
ASSIST), I'll fold yours into it and send it for inclusion.

Thanks
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.6.35] sony-laptop.c: Adding buttons for Sony Vaio P
       [not found]   ` <20110105131903.AB5543E65E3@picard.linux.it>
@ 2011-01-05 15:26     ` Mattia Dongili
  0 siblings, 0 replies; 2+ messages in thread
From: Mattia Dongili @ 2011-01-05 15:26 UTC (permalink / raw)
  To: Stephan Mueller; +Cc: mjg, platform-driver-x86

On Wed, Jan 05, 2011 at 02:18:00PM +0100, Stephan Mueller wrote:
> Am Mittwoch, 5. Januar 2011, um 07:13:35 schrieb Mattia Dongili:
> > On Tue, Jan 04, 2011 at 04:40:02PM +0100, Stephan Mueller wrote:
...
> > > - none of the keys mapped to zoom seem to have any effect on my system -
> > > xev does not report the keys when they are pressed - but dmesg does not
> > > list omitted keys either - how are the zoom keys supposed to work?
> > 
> > use /lib/udev/keymap to find out what is being emitted by the kernel
> > (you should know it actually by looking at the number associated to
> > SONYPI_EVENT_ZOOM_PRESSED). If the number is >255 you need remapping
> > that to a lower number, see here for a longer explanation:
> > http://www.linux.it/~malattia/wiki/index.php/Sony-laptop#Fn_keys_in_X
> > If the number is <255 it's just your system is not configured to handle
> > the key.
> 
> Again, before considering that, I think I should see events in xev. As I do 

not really, sony-laptop emits input events via the input layer, Xorg
reads them with the evdev driver and pushes them over to graphical apps.

> not see them, I am scratching my head where the events are lost.

try /lib/udev/keymap, if that sees the events (with your patch applied)
then Xorg is eating your key presses.

> Note, that issue with the zoom keys apply also to the zoom-in and zoom-out 
> keys that are already present in the driver. None of them end up visible in 
> xev. 

Wait, I'm confused. What zoom keys have you got and what should they do?
do you really have zoom-in, zoom-out and a generic zoom?

Thanks
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-05 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20110104154024.1DC7C3E65C9@picard.linux.it>
2011-01-04 22:13 ` [PATCH 2.6.35] sony-laptop.c: Adding buttons for Sony Vaio P Mattia Dongili
     [not found]   ` <20110105131903.AB5543E65E3@picard.linux.it>
2011-01-05 15:26     ` Mattia Dongili

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.