[core/input] add pseudo-event "update" to selectively update modules
to trigger an update of a module (without actually triggering a mouse interaction), use the special event "update": bumblebee-ctl -m <module> -b update see #784
This commit is contained in:
parent
028932a560
commit
1e13798c95
2 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,7 @@ button = {
|
||||||
"right-mouse": 3,
|
"right-mouse": 3,
|
||||||
"wheel-up": 4,
|
"wheel-up": 4,
|
||||||
"wheel-down": 5,
|
"wheel-down": 5,
|
||||||
|
"update": -1,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +21,7 @@ def main():
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-b",
|
"-b",
|
||||||
"--button",
|
"--button",
|
||||||
choices=["left-mouse", "right-mouse", "middle-mouse", "wheel-up", "wheel-down"],
|
choices=["left-mouse", "right-mouse", "middle-mouse", "wheel-up", "wheel-down", "update"],
|
||||||
help="button to emulate",
|
help="button to emulate",
|
||||||
default="left-mouse",
|
default="left-mouse",
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,6 +10,7 @@ MIDDLE_MOUSE = 2
|
||||||
RIGHT_MOUSE = 3
|
RIGHT_MOUSE = 3
|
||||||
WHEEL_UP = 4
|
WHEEL_UP = 4
|
||||||
WHEEL_DOWN = 5
|
WHEEL_DOWN = 5
|
||||||
|
UPDATE = -1
|
||||||
|
|
||||||
|
|
||||||
def button_name(button):
|
def button_name(button):
|
||||||
|
@ -23,6 +24,8 @@ def button_name(button):
|
||||||
return "wheel-up"
|
return "wheel-up"
|
||||||
if button == WHEEL_DOWN:
|
if button == WHEEL_DOWN:
|
||||||
return "wheel-down"
|
return "wheel-down"
|
||||||
|
if button == UPDATE:
|
||||||
|
return "update"
|
||||||
return "n/a"
|
return "n/a"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue