Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
90de252b
Commit
90de252b
authored
May 13, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add zoom (z) and unzoom (shift+z) hotkeys
parent
1cf7350b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
0 deletions
+47
-0
include/vlc_keys.h
include/vlc_keys.h
+2
-0
modules/control/hotkeys.c
modules/control/hotkeys.c
+29
-0
src/libvlc.h
src/libvlc.h
+16
-0
No files found.
include/vlc_keys.h
View file @
90de252b
...
...
@@ -256,3 +256,5 @@ static inline int StringToKey( char *psz_key )
#define ACTIONID_ASPECT_RATIO 67
#define ACTIONID_CROP 68
#define ACTIONID_DEINTERLACE 69
#define ACTIONID_ZOOM 70
#define ACTIONID_UNZOOM 71
modules/control/hotkeys.c
View file @
90de252b
...
...
@@ -589,6 +589,35 @@ static void Run( intf_thread_t *p_intf )
}
free
(
val
.
psz_string
);
}
else
if
(
(
i_action
==
ACTIONID_ZOOM
||
i_action
==
ACTIONID_UNZOOM
)
&&
p_vout
)
{
vlc_value_t
val
=
{
0
},
val_list
,
text_list
;
var_Get
(
p_vout
,
"zoom"
,
&
val
);
if
(
var_Change
(
p_vout
,
"zoom"
,
VLC_VAR_GETLIST
,
&
val_list
,
&
text_list
)
>=
0
)
{
int
i
;
for
(
i
=
0
;
i
<
val_list
.
p_list
->
i_count
;
i
++
)
{
if
(
val_list
.
p_list
->
p_values
[
i
].
f_float
==
val
.
f_float
)
{
if
(
i_action
==
ACTIONID_ZOOM
)
i
++
;
else
/* ACTIONID_UNZOOM */
i
--
;
break
;
}
}
if
(
i
==
val_list
.
p_list
->
i_count
)
i
=
0
;
if
(
i
==
-
1
)
i
=
val_list
.
p_list
->
i_count
-
1
;
var_SetFloat
(
p_vout
,
"zoom"
,
val_list
.
p_list
->
p_values
[
i
].
f_float
);
vout_OSDMessage
(
VLC_OBJECT
(
p_input
),
DEFAULT_CHAN
,
_
(
"Zoom mode: %s"
),
text_list
.
p_list
->
p_values
[
i
].
var
.
psz_name
);
}
}
else
if
(
i_action
==
ACTIONID_NEXT
)
{
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
...
...
src/libvlc.h
View file @
90de252b
...
...
@@ -1072,6 +1072,12 @@ static char *ppsz_clock_descriptions[] =
#define RECORD_KEY_TEXT N_("Record")
#define RECORD_KEY_LONGTEXT N_("Record access filter start/stop.")
#define ZOOM_KEY_TEXT N_("Zoom")
#define ZOOM_KEY_LONGTEXT N_("Zoom")
#define UNZOOM_KEY_TEXT N_("Un-Zoom")
#define UNZOOM_KEY_LONGTEXT N_("Un-Zoom")
#define VLC_USAGE N_( \
"Usage: %s [options] [stream] ..." \
...
...
@@ -1638,6 +1644,8 @@ vlc_module_begin();
# define KEY_CHAPTER_PREV KEY_MODIFIER_CTRL|'u'
# define KEY_CHAPTER_NEXT KEY_MODIFIER_CTRL|'d'
# define KEY_SNAPSHOT KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|'s'
# define KEY_ZOOM 'z'
# define KEY_UNZOOM KEY_MODIFIER_SHIFT|'z'
# define KEY_SET_BOOKMARK1 KEY_MODIFIER_COMMAND|KEY_F1
# define KEY_SET_BOOKMARK2 KEY_MODIFIER_COMMAND|KEY_F2
...
...
@@ -1709,6 +1717,8 @@ vlc_module_begin();
# define KEY_CHAPTER_PREV KEY_MODIFIER_CTRL|'u'
# define KEY_CHAPTER_NEXT KEY_MODIFIER_CTRL|'d'
# define KEY_SNAPSHOT KEY_MODIFIER_CTRL|KEY_MODIFIER_ALT|'s'
# define KEY_ZOOM 'z'
# define KEY_UNZOOM KEY_MODIFIER_SHIFT|'z'
# define KEY_SET_BOOKMARK1 KEY_MODIFIER_CTRL|KEY_F1
# define KEY_SET_BOOKMARK2 KEY_MODIFIER_CTRL|KEY_F2
...
...
@@ -1830,6 +1840,10 @@ vlc_module_begin();
HISTORY_FORWARD_TEXT
,
HISTORY_FORWARD_LONGTEXT
,
VLC_TRUE
);
add_key
(
"key-record"
,
KEY_RECORD
,
NULL
,
RECORD_KEY_TEXT
,
RECORD_KEY_LONGTEXT
,
VLC_TRUE
);
add_key
(
"key-zoom"
,
KEY_ZOOM
,
NULL
,
ZOOM_KEY_TEXT
,
ZOOM_KEY_LONGTEXT
,
VLC_TRUE
);
add_key
(
"key-unzoom"
,
KEY_UNZOOM
,
NULL
,
UNZOOM_KEY_TEXT
,
UNZOOM_KEY_LONGTEXT
,
VLC_TRUE
);
set_section
(
N_
(
"Jump sizes"
),
NULL
);
add_integer
(
"extrashort-jump-size"
,
3
,
NULL
,
JIEXTRASHORT_TEXT
,
...
...
@@ -1984,6 +1998,8 @@ static struct hotkey p_hotkeys[] =
{
"key-intf-show"
,
ACTIONID_INTF_SHOW
,
0
,
0
,
0
,
0
},
{
"key-intf-hide"
,
ACTIONID_INTF_HIDE
,
0
,
0
,
0
,
0
},
{
"key-snapshot"
,
ACTIONID_SNAPSHOT
,
0
,
0
,
0
,
0
},
{
"key-zoom"
,
ACTIONID_ZOOM
,
0
,
0
,
0
,
0
},
{
"key-unzoom"
,
ACTIONID_UNZOOM
,
0
,
0
,
0
,
0
},
{
"key-nav-activate"
,
ACTIONID_NAV_ACTIVATE
,
0
,
0
,
0
,
0
},
{
"key-nav-up"
,
ACTIONID_NAV_UP
,
0
,
0
,
0
,
0
},
{
"key-nav-down"
,
ACTIONID_NAV_DOWN
,
0
,
0
,
0
,
0
},
...
...
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