Google
  Web www.spinics.net

Re: the OLPC XO grab button (triggering mouse scrolling using a keypress)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, Jun 30, 2008 at 07:35:16PM -0400, Erik Garrison wrote:
> The keyboard has two buttons which are marked with a hand.  The
> interested may see a schematic at
> http://wiki.laptop.org/go/OLPC_Keyboard_layouts.  It was intended at
> design time that pressing either of these buttons (Super_L and Super_R)
> and simultaneously moving the mouse would trigger x and y scrolling in
> X11 applications.
> 
> I'm curious if anyone knows of ways in which similar functionality has
> been implemented elsewhere.  In general I'd like some advice about the
> best place to implement this feature.

Just put a passive grab on the keys to receive the key press event and then,
depending on what you mean by scrolling:
- mouse wheel emulation
  put a (sync) grab on the mouse and use XTestFakeButtonEvent on buttons
  4/5/6/7 for to scroll. you'll need to mess around a bit with XAllowEvents,
  but it should work.
- viewport scrolling
  XWarpPointer seems the only way, I don't see any other callers for
  xf86SetViewport that could be used directly.

Cheers,
  Peter
_______________________________________________
xorg mailing list
xorg@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/xorg

[X Forum]     [Devices]     [XFree86]     [XFree86 Newbie]     [Site Home]     [IETF Annouce]     [Security]     [Fontconfig]     [Bugtraq]     [Rubini]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Video for Linux]     [Linux RAID]     [Linux Resources]

Powered by Linux