DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T x ┃
Length: 2729 (0xaa9) Types: TextFile Names: »xallkeys.c«
└─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦144d629ab⟧ └─ ⟦this⟧ »./xallkeys.c« └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦34224b4fb⟧ └─ ⟦this⟧ »./xallkeys.c« └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦50f09e4e4⟧ └─ ⟦this⟧ »./xallkeys.c« └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦5cb9d2efd⟧ └─ ⟦this⟧ »./xallkeys.c« └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦610eb0a19⟧ └─ ⟦this⟧ »./xallkeys.c« └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦8fb0c967c⟧ └─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3 └─ ⟦fc9b38f02⟧ »DATA« └─⟦8e9e227a9⟧ └─⟦8fb0c967c⟧ └─ ⟦this⟧ »xallkeys.c« └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦afaca67b5⟧ └─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3 └─ ⟦fc9b38f02⟧ »DATA« └─⟦8e9e227a9⟧ └─⟦afaca67b5⟧ └─ ⟦this⟧ »./xallkeys.c« └─⟦5f3412b64⟧ Bits:30000745 8mm tape, Rational 1000, ENVIRONMENT 12_6_5 TOOLS └─ ⟦91c658230⟧ »DATA« └─⟦5d656759a⟧ └─⟦d97085656⟧ └─ ⟦this⟧ »./xallkeys.c«
/****************************************************************************** * Description * Connect to a display and run through all defined Modifiers and Keysyms * and print the names and numbers to stdout. *****************************************************************************/ #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/Xutil.h> #include <stdio.h> #define TRUE 1 #define FALSE 0 char *ProgramName; Display *dpy; static char *help_message[] = { "where options include:", " -display host:dpy X server to use", NULL}; /****************************************************************************** * Description * Main routine. Process command-line arguments, then get the info. *****************************************************************************/ main(argc, argv) int argc; char **argv; { char *display = NULL; /* Process arguments: */ while (*++argv) { if (!strcmp (*argv, "-display")) { display = *++argv; } else { /* unknown arg */ char **cpp; fprintf (stderr, "usage: %s [-options]\n\n", argv[0]); for (cpp = help_message; *cpp; cpp++) { fprintf (stderr, "%s\n", *cpp); } fprintf (stderr, "\n"); exit (1); } } if (!(dpy= XOpenDisplay(display))) { perror("Cannot open display\n"); exit(-1); } { XModifierKeymap *mm = XGetModifierMapping(dpy); KeyCode *map = mm->modifiermap; int i; KeyCode kc; KeySym ks; char *sym; #define mm_loop(modif) \ for (i = 0; i < mm->max_keypermod; i++) { \ kc = *map++; \ if (kc != 0) { \ ks = XKeycodeToKeysym(dpy,kc,0); \ sym = XKeysymToString(ks); \ printf( "Modifier %s %x %s\n", modif, (int)kc, sym ); \ } \ } mm_loop("Shift"); mm_loop("Lock "); mm_loop("Ctrl "); mm_loop("Mod1 "); mm_loop("Mod2 "); mm_loop("Mod3 "); mm_loop("Mod4 "); mm_loop("Mod5 "); XFreeModifiermap(mm); } { KeySym *Mapping; KeySym *ks; int per_keycode; int i; KeyCode kc; char *sym; int first; printf( "Min_KeyCode %x Max_KeyCode %x\n", (int)dpy->min_keycode, (int)dpy->max_keycode ); Mapping = XGetKeyboardMapping( dpy,dpy->min_keycode, dpy->max_keycode - dpy->min_keycode + 1, &per_keycode ); ks = Mapping; for (kc = dpy->min_keycode; kc <= dpy->max_keycode; kc++) { first = TRUE; for (i = 0; i < per_keycode; ks++,i++) { if (*ks != NoSymbol) { sym = XKeysymToString( *ks ); if (first) { first = FALSE; printf( "KeyCode %x", (int)kc ); } printf( " %s", sym ); } } if (!first) printf("\n"); } XFree( Mapping ); } XCloseDisplay(dpy); }