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
84d6dd0e
Commit
84d6dd0e
authored
Aug 19, 2007
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
malloc score_hint and make it shorts to save space.
parent
222ecab5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
11 deletions
+19
-11
README
x11vnc/README
+2
-2
help.c
x11vnc/help.c
+1
-1
keyboard.c
x11vnc/keyboard.c
+15
-7
x11vnc.1
x11vnc/x11vnc.1
+1
-1
No files found.
x11vnc/README
View file @
84d6dd0e
x11vnc
README
file
Date
:
Sun
Aug
19
1
4
:
30
:
12
EDT
2007
x11vnc
README
file
Date
:
Sun
Aug
19
1
5
:
46
:
48
EDT
2007
The
following
information
is
taken
from
these
URLs
:
...
...
@@ -13101,7 +13101,7 @@ t
They
apply
only
when
there
is
ambiguity
as
to
which
key
to
choose
(
i
.
e
the
mapping
is
not
one
-
to
-
one
).
NOKEYHINTS
=
1
:
for
up
ascii
keystrokes
do
not
use
score
hints
saved
when
the
ke
ep
was
press
down
.
NOANYDOWN
=
1
:
hints
saved
when
the
ke
y
was
pressed
down
.
NOANYDOWN
=
1
:
for
up
keystrokes
do
not
resort
to
searching
through
keys
that
are
currently
pressed
down
.
KEYSDOWN
=
N
:
remember
the
last
N
keys
press
down
for
tie
-
breaking
...
...
x11vnc/help.c
View file @
84d6dd0e
...
...
@@ -1943,7 +1943,7 @@ void print_help(int mode) {
" They apply only when there is ambiguity as to which
\n
"
" key to choose (i.e the mapping is not one-to-one).
\n
"
" NOKEYHINTS=1: for up ascii keystrokes do not use score
\n
"
" hints saved when the ke
ep was press down.
NOANYDOWN=1:
\n
"
" hints saved when the ke
y was pressed down.
NOANYDOWN=1:
\n
"
" for up keystrokes do not resort to searching through
\n
"
" keys that are currently pressed down. KEYSDOWN=N:
\n
"
" remember the last N keys press down for tie-breaking
\n
"
...
...
x11vnc/keyboard.c
View file @
84d6dd0e
...
...
@@ -1466,7 +1466,7 @@ xkbmodifiers[] For the KeySym bound to this (keycode,group,level) store
}
}
static
int
score_hint
[
0x100
][
0x100
]
;
static
short
**
score_hint
=
NULL
;
/*
* Called on user keyboard input. Try to solve the reverse mapping
* problem: KeySym (from VNC client) => KeyCode(s) to press to generate
...
...
@@ -1516,9 +1516,16 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
}
else
{
klast
=
3
;
}
for
(
i
=
0
;
i
<
0x100
;
i
++
)
{
for
(
j
=
0
;
j
<
0x100
;
j
++
)
{
score_hint
[
i
][
j
]
=
-
1
;
if
(
khints
&&
score_hint
==
NULL
)
{
score_hint
=
(
short
**
)
malloc
(
0x100
*
sizeof
(
short
*
));
for
(
i
=
0
;
i
<
0x100
;
i
++
)
{
score_hint
[
i
]
=
(
short
*
)
malloc
(
0x100
*
sizeof
(
short
));
}
for
(
i
=
0
;
i
<
0x100
;
i
++
)
{
for
(
j
=
0
;
j
<
0x100
;
j
++
)
{
score_hint
[
i
][
j
]
=
-
1
;
}
}
}
}
...
...
@@ -1714,7 +1721,7 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
kc_f
[
l
],
myscore
);
}
if
(
khints
&&
keysym
<
0x100
&&
kc_f
[
l
]
<
0x100
)
{
score_hint
[(
int
)
keysym
][
kc_f
[
l
]]
=
score
[
l
];
score_hint
[(
int
)
keysym
][
kc_f
[
l
]]
=
(
short
)
score
[
l
];
}
}
for
(
l
=
0
;
l
<
found
;
l
++
)
{
...
...
@@ -1738,7 +1745,8 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
if
(
khints
&&
keysym
<
0x100
)
{
/* low keysyms, ascii, only */
int
ks
=
(
int
)
keysym
;
int
ok
=
1
,
sbest
=
-
1
,
lbest
,
l
;
int
ok
=
1
,
lbest
,
l
;
short
sbest
=
-
1
;
for
(
l
=
0
;
l
<
found
;
l
++
)
{
if
(
kc_f
[
l
]
<
0x100
)
{
int
key
=
(
int
)
kc_f
[
l
];
...
...
@@ -1812,7 +1820,6 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
* physical display (but is updated
* periodically to clean out stale info).
*/
/* we could probably break ties based on lowest XKeycodeToKeysym index */
for
(
l
=
0
;
l
<
found
;
l
++
)
{
int
key
=
(
int
)
kc_f
[
l
];
int
j
,
jmatch
=
-
1
;
...
...
@@ -1820,6 +1827,7 @@ static void xkb_tweak_keyboard(rfbBool down, rfbKeySym keysym,
if
(
keycode_state
[
key
])
{
continue
;
}
/* break ties based on lowest XKeycodeToKeysym index */
for
(
j
=
0
;
j
<
8
;
j
++
)
{
KeySym
ks
=
XKeycodeToKeysym
(
dpy
,
kc_f
[
l
],
j
);
if
(
ks
!=
NoSymbol
&&
ks
==
keysym
)
{
...
...
x11vnc/x11vnc.1
View file @
84d6dd0e
...
...
@@ -2245,7 +2245,7 @@ When \fB-xkb\fR mode is active you can set these env. vars.
They apply only when there is ambiguity as to which
key to choose (i.e the mapping is not one-to-one).
NOKEYHINTS=1: for up ascii keystrokes do not use score
hints saved when the ke
ep was press down.
NOANYDOWN=1:
hints saved when the ke
y was pressed down.
NOANYDOWN=1:
for up keystrokes do not resort to searching through
keys that are currently pressed down. KEYSDOWN=N:
remember the last N keys press down for tie-breaking
...
...
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