Browse Source

Input: mousedev - remap BTN_FORWARD from BTN_LEFT to BTN_MIDDLE

In mousedev the BTN_LEFT and BTN_FORWARD were mapped to mouse button 0,
causing that the user space program cannot distinguish between them through
/dev/input/mice. All mice have BTN_LEFT, but not all have BTN_MIDDLE (e.g.
Clevo D410J laptop). Mapping BTN_FORWARD to mouse button 2 makes the
BTN_FORWARD button useful on this laptop.

Signed-off-by: Marton Nemeth <nm127@freemail.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Marton Nemeth 18 years ago
parent
commit
6c595fb12f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/input/mousedev.c

+ 1 - 1
drivers/input/mousedev.c

@@ -196,12 +196,12 @@ static void mousedev_key_event(struct mousedev *mousedev, unsigned int code, int
 	switch (code) {
 	switch (code) {
 		case BTN_TOUCH:
 		case BTN_TOUCH:
 		case BTN_0:
 		case BTN_0:
-		case BTN_FORWARD:
 		case BTN_LEFT:		index = 0; break;
 		case BTN_LEFT:		index = 0; break;
 		case BTN_STYLUS:
 		case BTN_STYLUS:
 		case BTN_1:
 		case BTN_1:
 		case BTN_RIGHT:		index = 1; break;
 		case BTN_RIGHT:		index = 1; break;
 		case BTN_2:
 		case BTN_2:
+		case BTN_FORWARD:
 		case BTN_STYLUS2:
 		case BTN_STYLUS2:
 		case BTN_MIDDLE:	index = 2; break;
 		case BTN_MIDDLE:	index = 2; break;
 		case BTN_3:
 		case BTN_3: