svn commit: r221448 - head/usr.sbin/bluetooth/bthidd

Maksim Yevmenkin emax at FreeBSD.org
Wed May 4 17:58:15 UTC 2011


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;


More information about the svn-src-head mailing list