ch04.xml revision ea1d6981
1<chapter id='Global_Keyboard_Controls'>
2<title>Global Keyboard Controls</title>
3
4<para>
5The X Keyboard Extension supports a number of <emphasis>
6global key controls</emphasis>
7, which affect the way that XKB handles the keyboard as a whole. Many of these
8controls make the keyboard more accessible to the physically impaired and are
9based on the AccessDOS package<footnote><para>
10AccessDOS provides access to the DOS operating system for people with physical
11impairments and was developed by the Trace R&amp;D Center at the University of
12Wisconsin. For more information on AccessDOS, contact the Trace R&amp;D Center,
13Waisman Center and Department of Industrial Engineering, University of
14Wisconsin-Madison WI 53705-2280. Phone: 608-262-6966. e-mail:
15info@trace.wisc.edu.</para></footnote>.
16</para>
17
18<sect1 id='The_RepeatKeys_Control'>
19<title>The RepeatKeys Control</title>
20
21<para>
22The core protocol only allows control over whether or not the entire keyboard
23or individual keys should autorepeat when held down. The <emphasis>
24RepeatKeys</emphasis>
25 control extends this capability by adding control over the delay until a key
26begins to repeat and the rate at which it repeats. <emphasis>
27RepeatKeys</emphasis>
28 is also coupled with the core autorepeat control; changes to one are always
29reflected in the other.
30</para>
31
32
33<para>
34The <emphasis>
35RepeatKeys</emphasis>
36 control has two parameters. The <emphasis>
37autorepeat delay</emphasis>
38 specifies the delay between the initial press of an autorepeating key and the
39first generated repeat event in milliseconds. The <emphasis>
40autorepeat interval</emphasis>
41 specifies the delay between all subsequent generated repeat events in
42milliseconds.
43</para>
44
45
46<sect2 id='The_PerKeyRepeat_Control'>
47<title>The PerKeyRepeat Control</title>
48
49<para>
50When <emphasis>
51RepeatKeys</emphasis>
52 are active, the <emphasis>
53PerKeyRepeat</emphasis>
54 control specifies whether or not individual keys should autorepeat when held
55down. XKB provides the <emphasis>
56PerKeyRepeat</emphasis>
57 for convenience only, and it always parallels the <emphasis>
58auto-repeats</emphasis>
59 field of the core protocol <emphasis>
60GetKeyboardControl</emphasis>
61 request — changes to one are always reflected in the other.
62</para>
63
64
65</sect2>
66<sect2 id='Detectable_Autorepeat'>
67<title>Detectable Autorepeat</title>
68
69<para>
70The X server usually generates both press and release events whenever an
71autorepeating key is held down. If an XKB-aware client enables the <emphasis>
72DetectableAutorepeat</emphasis>
73 per-client option for a keyboard, the server sends that client a key release
74event only when the key is <emphasis>
75physically</emphasis>
76 released. For example, holding down a key to generate three characters without
77detectable autorepeat yields:
78</para>
79
80<literallayout class='monospaced'>
81Press <emphasis>-></emphasis> Release <emphasis>-></emphasis> Press <emphasis>-></emphasis> Release <emphasis>-></emphasis> Press <emphasis>-></emphasis> Release
82</literallayout>
83
84<para>
85If detectable autorepeat is enabled, the client instead receives:
86</para>
87
88<literallayout class='monospaced'>
89Press<emphasis>-></emphasis> Press <emphasis>-></emphasis> Press <emphasis>-></emphasis> Release
90</literallayout>
91
92<para>
93Note that only clients that request detectable autorepeat are affected; other
94clients continue to receive both press and release events for autorepeating
95keys. Also note that support for detectable autorepeat is optional; servers are
96not required to support detectable autorepeat, but they must correctly report
97whether or not it is supported.
98</para>
99
100
101<para>
102<link linkend='Querying_and_Changing_Per_Client_Flags'>Querying and Changing Per-Client
103Flags</link> describes the <emphasis>
104XkbPerClientFlags</emphasis>
105 request, which reports or changes values for all of the per-client flags, and
106which lists the per-client flags that are supported.
107</para>
108
109
110</sect2>
111</sect1>
112<sect1 id='The_SlowKeys_Control'>
113<title>The SlowKeys Control</title>
114
115<para>
116Some users often bump keys accidentally while moving their hand or typing stick
117toward the key they want. Usually, the keys that are bumped accidentally are
118hit only for a very short period of time. The <emphasis>
119SlowKeys</emphasis>
120 control helps filter these accidental bumps by telling the server to wait a
121specified period, called the <emphasis>
122SlowKeys acceptance delay</emphasis>
123, before delivering key events. If the key is released before this period
124elapses, no key events are generated. The user can then bump any number of keys
125on their way to the one they want without generating unwanted characters. Once
126they have reached the key they want, they can then hold it long enough for
127<emphasis>
128SlowKeys</emphasis>
129 to accept it.
130</para>
131
132
133<para>
134The <emphasis>
135SlowKeys</emphasis>
136 control has one parameter; the <emphasis>
137slow keys delay</emphasis>
138 specifies the length of time, in milliseconds, that a key must be held down
139before it is accepted.
140</para>
141
142
143<para>
144When <emphasis>
145SlowKeys</emphasis>
146 are active, the X Keyboard Extension reports the initial press, acceptance,
147rejection or release of any key to interested clients using <emphasis>
148AccessXNotify</emphasis>
149 events. The <emphasis>
150AccessXNotify</emphasis>
151 event is described in more detail in <link linkend='Events'>Events</link>.
152</para>
153
154</sect1>
155<sect1 id='The_BounceKeys_Control'>
156<title>The BounceKeys Control</title>
157
158<para>
159Some people with physical impairments accidentally "bounce" on a key when they
160press it. That is, they press it once, then accidentally press it again
161immediately. The <emphasis>
162BounceKeys</emphasis>
163 control temporarily disables a key after it has been pressed, effectively
164"debouncing" the keyboard.
165</para>
166
167
168<para>
169The <emphasis>
170BounceKeys</emphasis>
171 has a single parameter. The <emphasis>
172BounceKeys delay</emphasis>
173 specifies the period of time, in milliseconds, that the key is disabled after
174it is pressed.
175</para>
176
177
178<para>
179When <emphasis>
180BounceKeys</emphasis>
181 are active, the server reports the acceptance or rejection of any key to
182interested clients by sending an <emphasis>
183AccessXNotify</emphasis>
184 event. The <emphasis>
185AccessXNotify</emphasis>
186 event is described in more detail in <link linkend='Events'>Events</link>.
187</para>
188
189</sect1>
190<sect1 id='The_StickyKeys_Control'>
191<title>The StickyKeys Control</title>
192
193<para>
194Some people find it difficult or impossible to press two keys at once. The
195<emphasis>
196StickyKeys</emphasis>
197 control makes it easier for them to type by changing the behavior of the
198modifier keys. When <emphasis>
199StickyKeys</emphasis>
200 are enabled, a modifier is latched when the user presses it just once, so the
201user can first press a modifier, release it, then press another key. For
202example, to get an exclamation point (!) on a PC-style keyboard, the user can
203press the <emphasis>
204Shift</emphasis>
205 key, release it, then press the <emphasis>
2061</emphasis>
207 key.
208</para>
209
210
211<para>
212By default, <emphasis>
213StickyKeys</emphasis>
214 also allows users to lock modifier keys without requiring special locking
215keys. The user can press a modifier twice in a row to lock it, and then unlock
216it by pressing it one more time.
217</para>
218
219
220<para>
221Modifiers are automatically unlatched when the user presses a non-modifier key.
222For instance, to enter the sequence <emphasis>
223Shift</emphasis>
224+<emphasis>
225Ctrl</emphasis>
226+<emphasis>
227Z</emphasis>
228 the user could press and release the <emphasis>
229Shift</emphasis>
230 key to latch the <emphasis>
231Shift</emphasis>
232 modifier, then press and release the <emphasis>
233Ctrl</emphasis>
234 key to latch the <emphasis>
235Control</emphasis>
236 modifier — the <emphasis>
237Ctrl</emphasis>
238 key is a modifier key, so pressing it does not unlatch the <emphasis>
239Shift</emphasis>
240 modifier, but leaves both the <emphasis>
241Shift</emphasis>
242 and <emphasis>
243Control</emphasis>
244 modifiers latched, instead. When the user presses the <emphasis>
245Z</emphasis>
246 key, it will be as though the user pressed <emphasis>
247Shift</emphasis>
248+<emphasis>
249Ctrl</emphasis>
250+<emphasis>
251Z</emphasis>
252 simultaneously. The <emphasis>
253Z</emphasis>
254 key is not a modifier key, so the <emphasis>
255Shift</emphasis>
256 and <emphasis>
257Control</emphasis>
258 modifiers are unlatched after the event is generated.
259</para>
260
261
262<para>
263A locked a modifier remains in effect until the user unlocks it. For example,
264to enter the sequence ("XKB") on a PC-style keyboard with a typical US/ASCII
265layout, the user could press and release the <emphasis>
266Shift</emphasis>
267 key twice to lock the <emphasis>
268Shift</emphasis>
269 modifier. Then, when the user presses the <emphasis>
2709</emphasis>
271, <emphasis>
272‘</emphasis>
273, <emphasis>
274x</emphasis>
275, <emphasis>
276k</emphasis>
277, <emphasis>
278b</emphasis>
279, <emphasis>
280‘</emphasis>
281, and <emphasis>
2820</emphasis>
283 keys in sequence, it will generate ("XKB"). To unlock the <emphasis>
284Shift</emphasis>
285 modifier, the user can press and release the <emphasis>
286Shift</emphasis>
287 key.
288</para>
289
290
291<para>
292Two option flags modify the behavior of the <emphasis>
293StickyKeys</emphasis>
294 control:
295</para>
296
297<itemizedlist>
298<listitem>
299  <para>If the <emphasis>
300XkbAX_TwoKeys</emphasis>
301 flag is set, XKB automatically turns <emphasis>
302StickyKeys</emphasis>
303 off if the user presses two or more keys at once. This serves to automatically
304disable StickyKeys when a user who does not require sticky keys is using the
305keyboard.
306  </para>
307</listitem>
308<listitem>
309  <para>The <emphasis>
310XkbAX_LatchToLock</emphasis>
311 controls the locking behavior of <emphasis>
312StickyKeys</emphasis>
313; the <emphasis>
314StickyKeys</emphasis>
315 control only locks modifiers as described above if the <emphasis>
316XkbAX_LatchToLock</emphasis>
317 flag is set.
318  </para>
319</listitem>
320</itemizedlist>
321
322</sect1>
323<sect1 id='The_MouseKeys_Control'>
324<title>The MouseKeys Control</title>
325
326<para>
327The <emphasis>
328MouseKeys</emphasis>
329 control lets a user control all the mouse functions from the keyboard. When
330<emphasis>
331MouseKeys</emphasis>
332 are enabled, all keys with <emphasis>
333MouseKeys</emphasis>
334 actions bound to them generate core pointer events instead of normal key press
335and release events.
336</para>
337
338
339<para>
340The <emphasis>
341MouseKeys</emphasis>
342 control has a single parameter, the <emphasis>
343mouse keys default button</emphasis>
344, which specifies the core pointer button to be used by mouse keys actions that
345do not explicitly specify a button.
346</para>
347
348
349</sect1>
350<sect1 id='The_MouseKeysAccel_Control'>
351<title>The MouseKeysAccel Control</title>
352
353<para>
354If the <emphasis>
355MouseKeysAccel</emphasis>
356 control is enabled, the effect of a pointer motion action changes as a key is
357held down. The <emphasis>
358mouse keys delay</emphasis>
359 specifies the amount of time between the initial key press and the first
360repeated motion event. The <emphasis>
361mouse keys interval</emphasis>
362 specifies the amount of time between repeated mouse keys events. The <emphasis>
363steps to maximum acceleration</emphasis>
364 field specifies the total number of events before the key is travelling at
365maximum speed. The <emphasis>
366maximum acceleration</emphasis>
367 field specifies the maximum acceleration. The <emphasis>
368curve</emphasis>
369 parameter controls the ramp used to reach maximum acceleration.
370</para>
371
372
373<para>
374When <emphasis>
375MouseKeys</emphasis>
376 are active and a <emphasis>
377SA_MovePtr</emphasis>
378 key action (see <link linkend='Key_Actions'>Key
379Actions</link>) is activated, a pointer motion event is generated immediately.
380If <emphasis>
381MouseKeysAccel</emphasis>
382 is enabled and if acceleration is enabled for the key in question, a second
383event is generated after <emphasis>
384mouse keys delay </emphasis>
385milliseconds, and additional events are generated every <emphasis>
386mouse keys interval</emphasis>
387 milliseconds for as long as the key is held down.
388</para>
389
390
391<sect2 id='Relative_Pointer_Motion'>
392<title>Relative Pointer Motion</title>
393
394<para>
395If the <emphasis>
396SA_MovePtr</emphasis>
397 action specifies relative motion, events are generated as follows: The initial
398event always moves the cursor the distance specified in the action; after
399<emphasis>
400steps to maximum acceleration</emphasis>
401 events have been generated, all subsequent events move the pointer the
402distance specified in the action times the <emphasis>
403maximum acceleration.</emphasis>
404 Events after the first but before maximum acceleration has been achieved are
405accelerated according to the formula:
406</para>
407
408<mediaobject>
409 <imageobject>
410   <imagedata format="SVG" fileref="XKBproto-1.svg"/>
411 </imageobject>
412</mediaobject>
413
414
415<para>
416Where <emphasis>
417action_delta</emphasis>
418 is the offset specified by the mouse keys action, <emphasis>
419max_accel </emphasis>
420and <emphasis>
421steps_to_max</emphasis>
422 are parameters to the <emphasis>
423MouseKeysAccel</emphasis>
424 ctrl, and the curveFactor is computed using the <emphasis>
425MouseKeysAccel</emphasis>
426 <emphasis>
427curve</emphasis>
428 parameter as follows:
429</para>
430
431<mediaobject>
432 <imageobject> <imagedata format="SVG" fileref="XKBproto-2.svg"/>
433 </imageobject>
434 </mediaobject>
435
436
437<para>
438With the result that a <emphasis>
439curve</emphasis>
440 of <emphasis>
4410</emphasis>
442 causes the distance moved to increase linearly from <emphasis>
443action_delta</emphasis>
444 to <mediaobject>
445 <imageobject> <imagedata format="SVG" fileref="XKBproto-3.svg"/>
446 </imageobject>
447 </mediaobject>
448
449, and the minimum legal <emphasis>
450curve</emphasis>
451 of -<emphasis>
4521000</emphasis>
453 causes all events after the first move at <emphasis>
454max_accel</emphasis>
455. A negative <emphasis>
456curve</emphasis>
457 causes an initial sharp increase in acceleration which tapers off, while a
458positive curve yields a slower initial increase in acceleration followed by a
459sharp increase as the number of pointer events generated by the action
460approaches <emphasis>
461steps_to_max</emphasis>
462.
463</para>
464
465
466</sect2>
467<sect2 id='Absolute_Pointer_Motion'>
468<title>Absolute Pointer Motion</title>
469
470<para>
471If an <emphasis>
472SA_MovePtr</emphasis>
473 action specifies an absolute position for one of the coordinates but still
474allows acceleration, all repeated events contain any absolute coordinates
475specified in the action.
476</para>
477
478
479</sect2>
480</sect1>
481<sect1 id='The_AccessXKeys_Control'>
482<title>The AccessXKeys Control</title>
483
484<para>
485If <emphasis>
486AccessXKeys</emphasis>
487 is enabled many controls can also be turned on or off from the keyboard by
488entering the following standard key sequences:
489</para>
490
491<itemizedlist>
492<listitem>
493  <para>Holding down a shift key by itself for eight seconds toggles the
494<emphasis>
495SlowKeys</emphasis>
496 control.
497  </para>
498</listitem>
499<listitem>
500  <para>Pressing and releasing a shift key five times in a row without any
501intervening key events and with less than 30 seconds delay between consecutive
502presses toggles the state of the <emphasis>
503StickyKeys</emphasis>
504 control.
505  </para>
506</listitem>
507<listitem>
508  <para>Simultaneously operating two or more modifier keys deactivates the
509<emphasis>
510StickyKeys</emphasis>
511 control.
512  </para>
513</listitem>
514</itemizedlist>
515
516<para>
517Some of these key sequences optionally generate audible feedback of the change
518in state, as described in <link linkend='The_AccessXFeedback_Control'>The
519AccessXFeedback Control</link>, or cause <emphasis>
520XkbAccessXNotify</emphasis>
521 events as described in <link linkend='Events'>Events</link>.
522</para>
523
524
525</sect1>
526<sect1 id='The_AccessXTimeout_Control'>
527<title>The AccessXTimeout Control</title>
528
529<para>
530In environments where computers are shared, features such as <emphasis>
531SlowKeys</emphasis>
532 present a problem: if <emphasis>
533SlowKeys</emphasis>
534 is on, the keyboard can appear to be unresponsive because keys have no effect
535unless they are held for a certain period of time. To help address this
536problem, XKB provides an <emphasis>
537AccessXTimeout</emphasis>
538 control to automatically change the value of any global controls or AccessX
539options if the keyboard is idle for a specified period of time.
540</para>
541
542
543<para>
544The AccessXTimeout control has a number of parameters which affect the duration
545of the timeout and the features changed when the timeout expires.
546</para>
547
548
549<para>
550The <emphasis>
551AccessX Timeout</emphasis>
552 field specifies the number of seconds the keyboard must be idle before the
553global controls and AccessX options are modified. The <emphasis>
554AccessX Options Mask</emphasis>
555 field specifies which values in the <emphasis>
556AccessX Options</emphasis>
557 field are to be changed, and the <emphasis>
558AccessX Options Values</emphasis>
559 field specifies the new values for those options. The <emphasis>
560AccessX Controls Mask</emphasis>
561 field specifies which controls are to be changed in the global set of
562<emphasis>
563enabled controls</emphasis>
564, and the <emphasis>
565AccessX Controls Values</emphasis>
566 field specifies the new values for those controls.
567</para>
568
569
570</sect1>
571<sect1 id='The_AccessXFeedback_Control'>
572<title>The AccessXFeedback Control</title>
573
574<para>
575If <emphasis>
576AccessXFeedback</emphasis>
577 is enabled, special beep-codes indicate changes in keyboard controls (or some
578key events when <emphasis>
579SlowKeys</emphasis>
580 or <emphasis>
581StickyKeys</emphasis>
582 are active). Many beep codes sound as multiple tones, but XKB reports a single
583<emphasis>
584XkbBellNotify</emphasis>
585 event for the entire sequence of tones.
586</para>
587
588
589<para>
590All feedback tones are governed by the <emphasis>
591AudibleBell</emphasis>
592 control. Individual feedback tones can be explicitly enabled or disabled using
593the <emphasis>
594accessX options mask</emphasis>
595 or set to deactivate after an idle period using the <emphasis>
596accessX timeout options mask</emphasis>
597. XKB defines the following feedback tones:
598</para>
599
600<informaltable frame='topbot'>
601<?dbfo keep-together="always" ?>
602<tgroup cols='4' align='left' colsep='0' rowsep='0'>
603<colspec colname='c1' colwidth='1.0*'/>
604<colspec colname='c2' colwidth='1.5*'/>
605<colspec colname='c3' colwidth='1.5*'/>
606<colspec colname='c4' colwidth='1.5*'/>
607<thead>
608  <row rowsep='1'>
609    <entry>Feedback Name</entry>
610    <entry>Bell Name</entry>
611    <entry>Default Sound</entry>
612    <entry>Indicates</entry>
613  </row>
614</thead>
615<tbody>
616  <row>
617    <entry>FeatureFB</entry>
618    <entry>AX_FeatureOn</entry>
619    <entry>rising tone</entry>
620    <entry>Keyboard control enabled</entry>
621  </row>
622  <row>
623    <entry>&#x0020;</entry>
624    <entry>AX_FeatureOff</entry>
625    <entry>falling tone</entry>
626    <entry>Keyboard control disabled</entry>
627  </row>
628  <row>
629    <entry>&#x0020;</entry>
630    <entry>AX_FeatureChange</entry>
631    <entry>two tones</entry>
632    <entry>Several controls changed state</entry>
633  </row>
634  <row>
635    <entry>IndicatorFB</entry>
636    <entry>AX_IndicatorOn</entry>
637    <entry>high tone</entry>
638    <entry>Indicator Lit</entry>
639  </row>
640  <row>
641    <entry>&#x0020;</entry>
642    <entry>AX_IndicatorOff</entry>
643    <entry>low tone</entry>
644    <entry>Indicator Extinguished</entry>
645  </row>
646  <row>
647    <entry>&#x0020;</entry>
648    <entry>AX_IndicatorChange</entry>
649    <entry>two high tones</entry>
650    <entry>Several indicators changed state</entry>
651  </row>
652  <row>
653    <entry>SlowWarnFB</entry>
654    <entry>AX_SlowKeysWarning</entry>
655    <entry>three high tones</entry>
656    <entry>Shift key held for four seconds</entry>
657  </row>
658  <row>
659    <entry>SKPressFB</entry>
660    <entry>AX_SlowKeyPress</entry>
661    <entry>single tone</entry>
662    <entry>Key press while <emphasis>
663SlowKeys</emphasis>
664 are on</entry>
665  </row>
666  <row>
667    <entry>SKReleaseFB</entry>
668    <entry>AX_SlowKeyRelease</entry>
669    <entry>single tone</entry>
670    <entry>Key release while <emphasis>
671SlowKeys</emphasis>
672 are on</entry>
673  </row>
674  <row>
675    <entry>SKAcceptFB</entry>
676    <entry>AX_SlowKeyAccept</entry>
677    <entry>single tone</entry>
678    <entry>Key event accepted by <emphasis>
679SlowKeys</emphasis>
680</entry>
681  </row>
682  <row>
683    <entry>SKRejectFB</entry>
684    <entry>AX_SlowKeyReject</entry>
685    <entry>low tone</entry>
686    <entry>Key event rejected by <emphasis>
687SlowKeys</emphasis>
688</entry>
689  </row>
690  <row>
691    <entry>StickyKeysFB</entry>
692    <entry>AX_StickyLatch</entry>
693    <entry>low tone then high tone</entry>
694    <entry>Modifier latched by <emphasis>
695StickyKeys</emphasis>
696</entry>
697  </row>
698  <row>
699    <entry>&#x0020;</entry>
700    <entry>AX_StickyLock</entry>
701    <entry>high tone</entry>
702    <entry>Modifier locked by <emphasis>
703StickyKeys</emphasis>
704</entry>
705  </row>
706  <row>
707    <entry>&#x0020;</entry>
708    <entry>AX_StickyUnlock</entry>
709    <entry>low tone</entry>
710    <entry>Modifier unlocked by <emphasis>
711StickyKeys</emphasis>
712</entry>
713  </row>
714  <row>
715    <entry>BKRejectFB</entry>
716    <entry>AX_BounceKeysReject</entry>
717    <entry>low tone</entry>
718    <entry>Key event rejected by <emphasis>
719BounceKeys</emphasis>
720</entry>
721  </row>
722</tbody>
723</tgroup>
724</informaltable>
725
726<para>
727Implementations that cannot generate continuous tones may generate multiple
728beeps instead of falling and rising tones; for example, they can generate a
729high-pitched beep followed by a low-pitched beep instead of a continuous
730falling tone.
731</para>
732
733
734<para>
735If the physical keyboard bell is not very capable, attempts to simulate a
736continuous tone with multiple bells can sound horrible. Set the <emphasis>
737DumbBellFB</emphasis>
738 AccessX option to inform the server that the keyboard bell is not very capable
739and that XKB should use only simple bell combinations. Keyboard capabilities
740vary wildly, so the sounds generated for the individual bells when the
741<emphasis>
742DumbBellFB</emphasis>
743 option is set are implementation specific.
744</para>
745
746
747</sect1>
748<sect1 id='The_Overlay1_and_Overlay2_Controls'>
749<title>The Overlay1 and Overlay2 Controls</title>
750
751<para>
752A keyboard overlay allows some subset of the keyboard to report alternate
753keycodes when the overlay is enabled. For example a keyboard overlay can be
754used to simulate a numeric or editing keypad on keyboard that does not actually
755have one by generating alternate of keycodes for some keys when the overlay is
756enabled. This technique is very common on portable computers and embedded
757systems with small keyboards.
758</para>
759
760
761<para>
762XKB includes direct support for two keyboard overlays, using the <emphasis>
763Overlay1</emphasis>
764 and <emphasis>
765Overlay2</emphasis>
766 controls. When <emphasis>
767Overlay1</emphasis>
768 is enabled, all of the keys that are members of the first keyboard overlay
769generate an alternate keycode. When <emphasis>
770Overlay2</emphasis>
771 is enabled, all of the keys that are members of the second keyboard overlay
772generate an alternate keycode.
773</para>
774
775
776<para>
777To specify the overlay to which a key belongs and the alternate keycode it
778should generate when that overlay is enabled, assign it either the <emphasis>
779KB_Overlay1</emphasis>
780 or <emphasis>
781KB_Overlay2</emphasis>
782 key behaviors, as described in <link linkend='Key_Behavior'>
783Key Behavior</link>.
784</para>
785
786
787</sect1>
788<sect1 id='Boolean_Controls_and_The_EnabledControls_Control'>
789<title>"Boolean" Controls and The EnabledControls Control</title>
790
791<para>
792All of the controls described above, along with the <emphasis>
793AudibleBell</emphasis>
794 control (described in <link linkend='Disabling_Server_Generated_Bells'>Disabling
795Server Generated Bells</link>) and the <emphasis>
796IgnoreGroupLock</emphasis>
797 control (described in <link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>Server
798Internal Modifiers and Ignore Locks Behavior</link>) comprise the <emphasis>
799boolean controls</emphasis>
800. In addition to any parameters listed in the descriptions of the individual
801controls, the boolean controls can be individually enabled or disabled by
802changing the value of the <emphasis>
803EnabledControls</emphasis>
804 control.
805</para>
806
807
808<para>
809The following <emphasis>
810non-boolean</emphasis>
811 controls are always active and cannot be changed using the <emphasis>
812EnabledControls</emphasis>
813 control or specified in any context that accepts only boolean controls:
814<emphasis>
815GroupsWrap</emphasis>
816 (<link linkend='Computing_Effective_Modifier_and_Group'>Computing Effective Modifier and
817Group</link>), <emphasis>
818EnabledControls</emphasis>
819, <emphasis>
820InternalMods</emphasis>
821 (<link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>Server Internal Modifiers and
822Ignore Locks Behavior</link>), and <emphasis>
823IgnoreLockMods</emphasis>
824 (<link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>Server Internal Modifiers and
825Ignore Locks Behavior</link>) and <emphasis>
826PerKeyRepeat</emphasis>
827 (<link linkend='The_RepeatKeys_Control'>The RepeatKeys Control</link>)
828</para>
829
830
831</sect1>
832<sect1 id='Automatic_Reset_of_Boolean_Controls'>
833<title>Automatic Reset of Boolean Controls</title>
834
835<para>
836The <emphasis>
837auto-reset controls</emphasis>
838 are a per-client value which consist of two masks that can contain any of the
839boolean controls (see <link linkend='Boolean_Controls_and_The_EnabledControls_Control'>"Boolean"
840Controls and The EnabledControls Control</link>). Whenever the client exits
841for any reason, any boolean controls specified in the <emphasis>
842auto-reset mask</emphasis>
843 are set to the corresponding value from the <emphasis>
844auto-reset values</emphasis>
845 mask. This makes it possible for clients to "clean up after themselves"
846automatically, even if abnormally terminated.
847</para>
848
849
850<para>
851For example, a client that replace the keyboard bell with some other audible
852cue might want to turn off the <emphasis>
853AudibleBell</emphasis>
854 control (<link linkend='Disabling_Server_Generated_Bells'>Disabling Server
855Generated Bells</link>) to prevent the server from also generating a sound and
856thus avoid cacophony. If the client were to exit without resetting the
857<emphasis>
858AudibleBell </emphasis>
859control, the user would be left without any feedback at all. Setting <emphasis>
860AudibleBell</emphasis>
861 in both the auto-reset mask and auto-reset values guarantees that the audible
862bell will be turned back on when the client exits.
863</para>
864</sect1>
865</chapter>
866