Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
funkeymonkey-pyrainput
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
packages
funkeymonkey-pyrainput
Commits
1f08fa73
Commit
1f08fa73
authored
Jan 09, 2021
by
sebt3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added mouse_middle option for nubs click
parent
89efe3fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
README.md
README.md
+2
-2
debian/changelog
debian/changelog
+7
-0
pyrainput.cpp
pyrainput.cpp
+10
-1
No files found.
README.md
View file @
1f08fa73
...
...
@@ -44,8 +44,8 @@ nubs.left.x = [*mouse_x*|mouse_y|mouse_btn|scroll_x|scroll_y]
nubs.left.y = [mouse_x|*mouse_y*|mouse_btn|scroll_x|scroll_y]
nubs.right.x = [mouse_x|mouse_y|*mouse_btn*|scroll_x|scroll_y]
nubs.right.y = [mouse_x|mouse_y|mouse_btn|scroll_x|*scroll_y*]
nubs.left.click = [*mouse_left*|mouse_right]
nubs.right.click = [mouse_left|*mouse_right*]
nubs.left.click = [*mouse_left*|mouse_
middle|mouse_
right]
nubs.right.click = [mouse_left|
mouse_middle|
*mouse_right*]
altmode.start.button = [*left_alt*|right_alt]
altmode.right.trigger = [left_alt|*right_alt*]
gamepad.export = 1
...
...
debian/changelog
View file @
1f08fa73
funkeymonkey-pyrainput (0.1.9) unstable; urgency=medium
[ Sébastien Huss ]
* Added mouse_middle option for nubs click
-- Pyra Dev <pyra-dev@pyra-handheld.com> Sat, 9 Jan 2021 13:01:44 +0100
funkeymonkey-pyrainput (0.1.8) unstable; urgency=medium
[ aTc ]
...
...
pyrainput.cpp
View file @
1f08fa73
...
...
@@ -99,7 +99,7 @@ struct Settings {
enum
NubClickMode
{
UNKNOWN_NUB_CLICK_MODE
,
NUB_CLICK_LEFT
,
NUB_CLICK_RIGHT
,
MOUSE_LEFT
,
MOUSE_RIGHT
MOUSE_LEFT
,
MOUSE_
MIDDLE
,
MOUSE_
RIGHT
};
enum
AltMode
{
LEFT_ALT
,
RIGHT_ALT
...
...
@@ -150,6 +150,7 @@ NubClickModeMap const NUB_CLICK_MODES = {
{
"nub_click_left"
,
Settings
::
NUB_CLICK_LEFT
},
{
"nub_click_right"
,
Settings
::
NUB_CLICK_RIGHT
},
{
"mouse_left"
,
Settings
::
MOUSE_LEFT
},
{
"mouse_middle"
,
Settings
::
MOUSE_MIDDLE
},
{
"mouse_right"
,
Settings
::
MOUSE_RIGHT
}
};
...
...
@@ -646,6 +647,14 @@ void handleNubAxis(Settings::NubAxisMode mode, int value, Mouse* mouse, UinputDe
void
handleNubClick
(
Settings
::
NubClickMode
mode
,
int
value
,
Mouse
*
mouse
,
UinputDevice
*
gamepad
,
Settings
const
&
settings
)
{
switch
(
mode
)
{
case
Settings
::
MOUSE_MIDDLE
:
{
if
(
global
.
settings
.
exportMouse
)
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
mouse
->
mutex
);
mouse
->
device
.
send
(
EV_KEY
,
BTN_MIDDLE
,
value
);
mouse
->
device
.
send
(
EV_SYN
,
0
,
0
);
}
break
;
}
case
Settings
::
MOUSE_LEFT
:
{
if
(
global
.
settings
.
exportMouse
)
{
std
::
lock_guard
<
std
::
mutex
>
lk
(
mouse
->
mutex
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment