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