3 Copyright 2006 Red Hat Inc.
5 Written by Kazuhiro Fujieda <fujieda@jaist.ac.jp>
7 This file is part of Cygwin.
9 This software is a copyrighted work licensed under the terms of the
10 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
15 #include <sys/ioctl.h>
16 #include <cygwin/kd.h>
18 static const char version[] = "$Revision$";
19 static char *prog_name;
24 fprintf (stderr, "Usage: %s [metabit|escprefix]\n"
25 " Without argument, it shows the current meta key mode.\n"
26 " metabit|meta|bit The meta key sets the top bit of the character.\n"
27 " escprefix|esc|prefix The meta key sends an escape prefix.\n",
35 "%s: The standard input isn't a console device.\n",
40 main (int ac, char *av[])
44 prog_name = strrchr (av[0], '/');
46 prog_name = strrchr (av[0], '\\');
54 if (ioctl (0, KDGKBMETA, ¶m) < 0)
65 if (!strcmp ("meta", av[1]) || !strcmp ("bit", av[1])
66 || !strcmp ("metabit", av[1]))
68 else if (!strcmp ("esc", av[1]) || !strcmp ("prefix", av[1])
69 || !strcmp ("escprefix", av[1]))
76 if (ioctl (0, KDSKBMETA, param) < 0)