sync
This commit is contained in:
parent
50c8bafd9f
commit
ac06c97e30
820 changed files with 467502 additions and 386453 deletions
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Copyright 2005 Red Hat, Inc.
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
|
@ -10,7 +10,7 @@
|
|||
# specific, written prior permission. Red Hat makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
#
|
||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
1783
app/xmodmap/config.guess
vendored
1783
app/xmodmap/config.guess
vendored
File diff suppressed because it is too large
Load diff
2954
app/xmodmap/config.sub
vendored
2954
app/xmodmap/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
|
||||
dnl Copyright 2005 Red Hat, Inc.
|
||||
dnl
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
|
@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
|
|||
dnl specific, written prior permission. Red Hat makes no
|
||||
dnl representations about the suitability of this software for any purpose. It
|
||||
dnl is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl
|
||||
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
|
@ -111,7 +111,7 @@ mapping_busy_pointer(int timeout)
|
|||
"%s: please release the following buttons within %d seconds:\n",
|
||||
ProgramName, timeout);
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (mask & masks[i])
|
||||
if (mask & masks[i])
|
||||
fprintf (stderr, " Button%d\n", i+1);
|
||||
}
|
||||
sleep (timeout);
|
||||
|
@ -124,7 +124,7 @@ mapping_busy_pointer(int timeout)
|
|||
* and deals with retransmissions due to the keyboard being busy.
|
||||
*/
|
||||
|
||||
int
|
||||
int
|
||||
UpdateModifierMapping(XModifierKeymap *map)
|
||||
{
|
||||
int retries, timeout;
|
||||
|
@ -160,7 +160,7 @@ UpdateModifierMapping(XModifierKeymap *map)
|
|||
* AddModifier - this adds a keycode to the modifier list
|
||||
*/
|
||||
|
||||
int
|
||||
int
|
||||
AddModifier(XModifierKeymap **mapp, KeyCode keycode, int modifier)
|
||||
{
|
||||
if (keycode) {
|
||||
|
@ -177,7 +177,7 @@ AddModifier(XModifierKeymap **mapp, KeyCode keycode, int modifier)
|
|||
* DeleteModifier - this removes a keycode from the modifier list
|
||||
*/
|
||||
|
||||
int
|
||||
int
|
||||
RemoveModifier(XModifierKeymap **mapp, KeyCode keycode, int modifier)
|
||||
{
|
||||
if (keycode) {
|
||||
|
@ -194,7 +194,7 @@ RemoveModifier(XModifierKeymap **mapp, KeyCode keycode, int modifier)
|
|||
* ClearModifier - this removes all entries from the modifier list
|
||||
*/
|
||||
|
||||
int
|
||||
int
|
||||
ClearModifier(XModifierKeymap **mapp, int modifier)
|
||||
{
|
||||
int i;
|
||||
|
@ -231,7 +231,7 @@ PrintModifierMapping(XModifierKeymap *map, FILE *fp)
|
|||
int keysyms_per_keycode = GetKeysymsPerKeycode();
|
||||
|
||||
fprintf (fp,
|
||||
"%s: up to %d keys per modifier, (keycodes in parentheses):\n\n",
|
||||
"%s: up to %d keys per modifier, (keycodes in parentheses):\n\n",
|
||||
ProgramName, map->max_keypermod);
|
||||
for (int i = 0; i < 8; i++) {
|
||||
fprintf(fp, "%-10s", modifier_table[i].name);
|
||||
|
@ -247,7 +247,7 @@ PrintModifierMapping(XModifierKeymap *map, FILE *fp)
|
|||
} while ( !ks && index < keysyms_per_keycode);
|
||||
nm = XKeysymToString(ks);
|
||||
|
||||
fprintf (fp, "%s %s (0x%0x)", (j > 0 ? "," : ""),
|
||||
fprintf (fp, "%s %s (0x%0x)", (j > 0 ? "," : ""),
|
||||
(nm ? nm : "BadKey"), map->modifiermap[k]);
|
||||
}
|
||||
k++;
|
||||
|
@ -276,8 +276,8 @@ PrintKeyTable(Bool exprs, FILE *fp)
|
|||
return;
|
||||
}
|
||||
if (!exprs) {
|
||||
fprintf (fp,
|
||||
"There are %d KeySyms per KeyCode; KeyCodes range from %d to %d.\n\n",
|
||||
fprintf (fp,
|
||||
"There are %d KeySyms per KeyCode; KeyCodes range from %d to %d.\n\n",
|
||||
keysyms_per_keycode, min_keycode, max_keycode);
|
||||
fprintf (fp, " KeyCode\tKeysym (Keysym)\t...\n");
|
||||
fprintf (fp, " Value \tValue (Name) \t...\n\n");
|
||||
|
@ -301,7 +301,7 @@ PrintKeyTable(Bool exprs, FILE *fp)
|
|||
else
|
||||
s = "NoSymbol";
|
||||
if (!exprs)
|
||||
fprintf (fp, "0x%04x (%s)\t",
|
||||
fprintf (fp, "0x%04x (%s)\t",
|
||||
(unsigned int)ks, s ? s : "no name");
|
||||
else if (s)
|
||||
fprintf (fp, " %s", s);
|
||||
|
@ -329,7 +329,7 @@ PrintPointerMap(FILE *fp)
|
|||
fprintf (fp, " Button Code\n");
|
||||
/* " ### ###\n" */
|
||||
for (i = 0; i < count; i++) {
|
||||
fprintf (fp, " %3u %3u\n",
|
||||
fprintf (fp, " %3u %3u\n",
|
||||
i+1, (unsigned int) pmap[i]);
|
||||
}
|
||||
fprintf (fp, "\n");
|
||||
|
@ -341,7 +341,7 @@ PrintPointerMap(FILE *fp)
|
|||
* SetPointerMap - set the pointer map
|
||||
*/
|
||||
|
||||
int
|
||||
int
|
||||
SetPointerMap(unsigned char *map, int n)
|
||||
{
|
||||
unsigned char defmap[MAXBUTTONCODES];
|
||||
|
|
|
@ -48,7 +48,7 @@ static XModifierKeymap *map = NULL;
|
|||
|
||||
/*
|
||||
* The routines in this file manipulate a queue of intructions. Instead of
|
||||
* executing each line as it is entered, we build up a list of actions to
|
||||
* executing each line as it is entered, we build up a list of actions to
|
||||
* take and execute them all at the end. This allows us to find all errors
|
||||
* at once, and to preserve the context in which we are looking up keysyms.
|
||||
*/
|
||||
|
@ -148,7 +148,7 @@ badheader(void)
|
|||
|
||||
#define badmsgn(what,s,len) badmsg (what, copy_to_scratch (s, len))
|
||||
|
||||
void
|
||||
void
|
||||
initialize_map (void)
|
||||
{
|
||||
map = XGetModifierMapping (dpy);
|
||||
|
@ -157,7 +157,7 @@ initialize_map (void)
|
|||
|
||||
static void do_keycode ( char *line, int len );
|
||||
static void do_keysym ( char *line, int len );
|
||||
static void finish_keycodes ( const char *line, int len, KeyCode *keycodes,
|
||||
static void finish_keycodes ( const char *line, int len, KeyCode *keycodes,
|
||||
int count );
|
||||
static void do_add ( char *line, int len );
|
||||
static void do_remove ( char *line, int len );
|
||||
|
@ -189,7 +189,7 @@ static struct dt {
|
|||
* and trailing whitespace removed) and builds up the work queue.
|
||||
*/
|
||||
|
||||
void
|
||||
void
|
||||
handle_line(char *line, /* string to parse */
|
||||
int len) /* length of line */
|
||||
{
|
||||
|
@ -221,9 +221,9 @@ handle_line(char *line, /* string to parse */
|
|||
|
||||
/*
|
||||
* the following routines are useful for parsing
|
||||
*/
|
||||
*/
|
||||
|
||||
static int
|
||||
static int
|
||||
skip_word (const char *s, int len)
|
||||
{
|
||||
register int n;
|
||||
|
@ -232,7 +232,7 @@ skip_word (const char *s, int len)
|
|||
return (n + skip_space (s+n, len-n));
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
skip_chars(const char *s, int len)
|
||||
{
|
||||
register int i;
|
||||
|
@ -245,7 +245,7 @@ skip_chars(const char *s, int len)
|
|||
return (i);
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
skip_space(const char *s, int len)
|
||||
{
|
||||
register int i;
|
||||
|
@ -259,7 +259,7 @@ skip_space(const char *s, int len)
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
static int
|
||||
skip_until_char(const char *s, int len, char c)
|
||||
{
|
||||
register int i;
|
||||
|
@ -302,7 +302,7 @@ add_to_work_queue(union op *p) /* this can become a macro someday */
|
|||
return;
|
||||
}
|
||||
|
||||
static Bool
|
||||
static Bool
|
||||
parse_number(const char *str, unsigned long *val)
|
||||
{
|
||||
const char *fmt = "%ld";
|
||||
|
@ -324,7 +324,7 @@ parse_number(const char *str, unsigned long *val)
|
|||
return (sscanf (str, fmt, val) == 1);
|
||||
}
|
||||
|
||||
static Bool
|
||||
static Bool
|
||||
parse_keysym(const char *line, int n, char **name, KeySym *keysym)
|
||||
{
|
||||
*name = copy_to_scratch (line, n);
|
||||
|
@ -348,7 +348,7 @@ parse_keysym(const char *line, int n, char **name, KeySym *keysym)
|
|||
* listed.
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
do_keycode(char *line, int len)
|
||||
{
|
||||
int dummy;
|
||||
|
@ -396,7 +396,7 @@ do_keycode(char *line, int len)
|
|||
* The left keysyms has to be checked for validity and evaluated.
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
do_keysym(char *line, int len)
|
||||
{
|
||||
int n;
|
||||
|
@ -437,17 +437,17 @@ do_keysym(char *line, int len)
|
|||
finish_keycodes (line, len, keycodes, n);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
finish_keycodes(const char *line, int len, KeyCode *keycodes, int count)
|
||||
{
|
||||
int n;
|
||||
KeySym *kslist;
|
||||
union op *uop;
|
||||
struct op_keycode *opk;
|
||||
|
||||
|
||||
n = skip_until_char (line, len, '=');
|
||||
line += n, len -= n;
|
||||
|
||||
|
||||
if (len < 1 || *line != '=') { /* = minimum */
|
||||
badmsg0 ("keycode command (missing keysym list),");
|
||||
return;
|
||||
|
@ -501,7 +501,7 @@ struct modtab modifier_table[] = { /* keep in order so it can be index */
|
|||
{ "ctrl", 4, 2 },
|
||||
{ NULL, 0, 0 }};
|
||||
|
||||
static int
|
||||
static int
|
||||
parse_modifier(char *line, int n)
|
||||
{
|
||||
register int i;
|
||||
|
@ -529,7 +529,7 @@ parse_modifier(char *line, int n)
|
|||
* is not important. There should also be an alias Ctrl for control.
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
do_add(char *line, int len)
|
||||
{
|
||||
int n;
|
||||
|
@ -593,7 +593,7 @@ do_add(char *line, int len)
|
|||
/*
|
||||
* make_add - stick a single add onto the queue
|
||||
*/
|
||||
static void
|
||||
static void
|
||||
make_add(int modifier, KeySym keysym)
|
||||
{
|
||||
union op *uop;
|
||||
|
@ -633,7 +633,7 @@ make_add(int modifier, KeySym keysym)
|
|||
* is not important. There should also be an alias Ctrl for control.
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
do_remove(char *line, int len)
|
||||
{
|
||||
int n;
|
||||
|
@ -708,7 +708,7 @@ do_remove(char *line, int len)
|
|||
if (verbose) {
|
||||
int j;
|
||||
char *tmpname = XKeysymToString (kslist[i]);
|
||||
printf ("! Keysym %s (0x%lx) corresponds to keycode(s)",
|
||||
printf ("! Keysym %s (0x%lx) corresponds to keycode(s)",
|
||||
tmpname ? tmpname : "?", (long) kslist[i]);
|
||||
for (j = 0; j < num_kcs; j++)
|
||||
printf(" 0x%x", kcs[j]);
|
||||
|
@ -751,7 +751,7 @@ do_remove(char *line, int len)
|
|||
/*
|
||||
* make_remove - stick a single remove onto the queue
|
||||
*/
|
||||
static void
|
||||
static void
|
||||
make_remove(int modifier, KeyCode keycode)
|
||||
{
|
||||
union op *uop;
|
||||
|
@ -790,7 +790,7 @@ make_remove(int modifier, KeyCode keycode)
|
|||
* ^
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
do_clear(char *line, int len)
|
||||
{
|
||||
int n;
|
||||
|
@ -831,7 +831,7 @@ do_clear(char *line, int len)
|
|||
}
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
static int
|
||||
static int
|
||||
strncasecmp(const char *a, const char *b, int n)
|
||||
{
|
||||
int i;
|
||||
|
@ -858,7 +858,7 @@ strncasecmp(const char *a, const char *b, int n)
|
|||
* ^
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
do_pointer(char *line, int len)
|
||||
{
|
||||
int n;
|
||||
|
@ -914,15 +914,15 @@ do_pointer(char *line, int len)
|
|||
line += n, len -= n;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (i > 0 && i != nbuttons) {
|
||||
if (i < nbuttons) {
|
||||
fprintf (stderr,
|
||||
fprintf (stderr,
|
||||
"Warning: Only changing the first %d of %d buttons.\n",
|
||||
i, nbuttons);
|
||||
}
|
||||
else { /* i > nbuttons */
|
||||
fprintf (stderr,
|
||||
else { /* i > nbuttons */
|
||||
fprintf (stderr,
|
||||
"Warning: Not changing %d extra buttons beyond %d.\n",
|
||||
i - nbuttons, nbuttons);
|
||||
}
|
||||
|
@ -958,7 +958,7 @@ do_pointer(char *line, int len)
|
|||
* and adding it to the list.
|
||||
*/
|
||||
|
||||
static int
|
||||
static int
|
||||
get_keysym_list(const char *line, int len, int *np, KeySym **kslistp)
|
||||
{
|
||||
int havesofar, maxcanhave;
|
||||
|
@ -1036,7 +1036,7 @@ get_keysym_list(const char *line, int len, int *np, KeySym **kslistp)
|
|||
* 8 by map->max_keypermod keycodes.
|
||||
*/
|
||||
|
||||
static void
|
||||
static void
|
||||
check_special_keys(KeyCode keycode, int n, KeySym *kslist)
|
||||
{
|
||||
int i; /* iterator variable */
|
||||
|
@ -1094,7 +1094,7 @@ check_special_keys(KeyCode keycode, int n, KeySym *kslist)
|
|||
* print_work_queue - disassemble the work queue and print it on stdout
|
||||
*/
|
||||
|
||||
void
|
||||
void
|
||||
print_work_queue(void)
|
||||
{
|
||||
union op *op;
|
||||
|
@ -1106,7 +1106,7 @@ print_work_queue(void)
|
|||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
print_opcode(union op *op)
|
||||
{
|
||||
int i;
|
||||
|
@ -1170,7 +1170,7 @@ static int exec_clear ( struct op_clearmodifier *opcm );
|
|||
static int exec_pointer ( struct op_pointer *opp );
|
||||
|
||||
|
||||
int
|
||||
int
|
||||
execute_work_queue (void)
|
||||
{
|
||||
union op *op;
|
||||
|
@ -1204,7 +1204,7 @@ execute_work_queue (void)
|
|||
while (XCheckTypedEvent (dpy, MappingNotify, &event)) ;
|
||||
XRefreshKeyboardMapping (&event.xmapping);
|
||||
} else {
|
||||
fprintf (stderr, "%s: unknown event %ld\n",
|
||||
fprintf (stderr, "%s: unknown event %ld\n",
|
||||
ProgramName, (long) event.type);
|
||||
}
|
||||
}
|
||||
|
@ -1234,7 +1234,7 @@ execute_work_queue (void)
|
|||
if (exec_pointer (&op->pointer) < 0) errors++;
|
||||
break;
|
||||
default:
|
||||
fprintf (stderr, "%s: unknown opcode %d\n",
|
||||
fprintf (stderr, "%s: unknown opcode %d\n",
|
||||
ProgramName, op->generic.type);
|
||||
break;
|
||||
}
|
||||
|
@ -1247,7 +1247,7 @@ execute_work_queue (void)
|
|||
return (errors > 0 ? -1 : 0);
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
exec_keycode(struct op_keycode *opk)
|
||||
{
|
||||
if (!opk->target_keycode) {
|
||||
|
@ -1283,13 +1283,13 @@ exec_keycode(struct op_keycode *opk)
|
|||
XChangeKeyboardMapping (dpy, opk->target_keycode, 1,
|
||||
&dummy, 1);
|
||||
} else {
|
||||
XChangeKeyboardMapping (dpy, opk->target_keycode, opk->count,
|
||||
XChangeKeyboardMapping (dpy, opk->target_keycode, opk->count,
|
||||
opk->keysyms, 1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
exec_add(struct op_addmodifier *opam)
|
||||
{
|
||||
int i;
|
||||
|
@ -1311,7 +1311,7 @@ exec_add(struct op_addmodifier *opam)
|
|||
return (status);
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
exec_remove(struct op_removemodifier *oprm)
|
||||
{
|
||||
int i;
|
||||
|
@ -1325,34 +1325,34 @@ exec_remove(struct op_removemodifier *oprm)
|
|||
return (status);
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
exec_clear(struct op_clearmodifier *opcm)
|
||||
{
|
||||
return (ClearModifier (&map, opcm->modifier));
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static int
|
||||
exec_pointer(struct op_pointer *opp)
|
||||
{
|
||||
return (SetPointerMap (opp->button_codes, opp->count));
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
print_modifier_map(void)
|
||||
{
|
||||
PrintModifierMapping (map, stdout);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
print_key_table(Bool exprs)
|
||||
{
|
||||
PrintKeyTable (exprs, stdout);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
print_pointer_map(void)
|
||||
{
|
||||
PrintPointerMap (stdout);
|
||||
|
|
|
@ -20,16 +20,16 @@
|
|||
.\" DEALINGS IN THE SOFTWARE.
|
||||
.\"
|
||||
.\" Copyright 1988, 1989, 1990, 1998 The Open Group
|
||||
.\"
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, distribute, and sell this software and its
|
||||
.\" documentation for any purpose is hereby granted without fee, provided that
|
||||
.\" the above copyright notice appear in all copies and that both that
|
||||
.\" copyright notice and this permission notice appear in supporting
|
||||
.\" documentation.
|
||||
.\"
|
||||
.\"
|
||||
.\" The above copyright notice and this permission notice shall be included
|
||||
.\" in all copies or substantial portions of the Software.
|
||||
.\"
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
|
@ -37,12 +37,12 @@
|
|||
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
.\" OTHER DEALINGS IN THE SOFTWARE.
|
||||
.\"
|
||||
.\"
|
||||
.\" Except as contained in this notice, the name of The Open Group shall
|
||||
.\" not be used in advertising or otherwise to promote the sale, use or
|
||||
.\" other dealings in this Software without prior written authorization
|
||||
.\" from The Open Group.
|
||||
.\"
|
||||
.\"
|
||||
.de EX \"Begin example
|
||||
.ne 5
|
||||
.if n .sp 1
|
||||
|
@ -64,10 +64,10 @@ xmodmap - utility for modifying keymaps and pointer button mappings in X
|
|||
[-options ...] [filename]
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The \fIxmodmap\fP program is used to edit and display the
|
||||
keyboard \fImodifier map\fP and \fIkeymap table\fP that are used by client
|
||||
applications to convert event keycodes into keysyms. It is usually run from
|
||||
the user's session startup script to configure the keyboard according to
|
||||
The \fIxmodmap\fP program is used to edit and display the
|
||||
keyboard \fImodifier map\fP and \fIkeymap table\fP that are used by client
|
||||
applications to convert event keycodes into keysyms. It is usually run from
|
||||
the user's session startup script to configure the keyboard according to
|
||||
personal tastes.
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
|
@ -83,7 +83,7 @@ unhandled argument is given to
|
|||
.I xmodmap.
|
||||
.TP 8
|
||||
.B \-grammar
|
||||
This option indicates that a help message describing the expression grammar
|
||||
This option indicates that a help message describing the expression grammar
|
||||
used in files and with \-e expressions should be printed on the standard error.
|
||||
.TP 8
|
||||
.B \-version
|
||||
|
@ -92,7 +92,7 @@ This option indicates that
|
|||
should print its version information and exit.
|
||||
.TP 8
|
||||
.B \-verbose
|
||||
This option indicates that
|
||||
This option indicates that
|
||||
.I xmodmap
|
||||
should print logging information as it parses its input.
|
||||
.TP 8
|
||||
|
@ -100,7 +100,7 @@ should print logging information as it parses its input.
|
|||
This option turns off the verbose logging. This is the default.
|
||||
.TP 8
|
||||
.B \-n
|
||||
This option indicates that
|
||||
This option indicates that
|
||||
.I xmodmap
|
||||
should not change the mappings, but should display what it would do, like
|
||||
\fImake(__appmansuffix__)\fP does when given this option.
|
||||
|
@ -148,8 +148,8 @@ Keysyms matching Unicode characters may be specified as "U0020" to "U007E"
|
|||
and "U00A0" to "U10FFFF" for all possible Unicode characters.
|
||||
.TP 8
|
||||
.B keycode \fINUMBER\fP = \fIKEYSYMNAME ...\fP
|
||||
The list of keysyms is assigned to the indicated keycode
|
||||
(which may be specified in decimal, hex or octal and can be determined by
|
||||
The list of keysyms is assigned to the indicated keycode
|
||||
(which may be specified in decimal, hex or octal and can be determined by
|
||||
running the
|
||||
.I xev
|
||||
program). Up to eight keysyms may be attached to a key, however the last four
|
||||
|
@ -170,7 +170,7 @@ if the same keysym is bound to multiple keys, the expression is executed
|
|||
for each matching keycode.
|
||||
.TP 8
|
||||
.B clear \fIMODIFIERNAME\fP
|
||||
This removes all entries in the modifier map for the given modifier, where
|
||||
This removes all entries in the modifier map for the given modifier, where
|
||||
valid name are:
|
||||
.BR Shift ,
|
||||
.BR Lock ,
|
||||
|
@ -179,7 +179,7 @@ valid name are:
|
|||
.BR Mod2 ,
|
||||
.BR Mod3 ,
|
||||
.BR Mod4 ,
|
||||
and \fBMod5\fP (case
|
||||
and \fBMod5\fP (case
|
||||
does not matter in modifier names, although it does matter for all other
|
||||
names). For example, ``clear Lock'' will remove
|
||||
all any keys that were bound to the shift lock modifier.
|
||||
|
@ -199,7 +199,7 @@ remove keys from a modifier without having to worry about whether or not they
|
|||
have been reassigned.
|
||||
.TP 8
|
||||
.B "pointer = default"
|
||||
This sets the pointer map back to its default settings (button 1 generates a
|
||||
This sets the pointer map back to its default settings (button 1 generates a
|
||||
code of 1, button 2 generates a 2, etc.).
|
||||
.TP 8
|
||||
.B pointer = \fINUMBER ...\fP
|
||||
|
@ -222,12 +222,12 @@ This could be done on a 3 button pointer as follows:
|
|||
% xmodmap -e "pointer = 3 2 1"
|
||||
.EE
|
||||
.PP
|
||||
Many applications support the notion of Meta keys (similar to Control
|
||||
Many applications support the notion of Meta keys (similar to Control
|
||||
keys except that Meta is held down instead of Control). However,
|
||||
some servers do not have a Meta keysym in the default keymap table, so one
|
||||
needs to be added by hand.
|
||||
The following command will attach Meta to the Multi-language key (sometimes
|
||||
labeled Compose Character). It also takes advantage of the fact that
|
||||
labeled Compose Character). It also takes advantage of the fact that
|
||||
applications that need a Meta key simply need to get the keycode and don't
|
||||
require the keysym to be in the first column of the keymap table. This
|
||||
means that applications that are looking for a Multi_key (including the
|
||||
|
@ -245,7 +245,7 @@ In that case the following may be useful:
|
|||
One of the more simple, yet convenient, uses of \fIxmodmap\fP is to set the
|
||||
keyboard's "rubout" key to generate an alternate keysym. This frequently
|
||||
involves exchanging Backspace with Delete to be more comfortable to the user.
|
||||
If the \fIttyModes\fP resource in \fIxterm\fP is set as well, all terminal
|
||||
If the \fIttyModes\fP resource in \fIxterm\fP is set as well, all terminal
|
||||
emulator windows will use the same key for erasing characters:
|
||||
.EX
|
||||
% xmodmap -e "keysym BackSpace = Delete"
|
||||
|
@ -279,13 +279,13 @@ add Lock = Caps_Lock
|
|||
add Control = Control_L
|
||||
.EE
|
||||
.PP
|
||||
This example can be run again to swap the keys back to their previous
|
||||
This example can be run again to swap the keys back to their previous
|
||||
assignments.
|
||||
.PP
|
||||
The \fIkeycode\fP command is useful for assigning the same keysym to
|
||||
multiple keycodes. Although unportable, it also makes it possible to write
|
||||
scripts that can reset the keyboard to a known state. The following script
|
||||
sets the backspace key to generate Delete (as shown above), flushes all
|
||||
sets the backspace key to generate Delete (as shown above), flushes all
|
||||
existing caps lock bindings, makes the CapsLock
|
||||
key be a control key, make F5 generate Escape, and makes Break/Reset be a
|
||||
shift lock.
|
||||
|
|
|
@ -50,7 +50,7 @@ void process_file (const char *filename) /* NULL means use stdin */
|
|||
|
||||
if (!filename) {
|
||||
fp = stdin;
|
||||
inputFilename = "stdin";
|
||||
inputFilename = "stdin";
|
||||
} else {
|
||||
fp = fopen (filename, "r");
|
||||
if (!fp) {
|
||||
|
@ -96,7 +96,7 @@ void process_line (const char *line)
|
|||
fprintf(stderr, "%s: Could not allocate %d bytes\n", ProgramName, len);
|
||||
Exit(-1);
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < len; i++) { /* look for blank lines */
|
||||
register char c = buffer[i];
|
||||
if (!(isspace(c) || c == '\n')) break;
|
||||
|
|
|
@ -29,7 +29,7 @@ from The Open Group.
|
|||
#ifndef _WQ_H
|
||||
#define _WQ_H
|
||||
|
||||
/*
|
||||
/*
|
||||
* Input is parsed and a work queue is built that is executed later. This
|
||||
* allows us to swap keys as well as ensure that we don't mess up the keyboard
|
||||
* by doing a partial rebind.
|
||||
|
|
|
@ -104,7 +104,7 @@ asprintf(char ** ret, const char *format, ...)
|
|||
}
|
||||
#endif /* HAVE_ASPRINTF */
|
||||
|
||||
static const char help_message[] =
|
||||
static const char help_message[] =
|
||||
"\nwhere options include:\n"
|
||||
" -display host:dpy X server to use\n"
|
||||
" -verbose, -quiet turn logging on or off\n"
|
||||
|
@ -146,7 +146,7 @@ unknown_arg(const char *arg)
|
|||
usage(1);
|
||||
}
|
||||
|
||||
static const char grammar_message[] =
|
||||
static const char grammar_message[] =
|
||||
" pointer = default reset pointer buttons to default\n"
|
||||
" pointer = NUMBER ... set pointer button codes\n"
|
||||
" keycode NUMBER = [KEYSYM ...] map keycode to given keysyms\n"
|
||||
|
@ -167,7 +167,7 @@ static const char grammar_message[] =
|
|||
"\n";
|
||||
|
||||
|
||||
static void
|
||||
static void
|
||||
_X_NORETURN
|
||||
grammar_usage(void)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ extern void print_pointer_map(void);
|
|||
|
||||
extern int UpdateModifierMapping(XModifierKeymap *map);
|
||||
extern int AddModifier(XModifierKeymap **mapp, KeyCode keycode, int modifier);
|
||||
extern int RemoveModifier(XModifierKeymap **mapp, KeyCode keycode,
|
||||
extern int RemoveModifier(XModifierKeymap **mapp, KeyCode keycode,
|
||||
int modifier);
|
||||
extern int ClearModifier(XModifierKeymap **mapp, int modifier);
|
||||
extern void PrintModifierMapping(XModifierKeymap *map, FILE *fp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue