Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 May 2011 17:58:15 +0000 (UTC)
From:      Maksim Yevmenkin <emax@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r221448 - head/usr.sbin/bluetooth/bthidd
Message-ID:  <201105041758.p44HwFfs061115@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emax
Date: Wed May  4 17:58:15 2011
New Revision: 221448
URL: http://svn.freebsd.org/changeset/base/221448

Log:
  Encode horizontal scroll events (AC Pan) as button presses (bit 5 and 6)
  
  Submitted by:	David Demelier demelier dot david at gmail dot com
  MFC after:	1 week

Modified:
  head/usr.sbin/bluetooth/bthidd/hid.c

Modified: head/usr.sbin/bluetooth/bthidd/hid.c
==============================================================================
--- head/usr.sbin/bluetooth/bthidd/hid.c	Wed May  4 17:56:53 2011	(r221447)
+++ head/usr.sbin/bluetooth/bthidd/hid.c	Wed May  4 17:58:15 2011	(r221448)
@@ -229,6 +229,17 @@ hid_interrupt(bthid_session_p s, uint8_t
 				break;
 
 			switch (usage) {
+			case HUC_AC_PAN:
+				/* Horizontal scroll */
+				if (val < 0)
+					mouse_butt |= (1 << 5);
+				else
+					mouse_butt |= (1 << 6);
+
+				mevents ++;
+				val = 0;
+				break;
+
 			case 0xb5: /* Scan Next Track */
 				val = 0x19;
 				break;



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