- 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)
This commit is contained in:
yokota 1999-11-08 10:04:29 +00:00
parent a4a53f8cbd
commit 9f6783d768
5 changed files with 14 additions and 2 deletions

View File

@ -35,6 +35,7 @@ SC_NO_HISTORY opt_syscons.h
SC_NO_SYSMOUSE opt_syscons.h
SC_PIXEL_MODE opt_syscons.h
SC_RENDER_DEBUG opt_syscons.h
SC_TWOBUTTON_MOUSE opt_syscons.h
VGA_ALT_SEQACCESS opt_vga.h
VGA_DEBUG opt_vga.h

View File

@ -35,6 +35,7 @@ SC_NO_HISTORY opt_syscons.h
SC_NO_SYSMOUSE opt_syscons.h
SC_PIXEL_MODE opt_syscons.h
SC_RENDER_DEBUG opt_syscons.h
SC_TWOBUTTON_MOUSE opt_syscons.h
VGA_ALT_SEQACCESS opt_vga.h
VGA_DEBUG opt_vga.h

View File

@ -75,6 +75,7 @@ SC_NO_HISTORY opt_syscons.h
SC_NO_SYSMOUSE opt_syscons.h
SC_PIXEL_MODE opt_syscons.h
SC_RENDER_DEBUG opt_syscons.h
SC_TWOBUTTON_MOUSE opt_syscons.h
VGA_ALT_SEQACCESS opt_vga.h
VGA_DEBUG opt_vga.h

View File

@ -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))

View File

@ -75,6 +75,7 @@ SC_NO_HISTORY opt_syscons.h
SC_NO_SYSMOUSE opt_syscons.h
SC_PIXEL_MODE opt_syscons.h
SC_RENDER_DEBUG opt_syscons.h
SC_TWOBUTTON_MOUSE opt_syscons.h
VGA_ALT_SEQACCESS opt_vga.h
VGA_DEBUG opt_vga.h