Middle mouse button emulated even though disabled in xinput/libinput
up vote
0
down vote
favorite
It should be disabled, and yet I get middle mouse button clicks. When I run xinput list I get this:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ PixArt Microsoft USB Optical Mouse id=9 [slave pointer (2)]
⎜ ↳ SQT USB Gaming Keyboard id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
... and a few more non-pointing devices. Examining each of these in turn, I see that only 9 (the mouse) has middle click emulation set... to zero.
Device 'PixArt Microsoft USB Optical Mouse':
Device Enabled (152): 1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (288): 0
libinput Natural Scrolling Enabled Default (289): 0
libinput Scroll Methods Available (290): 0, 0, 1
libinput Scroll Method Enabled (291): 0, 0, 0
libinput Scroll Method Enabled Default (292): 0, 0, 0
libinput Button Scrolling Button (293): 2
libinput Button Scrolling Button Default (294): 2
libinput Middle Emulation Enabled (295): 0
libinput Middle Emulation Enabled Default (296): 0
libinput Accel Speed (297): 0.000000
libinput Accel Speed Default (298): 0.000000
libinput Accel Profiles Available (299): 1, 1
libinput Accel Profile Enabled (300): 1, 0
libinput Accel Profile Enabled Default (301): 1, 0
libinput Left Handed Enabled (302): 0
libinput Left Handed Enabled Default (303): 0
libinput Send Events Modes Available (273): 1, 0
libinput Send Events Mode Enabled (274): 0, 0
libinput Send Events Mode Enabled Default (275): 0, 0
Device Node (276): "/dev/input/event3"
Device Product ID (277): 1118, 203
libinput Drag Lock Buttons (304): <no items>
libinput Horizontal Scroll Enabled (305): 1
And yet I get middle clicks in games. To prove I'm not going crazy, I wrote a tiny SDL2 program myself to check:
#include <SDL.h>
int main(int argc, char ** argv)
{
int quit = 0;
SDL_Event event;
SDL_Init(SDL_INIT_VIDEO);
SDL_Window *window = SDL_CreateWindow("Middle click detector",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0);
while (!quit)
{
SDL_WaitEvent(&event);
switch (event.type)
{
case SDL_QUIT:
quit = 1;
break;
case SDL_MOUSEBUTTONDOWN:
if (event.button.button == SDL_BUTTON_MIDDLE)
printf("Middle clicked!n");
else if (event.button.button == SDL_BUTTON_LEFT)
printf("Left clicked!n");
else if (event.button.button == SDL_BUTTON_RIGHT)
printf("Right clicked!n");
else
printf("What clicked?n");
}
}
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}
(compiled with gcc sdltest.c -Wall `sdl2-config --cflags --libs`)
Sure enough, if I hold left and click right, I get:
Left clicked!
Right clicked!
Middle clicked!
People who know anything about the input pipeline on Linux, can you please give me a clue where to look next? I'm at a loss. I'll also be grateful for anyone who can run the test program and confirm or deny that they have the same issue.
mouse xinput libinput
add a comment |
up vote
0
down vote
favorite
It should be disabled, and yet I get middle mouse button clicks. When I run xinput list I get this:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ PixArt Microsoft USB Optical Mouse id=9 [slave pointer (2)]
⎜ ↳ SQT USB Gaming Keyboard id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
... and a few more non-pointing devices. Examining each of these in turn, I see that only 9 (the mouse) has middle click emulation set... to zero.
Device 'PixArt Microsoft USB Optical Mouse':
Device Enabled (152): 1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (288): 0
libinput Natural Scrolling Enabled Default (289): 0
libinput Scroll Methods Available (290): 0, 0, 1
libinput Scroll Method Enabled (291): 0, 0, 0
libinput Scroll Method Enabled Default (292): 0, 0, 0
libinput Button Scrolling Button (293): 2
libinput Button Scrolling Button Default (294): 2
libinput Middle Emulation Enabled (295): 0
libinput Middle Emulation Enabled Default (296): 0
libinput Accel Speed (297): 0.000000
libinput Accel Speed Default (298): 0.000000
libinput Accel Profiles Available (299): 1, 1
libinput Accel Profile Enabled (300): 1, 0
libinput Accel Profile Enabled Default (301): 1, 0
libinput Left Handed Enabled (302): 0
libinput Left Handed Enabled Default (303): 0
libinput Send Events Modes Available (273): 1, 0
libinput Send Events Mode Enabled (274): 0, 0
libinput Send Events Mode Enabled Default (275): 0, 0
Device Node (276): "/dev/input/event3"
Device Product ID (277): 1118, 203
libinput Drag Lock Buttons (304): <no items>
libinput Horizontal Scroll Enabled (305): 1
And yet I get middle clicks in games. To prove I'm not going crazy, I wrote a tiny SDL2 program myself to check:
#include <SDL.h>
int main(int argc, char ** argv)
{
int quit = 0;
SDL_Event event;
SDL_Init(SDL_INIT_VIDEO);
SDL_Window *window = SDL_CreateWindow("Middle click detector",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0);
while (!quit)
{
SDL_WaitEvent(&event);
switch (event.type)
{
case SDL_QUIT:
quit = 1;
break;
case SDL_MOUSEBUTTONDOWN:
if (event.button.button == SDL_BUTTON_MIDDLE)
printf("Middle clicked!n");
else if (event.button.button == SDL_BUTTON_LEFT)
printf("Left clicked!n");
else if (event.button.button == SDL_BUTTON_RIGHT)
printf("Right clicked!n");
else
printf("What clicked?n");
}
}
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}
(compiled with gcc sdltest.c -Wall `sdl2-config --cflags --libs`)
Sure enough, if I hold left and click right, I get:
Left clicked!
Right clicked!
Middle clicked!
People who know anything about the input pipeline on Linux, can you please give me a clue where to look next? I'm at a loss. I'll also be grateful for anyone who can run the test program and confirm or deny that they have the same issue.
mouse xinput libinput
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
It should be disabled, and yet I get middle mouse button clicks. When I run xinput list I get this:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ PixArt Microsoft USB Optical Mouse id=9 [slave pointer (2)]
⎜ ↳ SQT USB Gaming Keyboard id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
... and a few more non-pointing devices. Examining each of these in turn, I see that only 9 (the mouse) has middle click emulation set... to zero.
Device 'PixArt Microsoft USB Optical Mouse':
Device Enabled (152): 1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (288): 0
libinput Natural Scrolling Enabled Default (289): 0
libinput Scroll Methods Available (290): 0, 0, 1
libinput Scroll Method Enabled (291): 0, 0, 0
libinput Scroll Method Enabled Default (292): 0, 0, 0
libinput Button Scrolling Button (293): 2
libinput Button Scrolling Button Default (294): 2
libinput Middle Emulation Enabled (295): 0
libinput Middle Emulation Enabled Default (296): 0
libinput Accel Speed (297): 0.000000
libinput Accel Speed Default (298): 0.000000
libinput Accel Profiles Available (299): 1, 1
libinput Accel Profile Enabled (300): 1, 0
libinput Accel Profile Enabled Default (301): 1, 0
libinput Left Handed Enabled (302): 0
libinput Left Handed Enabled Default (303): 0
libinput Send Events Modes Available (273): 1, 0
libinput Send Events Mode Enabled (274): 0, 0
libinput Send Events Mode Enabled Default (275): 0, 0
Device Node (276): "/dev/input/event3"
Device Product ID (277): 1118, 203
libinput Drag Lock Buttons (304): <no items>
libinput Horizontal Scroll Enabled (305): 1
And yet I get middle clicks in games. To prove I'm not going crazy, I wrote a tiny SDL2 program myself to check:
#include <SDL.h>
int main(int argc, char ** argv)
{
int quit = 0;
SDL_Event event;
SDL_Init(SDL_INIT_VIDEO);
SDL_Window *window = SDL_CreateWindow("Middle click detector",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0);
while (!quit)
{
SDL_WaitEvent(&event);
switch (event.type)
{
case SDL_QUIT:
quit = 1;
break;
case SDL_MOUSEBUTTONDOWN:
if (event.button.button == SDL_BUTTON_MIDDLE)
printf("Middle clicked!n");
else if (event.button.button == SDL_BUTTON_LEFT)
printf("Left clicked!n");
else if (event.button.button == SDL_BUTTON_RIGHT)
printf("Right clicked!n");
else
printf("What clicked?n");
}
}
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}
(compiled with gcc sdltest.c -Wall `sdl2-config --cflags --libs`)
Sure enough, if I hold left and click right, I get:
Left clicked!
Right clicked!
Middle clicked!
People who know anything about the input pipeline on Linux, can you please give me a clue where to look next? I'm at a loss. I'll also be grateful for anyone who can run the test program and confirm or deny that they have the same issue.
mouse xinput libinput
It should be disabled, and yet I get middle mouse button clicks. When I run xinput list I get this:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ PixArt Microsoft USB Optical Mouse id=9 [slave pointer (2)]
⎜ ↳ SQT USB Gaming Keyboard id=11 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
... and a few more non-pointing devices. Examining each of these in turn, I see that only 9 (the mouse) has middle click emulation set... to zero.
Device 'PixArt Microsoft USB Optical Mouse':
Device Enabled (152): 1
Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (288): 0
libinput Natural Scrolling Enabled Default (289): 0
libinput Scroll Methods Available (290): 0, 0, 1
libinput Scroll Method Enabled (291): 0, 0, 0
libinput Scroll Method Enabled Default (292): 0, 0, 0
libinput Button Scrolling Button (293): 2
libinput Button Scrolling Button Default (294): 2
libinput Middle Emulation Enabled (295): 0
libinput Middle Emulation Enabled Default (296): 0
libinput Accel Speed (297): 0.000000
libinput Accel Speed Default (298): 0.000000
libinput Accel Profiles Available (299): 1, 1
libinput Accel Profile Enabled (300): 1, 0
libinput Accel Profile Enabled Default (301): 1, 0
libinput Left Handed Enabled (302): 0
libinput Left Handed Enabled Default (303): 0
libinput Send Events Modes Available (273): 1, 0
libinput Send Events Mode Enabled (274): 0, 0
libinput Send Events Mode Enabled Default (275): 0, 0
Device Node (276): "/dev/input/event3"
Device Product ID (277): 1118, 203
libinput Drag Lock Buttons (304): <no items>
libinput Horizontal Scroll Enabled (305): 1
And yet I get middle clicks in games. To prove I'm not going crazy, I wrote a tiny SDL2 program myself to check:
#include <SDL.h>
int main(int argc, char ** argv)
{
int quit = 0;
SDL_Event event;
SDL_Init(SDL_INIT_VIDEO);
SDL_Window *window = SDL_CreateWindow("Middle click detector",
SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0);
while (!quit)
{
SDL_WaitEvent(&event);
switch (event.type)
{
case SDL_QUIT:
quit = 1;
break;
case SDL_MOUSEBUTTONDOWN:
if (event.button.button == SDL_BUTTON_MIDDLE)
printf("Middle clicked!n");
else if (event.button.button == SDL_BUTTON_LEFT)
printf("Left clicked!n");
else if (event.button.button == SDL_BUTTON_RIGHT)
printf("Right clicked!n");
else
printf("What clicked?n");
}
}
SDL_DestroyWindow(window);
SDL_Quit();
return 0;
}
(compiled with gcc sdltest.c -Wall `sdl2-config --cflags --libs`)
Sure enough, if I hold left and click right, I get:
Left clicked!
Right clicked!
Middle clicked!
People who know anything about the input pipeline on Linux, can you please give me a clue where to look next? I'm at a loss. I'll also be grateful for anyone who can run the test program and confirm or deny that they have the same issue.
mouse xinput libinput
mouse xinput libinput
asked Nov 21 at 19:47
Harald Korneliussen
1012
1012
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
It just occurred to me to test out with another mouse. No middle click.
This seems to be a physical (mis)feature of the PixArt Microsoft USB Optical Mouse.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
It just occurred to me to test out with another mouse. No middle click.
This seems to be a physical (mis)feature of the PixArt Microsoft USB Optical Mouse.
add a comment |
up vote
0
down vote
It just occurred to me to test out with another mouse. No middle click.
This seems to be a physical (mis)feature of the PixArt Microsoft USB Optical Mouse.
add a comment |
up vote
0
down vote
up vote
0
down vote
It just occurred to me to test out with another mouse. No middle click.
This seems to be a physical (mis)feature of the PixArt Microsoft USB Optical Mouse.
It just occurred to me to test out with another mouse. No middle click.
This seems to be a physical (mis)feature of the PixArt Microsoft USB Optical Mouse.
answered Nov 21 at 19:58
Harald Korneliussen
1012
1012
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1094915%2fmiddle-mouse-button-emulated-even-though-disabled-in-xinput-libinput%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown