summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/scmouse.c
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1999-11-08 10:04:29 +0000
committeryokota <yokota@FreeBSD.org>1999-11-08 10:04:29 +0000
commit060ce4c0b57a9cb2b803afd8dc48d244f437168b (patch)
tree236b452028c99ea5f8cbf800d6f545b8186069d2 /sys/dev/syscons/scmouse.c
parente6b1d2277113d8872fff564760ea41c8a2c869bc (diff)
downloadFreeBSD-src-060ce4c0b57a9cb2b803afd8dc48d244f437168b.zip
FreeBSD-src-060ce4c0b57a9cb2b803afd8dc48d244f437168b.tar.gz
- Added a new kernel configuration option: SC_TWOBUTTON_MOUSE.
The new option will make the right mouse button the `paste' button. Useful for two button mice. Submitted by: morganw@engr.sc.edu (Wes Morgan)
Diffstat (limited to 'sys/dev/syscons/scmouse.c')
-rw-r--r--sys/dev/syscons/scmouse.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index bc4d93a..496cd7c 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -45,6 +45,14 @@
#include <dev/syscons/syscons.h>
+#ifdef SC_TWOBUTTON_MOUSE
+#define SC_MOUSE_PASTEBUTTON MOUSE_BUTTON3DOWN /* right button */
+#define SC_MOUSE_EXTENDBUTTON MOUSE_BUTTON2DOWN /* not really used */
+#else
+#define SC_MOUSE_PASTEBUTTON MOUSE_BUTTON2DOWN /* middle button */
+#define SC_MOUSE_EXTENDBUTTON MOUSE_BUTTON3DOWN /* right button */
+#endif /* SC_TWOBUTTON_MOUSE */
+
#define SC_WAKEUP_DELTA 20
/* for backward compatibility */
@@ -919,7 +927,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
break;
}
break;
- case MOUSE_BUTTON2DOWN:
+ case SC_MOUSE_PASTEBUTTON:
switch (mouse->u.event.value) {
case 0: /* up */
break;
@@ -928,7 +936,7 @@ sc_mouse_ioctl(struct tty *tp, u_long cmd, caddr_t data, int flag,
break;
}
break;
- case MOUSE_BUTTON3DOWN:
+ case SC_MOUSE_EXTENDBUTTON:
switch (mouse->u.event.value) {
case 0: /* up */
if (!(cur_scp->mouse_buttons & MOUSE_BUTTON1DOWN))
OpenPOWER on IntegriCloud