Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
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
videolan
vlc
Commits
aa958337
Commit
aa958337
authored
Aug 16, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
keys: separate config for each axis of the mouse wheel (fixes #5883)
parent
3b0f342f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
26 deletions
+33
-26
src/config/keys.c
src/config/keys.c
+19
-14
src/libvlc-module.c
src/libvlc-module.c
+14
-12
No files found.
src/config/keys.c
View file @
aa958337
...
...
@@ -511,21 +511,26 @@ struct vlc_actions *vlc_InitActions (libvlc_int_t *libvlc)
keys
->
psz_action
=
NULL
;
/* Initialize mouse wheel events */
int
mousemode
=
var_InheritInteger
(
obj
,
"hotkeys-mouse
wheel-mode"
);
if
(
mouse
mode
<
2
)
int
xmode
=
var_InheritInteger
(
obj
,
"hotkeys-x-
wheel-mode"
);
if
(
x
mode
<
2
)
{
vlc_AddMapping
(
&
as
->
map
,
mousemode
?
KEY_MOUSEWHEELRIGHT
:
KEY_MOUSEWHEELUP
,
ACTIONID_VOL_UP
);
vlc_AddMapping
(
&
as
->
map
,
mousemode
?
KEY_MOUSEWHEELLEFT
:
KEY_MOUSEWHEELDOWN
,
ACTIONID_VOL_DOWN
);
vlc_AddMapping
(
&
as
->
map
,
mousemode
?
KEY_MOUSEWHEELUP
:
KEY_MOUSEWHEELRIGHT
,
ACTIONID_JUMP_FORWARD_EXTRASHORT
);
vlc_AddMapping
(
&
as
->
map
,
mousemode
?
KEY_MOUSEWHEELDOWN
:
KEY_MOUSEWHEELLEFT
,
ACTIONID_JUMP_BACKWARD_EXTRASHORT
);
vlc_AddMapping
(
&
as
->
map
,
KEY_MOUSEWHEELLEFT
,
xmode
?
ACTIONID_JUMP_BACKWARD_EXTRASHORT
:
ACTIONID_VOL_DOWN
);
vlc_AddMapping
(
&
as
->
map
,
KEY_MOUSEWHEELRIGHT
,
xmode
?
ACTIONID_JUMP_FORWARD_EXTRASHORT
:
ACTIONID_VOL_UP
);
}
int
ymode
=
var_InheritInteger
(
obj
,
"hotkeys-y-wheel-mode"
);
if
(
ymode
<
2
)
{
vlc_AddMapping
(
&
as
->
map
,
KEY_MOUSEWHEELDOWN
,
ymode
?
ACTIONID_JUMP_BACKWARD_EXTRASHORT
:
ACTIONID_VOL_DOWN
);
vlc_AddMapping
(
&
as
->
map
,
KEY_MOUSEWHEELUP
,
ymode
?
ACTIONID_JUMP_FORWARD_EXTRASHORT
:
ACTIONID_VOL_UP
);
}
...
...
src/libvlc-module.c
View file @
aa958337
...
...
@@ -1172,20 +1172,18 @@ static const char *const ppsz_prefres[] = {
#define HOTKEY_CAT_LONGTEXT N_( "These settings are the global VLC key " \
"bindings, known as \"hotkeys\"." )
enum
{
MOUSEWHEEL_VOLUME
,
MOUSEWHEEL_POSITION
,
NO_MOUSEWHEEL
,
};
static
const
int
mouse_wheel_values
[]
=
{
2
,
0
,
1
};
static
const
char
*
const
mouse_wheel_texts
[]
=
{
N_
(
"Ignore"
),
N_
(
"Volume Control"
),
N_
(
"Position Control"
)
};
#define MOUSE_WHEEL_MODE_TEXT N_("MouseWheel up-down axis Control")
#define MOUSE_WHEEL_MODE_LONGTEXT N_( \
"The MouseWheel up-down (vertical) axis can control volume, position or " \
"mousewheel event can be ignored")
#define MOUSE_Y_WHEEL_MODE_TEXT N_("Mouse wheel vertical axis control")
#define MOUSE_Y_WHEEL_MODE_LONGTEXT N_( \
"The mouse wheel vertical (up/down) axis can control volume, " \
"position or be ignored.")
#define MOUSE_X_WHEEL_MODE_TEXT N_("Mouse wheel horizontal axis control")
#define MOUSE_X_WHEEL_MODE_LONGTEXT N_( \
"The mouse wheel horizontal (left/right) axis can control volume, " \
"position or be ignored.")
#define TOGGLE_FULLSCREEN_KEY_TEXT N_("Fullscreen")
#define TOGGLE_FULLSCREEN_KEY_LONGTEXT N_("Select the hotkey to use to swap fullscreen state.")
#define LEAVE_FULLSCREEN_KEY_TEXT N_("Exit fullscreen")
...
...
@@ -2093,9 +2091,13 @@ vlc_module_begin ()
set_subcategory
(
SUBCAT_INTERFACE_HOTKEYS
)
add_category_hint
(
N_
(
"Hot keys"
),
HOTKEY_CAT_LONGTEXT
,
false
)
add_integer
(
"hotkeys-mousewheel-mode"
,
0
,
MOUSE_WHEEL_MODE_TEXT
,
MOUSE_WHEEL_MODE_LONGTEXT
,
false
)
add_integer
(
"hotkeys-y-wheel-mode"
,
0
,
MOUSE_Y_WHEEL_MODE_TEXT
,
MOUSE_Y_WHEEL_MODE_LONGTEXT
,
false
)
change_integer_list
(
mouse_wheel_values
,
mouse_wheel_texts
)
add_integer
(
"hotkeys-x-wheel-mode"
,
1
,
MOUSE_X_WHEEL_MODE_TEXT
,
MOUSE_X_WHEEL_MODE_LONGTEXT
,
false
)
change_integer_list
(
mouse_wheel_values
,
mouse_wheel_texts
)
add_obsolete_integer
(
"hotkeys-mousewheel-mode"
)
/* since 3.0.0 */
#if defined(__APPLE__)
/* Don't use the following combo's */
...
...
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