1khim(n)                   Kevin's Hacky Input Method                   khim(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       khim - Provides key bindings for entering international characters on a
9       keyboard that does not support them
10

SYNOPSIS

12       package require Tcl
13
14       package require khim  ?1.0?
15
16       ::khim::getOptions path
17
18       ::khim::getConfig
19
20       ::khim::setConfig version enabled compose map
21
22       ::khim::showHelp path
23
24______________________________________________________________________________
25

DESCRIPTION

27       This package provides a set of key bindings to allow a  user  to  enter
28       arbitrary  characters  on  a  keyboard  that does not support them.  It
29       works by designating some seldom-used key of the keyboard  as  a  "Com‐
30       pose"  key  (this key is distinct from any key so labeled, and is often
31       "Pause," "F12" or "L2"), and having the "Compose" key,  followed  by  a
32       two-key sequence, have the effect of inserting some character in a wid‐
33       get.  In addition, the "Compose" key, when struck twice in  succession,
34       brings  up  a dialog containing a Unicode character map, allowing arbi‐
35       trary characters to be inserted.
36
37       The vast bulk of the package's functionality is implemented in a single
38       bindtag,  KHIM.  An application can request that any text or entry wid‐
39       get use the package to allow for entry of arbitrary characters by plac‐
40       ing  this  binding  tag  ahead of the Text or Entry binding tag for the
41       widget:
42
43
44              text .t -width 80 -height 24
45              bindtags .t {.t KHIM Text . all}
46
47       Note that the KHIM tag must precede the Text or Entry class binding, or
48       the package will not function correctly.
49

PROCEDURES

51       In  addition to commands supporting the KHIM binding tag, the following
52       commands are exported from the package:
53
54       ::khim::getOptions path
55              Posts a top-level modal dialog with  the  path  name  path  that
56              prompts  the  user  for  KHIM  options.   The user is allowed to
57              reconfigure the key sequences for the "Compose" key, change  the
58              choice of key to use for the "Compose" function, and enable/dis‐
59              able the KHIM key bindings entirely.
60
61       ::khim::getConfig
62              Returns a Tcl script that restores the current configuration  of
63              KHIM:  the  enabled/disabled state, the choice of "Compose" key,
64              and the key sequences that may  be  composed.   This  script  is
65              designed to be saved to a configuration file for use in a subse‐
66              quent invocation of the same application:
67
68
69              # Save KHIM configuration
70              set f [open ~/.khimrc w]
71              puts $f [::khim::getConfig]
72              close $f
73
74              # Restore KHIM configuration
75              source ~/.khimrc
76
77
78       ::khim::setConfig version enabled compose map
79              Restores an earlier saved configuration.  Few, if any,  applica‐
80              tions  will  call this command in any other way than to evaluate
81              it as returned from ::khim::getConfig.
82
83       ::khim::showHelp path
84              Displays a top-level dialog giving user-level help for KHIM; the
85              dialog will have the path name path.
86

LOCALISATION

88       Programmers  who  wish to make KHIM available in a non-English-speaking
89       locale may do  so  by  providing  a  .msg  file  with  the  appropriate
90       localised text.  The catalog requires the following messages:
91
92       Apply  Text  that  will appear on the "Apply" button in the dialog that
93              sets KHIM options.
94
95       Cancel Text that will appear on the "Cancel" button in several dialogs.
96
97       Change Text that will appear on the "Change" button, which  alters  the
98              binding  of a pair of composed characters (creating or replacing
99              as appropriate).
100
101       Character
102              Text that will appear on the label  of  the  entry  widget  that
103              accepts a character resulting from a composed sequence.
104
105       {Compose Key}
106              Window  title  for  a dialog that prompts the user to strike the
107              key that will be used for the "Compose" key.
108
109       {Compose key:}
110              Label that identifies a  component  showing  the  "Compose"  key
111              choice in the KHIM options dialog.
112
113       {Composed sequence must be two characters long}
114              Error message that is displayed if the user attempts to define a
115              "Compose" sequence that is shorter or longer  than  two  charac‐
116              ters.
117
118       Delete Text for a button that deletes a "Compose" sequence.
119
120       Help...
121              Text for a button that displays the KHIM user help dialog.
122
123       HELPTEXT
124              Complete  text  for  the  user-level  help  for  KHIM.  Refer to
125              "en.msg" for the English-language version of the help.
126
127       {Input key sequence}
128              Text for a label of the entry widget that prompts the user for a
129              two-character sequence to use with the "Compose" key.
130
131       {Insert Character}
132              Window title of the dialog box that displays a Unicode character
133              map and prompts the user to select a character to insert.
134
135       {Key sequences}
136              Text for a label at the head of a listbox showing  the  composed
137              sequences that are currently bound.
138
139       {KHIM Controls}
140              Window title for the dialog box that prompts for KHIM settings.
141
142       {KHIM Help}
143              Window title for the window that display help text for KHIM.
144
145       OK     Label for the OK button on several dialogs.
146
147       Select code page:
148              Label  for  a  spinbox  that prompts the user for a Unicode code
149              page number.
150
151       SELECT COMPOSE KEY
152              A message, which should be composed in  short  lines,  prompting
153              the  user to press the key that will become the "Compose" key in
154              KHIM.
155
156       Unicode...
157              Text for a button that brings up the character map to select the
158              character to which a composed sequence binds.
159
160       {Use KHIM}
161              Text  for a checkbutton that asks whether the user wishes to use
162              KHIM to manage composed key sequences.
163

ACKNOWLEDGMENTS

165       KHIM was originally inspired by  the  key  bindings  that  Brent  Welch
166       developed  for  the  'sedit' editor used in the 'exmh' mail user agent.
167       The code for KHIM is entirely separate from that for 'sedit'.
168

KEYWORDS

170       character, i18n, input, international, method
171
172
173
174khim                                  1.0                              khim(n)
Impressum