Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
xorg
app
xkbcomp
Commits
a3a05fd4
Commit
a3a05fd4
authored
Apr 17, 2008
by
Daniel Stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xkbcomp: Take a device ID argument
Allows the user to set maps (or whatever) on arbitrary devices.
parent
be084fbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
xkbcomp.c
xkbcomp.c
+10
-1
No files found.
xkbcomp.c
View file @
a3a05fd4
...
...
@@ -104,6 +104,7 @@ static Bool xkblist= False;
static
char
*
preErrorMsg
=
NULL
;
static
char
*
postErrorMsg
=
NULL
;
static
char
*
errorPrefix
=
NULL
;
static
unsigned
int
device_id
=
XkbUseCoreKbd
;
/***====================================================================***/
...
...
@@ -140,6 +141,7 @@ Usage(int argc,char *argv[])
M
(
" R: recursively list subdirectories
\n
"
);
M
(
" default is all options off
\n
"
);
}
M
(
"-i <deviceid> Specifies device ID (not name) to compile for
\n
"
);
M
(
"-m[ap] <map> Specifies map to compile
\n
"
);
M
(
"-o <file> Specifies output file name
\n
"
);
if
(
!
xkblist
)
{
...
...
@@ -301,6 +303,13 @@ register int i,tmp;
exit
(
1
);
}
}
else
if
((
strncmp
(
argv
[
i
],
"-i"
,
2
)
==
0
)
&&
(
!
xkblist
))
{
if
(
++
i
>=
argc
)
{
if
(
warningLevel
>
0
)
WARN
(
"No device ID specified
\n
"
);
}
device_id
=
atoi
(
argv
[
i
]);
}
else
if
((
strncmp
(
argv
[
i
],
"-l"
,
2
)
==
0
)
&&
(
!
xkblist
))
{
if
(
outputFormat
!=
WANT_DEFAULT
)
{
if
(
warningLevel
>
0
)
{
...
...
@@ -846,7 +855,7 @@ Status status;
else
if
(
inDpy
!=
NULL
)
{
bzero
((
char
*
)
&
result
,
sizeof
(
result
));
result
.
type
=
XkmKeymapFile
;
result
.
xkb
=
XkbGetMap
(
inDpy
,
XkbAllMapComponentsMask
,
XkbUseCoreKb
d
);
result
.
xkb
=
XkbGetMap
(
inDpy
,
XkbAllMapComponentsMask
,
device_i
d
);
if
(
result
.
xkb
==
NULL
)
WSGO
(
"Cannot load keyboard description
\n
"
);
if
(
XkbGetIndicatorMap
(
inDpy
,
~
0
,
result
.
xkb
)
!=
Success
)
...
...
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