From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 2 08:50:05 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBA17106567E for ; Fri, 2 Sep 2011 08:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BD5DB8FC2B for ; Fri, 2 Sep 2011 08:50:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p828o46v038475 for ; Fri, 2 Sep 2011 08:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p828o4cp038474; Fri, 2 Sep 2011 08:50:04 GMT (envelope-from gnats) Resent-Date: Fri, 2 Sep 2011 08:50:04 GMT Resent-Message-Id: <201109020850.p828o4cp038474@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, h h Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8493D106566B for ; Fri, 2 Sep 2011 08:44:27 +0000 (UTC) (envelope-from aakuusta@gmail.com) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx1.freebsd.org (Postfix) with ESMTP id 5F9738FC15 for ; Fri, 2 Sep 2011 08:44:27 +0000 (UTC) Received: by pzk33 with SMTP id 33so8092316pzk.18 for ; Fri, 02 Sep 2011 01:44:27 -0700 (PDT) Received: by 10.68.71.167 with SMTP id w7mr1594665pbu.386.1314951661421; Fri, 02 Sep 2011 01:21:01 -0700 (PDT) Received: from localhost (tor-exit-router35-readme.formlessnetworking.net. [199.48.147.35]) by mx.google.com with ESMTPS id t7sm8587787pbn.11.2011.09.02.01.20.58 (version=SSLv3 cipher=OTHER); Fri, 02 Sep 2011 01:21:00 -0700 (PDT) Message-Id: <86liu7jqxm.fsf@gmail.com> Date: Fri, 02 Sep 2011 12:20:53 +0400 From: h h To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: bin/160386: [patch] invert Z axis movement via moused(8) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 08:50:05 -0000 >Number: 160386 >Category: bin >Synopsis: [patch] invert Z axis movement via moused(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Sep 02 08:50:04 UTC 2011 >Closed-Date: >Last-Modified: >Originator: h h >Release: FreeBSD 9.0-BETA2 amd64 >Organization: >Environment: moused_flags="-a -1 -z -z" # invert X,Y,Z axes >Description: Provide a more predictable way to invert Z axis. cf. http://forums.freebsd.org/showthread.php?t=2377 >How-To-Repeat: >Fix: --- a.diff begins here --- Index: usr.sbin/moused/moused.8 =================================================================== --- usr.sbin/moused/moused.8 (revision 225315) +++ usr.sbin/moused/moused.8 (working copy) @@ -491,6 +491,8 @@ maybe: .It Ar x .It Ar y X or Y axis movement will be reported when the Z axis movement is detected. +.It Ar -z +Invert Z axis movement. .It Ar N Report down events for the virtual buttons .Ar N Index: usr.sbin/moused/moused.c =================================================================== --- usr.sbin/moused/moused.c (revision 225315) +++ usr.sbin/moused/moused.c (working copy) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #define MOUSE_XAXIS (-1) #define MOUSE_YAXIS (-2) +#define MOUSE_IZAXIS (-3) /* Logitech PS2++ protocol */ #define MOUSE_PS2PLUS_CHECKBITS(b) \ @@ -705,6 +706,8 @@ main(int argc, char *argv[]) rodent.zmap[0] = MOUSE_XAXIS; else if (strcmp(optarg, "y") == 0) rodent.zmap[0] = MOUSE_YAXIS; + else if (strcmp(optarg, "-z") == 0) + rodent.zmap[0] = MOUSE_IZAXIS; else { i = atoi(optarg); /* @@ -2522,6 +2525,10 @@ r_map(mousestatus_t *act1, mousestatus_t *act2) act2->dz = 0; } break; + case MOUSE_IZAXIS: + if (act1->dz != 0) + act2->dz = -act1->dz; + break; default: /* buttons */ pbuttons &= ~(rodent.zmap[0] | rodent.zmap[1] | rodent.zmap[2] | rodent.zmap[3]); --- a.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: