Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
e6152298
Commit
e6152298
authored
Oct 10, 2006
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VisualNaCro: add 'i', 'c' and 'r' menu keys
parent
5092a3b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletion
+44
-1
ChangeLog
VisualNaCro/ChangeLog
+1
-0
recorder.pl
VisualNaCro/recorder.pl
+43
-1
No files found.
VisualNaCro/ChangeLog
View file @
e6152298
2006-10-10: Johannes Schindelin <Johannes.Schindelin@gmx.de>
* implement --compact and --compact-dragging to shut up the
script about mouse movements or drags.
* add 'i', 'c' and 'r' menu keys.
2006-09-12: Johannes Schindelin <Johannes.Schindelin@gmx.de>
* the reference rectangle is selected with a rubber band,
...
...
VisualNaCro/recorder.pl
View file @
e6152298
...
...
@@ -108,6 +108,29 @@ sub handle_mouse {
}
}
sub
toggle_text
{
my
$text
=
shift
;
if
(
$text
eq
"Timing"
)
{
return
$text
.
" is "
.
(
$timing
?
"on"
:
"off"
);
}
elsif
(
$text
eq
"Key presses"
)
{
return
$text
.
" are recorded "
.
(
$symbolic
?
"symbolically"
:
"numerically"
);
}
elsif
(
$text
eq
"Mouse moves"
)
{
return
$text
.
" are recorded "
.
(
$compact
?
"compacted"
:
"verbosely"
);
}
elsif
(
$text
eq
"Mouse drags"
)
{
return
$text
.
" are recorded "
.
(
$compact
?
"compacted"
:
"verbosely"
);
}
return
$text
.
": <unknown>"
;
}
$menu_message
=
"VisualNaCro: press 'q' to quit,\n"
.
"'i' to display current settings,\n"
.
"'c', 'r' to toggle compact mouse movements or drags,\n"
.
"'d' to display current reference image,\n"
.
"or mark reference rectangle by dragging"
;
while
(
1
)
{
$result
=
nacro::
waitforinput
(
$vnc
,
999999
);
if
(
$result
==
0
)
{
...
...
@@ -135,7 +158,8 @@ while(1) {
if
(
$magickey
>
1
)
{
$magickey
=
0
;
$mode
=
"menu"
;
nacro::
alert
(
$vnc
,
"VisualNaCro: press 'q' to quit,\n'd' to display current reference image,\nor mark reference rectangle by dragging"
,
10
);
nacro::
alert
(
$vnc
,
$menu_message
,
10
);
}
}
}
else
{
...
...
@@ -193,6 +217,24 @@ while(1) {
nacro::
alert
(
$vnc
,
"Error displaying "
.
$pnm
,
10
);
}
}
elsif
(
$keysym
==
ord
(
'i'
))
{
nacro::
alert
(
$vnc
,
"Current settings:\n"
.
"\n"
.
"Script: $output\n"
.
"Server: $server\n"
.
"Listening on port: $port\n"
.
toggle_text
(
"Timing"
)
.
"\n"
.
toggle_text
(
"Key presses"
)
.
"\n"
.
toggle_text
(
"Mouse moves"
)
.
"\n"
.
toggle_text
(
"Mouse drags"
),
10
);
}
elsif
(
$keysym
==
ord
(
'c'
))
{
$compact
=
!
$compact
;
nacro::
alert
(
$vnc
,
toggle_text
(
"Mouse moves"
),
10
);
}
elsif
(
$keysym
==
ord
(
'r'
))
{
$compact_dragging
=
!
$compact_dragging
;
nacro::
alert
(
$vnc
,
toggle_text
(
"Mouse drags"
),
10
);
}
else
{
nacro::
alert
(
$vnc
,
"Unknown key"
,
10
);
}
...
...
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