File: group__brlapi__keys.html

package info (click to toggle)
brltty 4.2-7%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 15,152 kB
  • ctags: 12,570
  • sloc: ansic: 76,159; sh: 4,295; makefile: 1,375; tcl: 645; awk: 568; ml: 293; java: 272; python: 6
file content (699 lines) | stat: -rw-r--r-- 42,318 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>BrlAPI: Reading key presses</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Reading key presses</h1>
<p>How to read key presses from the braille terminal.  
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbrlapi__expandedKeyCode__t.html">brlapi_expandedKeyCode_t</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbrlapi__describedKeyCode__t.html">brlapi_describedKeyCode_t</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gabdb9c75bc336c166b41d6b820e7e242c">brlapi_ignoreAllKeys</a>()&nbsp;&nbsp;&nbsp;brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gaeecd40e9a62ec7b2726f16c859b7b01c">brlapi_acceptAllKeys</a>()&nbsp;&nbsp;&nbsp;brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gaf17304a5f4afe60a423fd3f922d9f9b7">BRLAPI_UC_ROW</a>&nbsp;&nbsp;&nbsp;0x2800UL</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga153ea2355180cb7cc0b35f8bfa71071b">brlapi__ignoreAllKeys</a>(handle)&nbsp;&nbsp;&nbsp;brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga3c001392e34af461c5ba8b2940e66fa4">brlapi__acceptAllKeys</a>(handle)&nbsp;&nbsp;&nbsp;brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)</td></tr>
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a> { <br/>
&nbsp;&nbsp;<a class="el" href="group__brlapi__keys.html#gga04da4d59bcca169be939b8ebfc274bd2a34074d26f350d14b438c402d7ff51b8b">brlapi_rangeType_all</a>, 
<a class="el" href="group__brlapi__keys.html#gga04da4d59bcca169be939b8ebfc274bd2a740dd33effeed51f37cb29bb4fe5d6b8">brlapi_rangeType_type</a>, 
<a class="el" href="group__brlapi__keys.html#gga04da4d59bcca169be939b8ebfc274bd2a6c5a9cea072b66fe0e5ad3e9d52b03e7">brlapi_rangeType_command</a>, 
<a class="el" href="group__brlapi__keys.html#gga04da4d59bcca169be939b8ebfc274bd2a3ea0b1512b6fc33cab1e9d5726a4e4de">brlapi_rangeType_key</a>, 
<br/>
&nbsp;&nbsp;<a class="el" href="group__brlapi__keys.html#gga04da4d59bcca169be939b8ebfc274bd2a805970686b12dbcc77c2e1c4f12a635b">brlapi_rangeType_code</a>
<br/>
 }</td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gafdac75a70de34360e62bd17cddaecb5d">brlapi_expandKeyCode</a> (<a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> code, <a class="el" href="structbrlapi__expandedKeyCode__t.html">brlapi_expandedKeyCode_t</a> *expansion)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga27cd6a123ab9c8685055b72e0481067d">brlapi_describeKeyCode</a> (<a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> code, <a class="el" href="structbrlapi__describedKeyCode__t.html">brlapi_describedKeyCode_t</a> *description)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga3b5ba0c43d48792e7071e772b50b9cbe">brlapi_readKey</a> (int wait, <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> *code)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga557d77c4e1bf70a0d01b619aea152120">brlapi__readKey</a> (<a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *handle, int wait, <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> *code)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga51f541d3e9e1a797a4e4c5ef884f02cb">brlapi_ignoreKeys</a> (<a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a> type, const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> keys[], unsigned int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga6bd1a8af2c1d1b09a55d5647fbc9e035">brlapi__ignoreKeys</a> (<a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *handle, <a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a> type, const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> keys[], unsigned int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga15399581e093fc1635c53f4815fae551">brlapi_acceptKeys</a> (<a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a> type, const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> keys[], unsigned int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga0e76fb5ffa4547ccbe54e1a09d562b0a">brlapi__acceptKeys</a> (<a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *handle, <a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a> type, const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> keys[], unsigned int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gae0bc6b3628c42fa6387f3a398e424932">brlapi__ignoreAllKeys</a> (<a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *handle)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gafd425b67454237b5d35b4b5e5f5d92d9">brlapi__acceptAllKeys</a> (<a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *handle)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#ga3ccaf06f70f11b9364a4610752f26c9e">brlapi_ignoreKeyRanges</a> (<a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a> ranges[], unsigned int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gad4de372b84bf12ec74cda2e59da31b8f">brlapi__ignoreKeyRanges</a> (<a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *handle, <a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a> ranges[], unsigned int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gafef1d9fd59fed736d1cdc50e0352aabb">brlapi_acceptKeyRanges</a> (<a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a> ranges[], unsigned int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int BRLAPI_STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__brlapi__keys.html#gac131789506dfaa26094496dfe52358e4">brlapi__acceptKeyRanges</a> (<a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *handle, <a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a> ranges[], unsigned int count)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Once <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a> has been called, the application can call <a class="el" href="group__brlapi__keys.html#ga3b5ba0c43d48792e7071e772b50b9cbe">brlapi_readKey()</a> to read key presses. Either key codes (see <a class="el" href="group__brlapi__keycodes.html">Types and Defines fore BrlAPI Key Codes</a>) or commands will be returned, depending on parameters given to <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a>.</p>
<p>Key presses are buffered, so that calling <a class="el" href="group__brlapi__keys.html#ga3b5ba0c43d48792e7071e772b50b9cbe">brlapi_readKey()</a> in non-blocking mode from time to time should suffice. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga3c001392e34af461c5ba8b2940e66fa4"></a><!-- doxytag: member="brlapi.h::brlapi__acceptAllKeys" ref="ga3c001392e34af461c5ba8b2940e66fa4" args="(handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define brlapi__acceptAllKeys</td>
          <td>(</td>
          <td class="paramtype">handle&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;brlapi__acceptKeys(handle, brlapi_rangeType_all, NULL, 0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga153ea2355180cb7cc0b35f8bfa71071b"></a><!-- doxytag: member="brlapi.h::brlapi__ignoreAllKeys" ref="ga153ea2355180cb7cc0b35f8bfa71071b" args="(handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define brlapi__ignoreAllKeys</td>
          <td>(</td>
          <td class="paramtype">handle&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;brlapi__ignoreKeys(handle, brlapi_rangeType_all, NULL, 0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gaeecd40e9a62ec7b2726f16c859b7b01c"></a><!-- doxytag: member="brlapi.h::brlapi_acceptAllKeys" ref="gaeecd40e9a62ec7b2726f16c859b7b01c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_acceptAllKeys</td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;brlapi_acceptKeys(brlapi_rangeType_all, NULL, 0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Accept all key presses from the braille keyboard</p>
<p>This function asks the server to give all keys to the application, and not give them to <em>brltty</em>.</p>
<p>Warning: after calling this function, make sure to call <a class="el" href="group__brlapi__keys.html#ga51f541d3e9e1a797a4e4c5ef884f02cb">brlapi_ignoreKeys()</a> for ignoring important keys like BRL_CMD_SWITCHVT_PREV/NEXT and such. </p>

</div>
</div>
<a class="anchor" id="gabdb9c75bc336c166b41d6b820e7e242c"></a><!-- doxytag: member="brlapi.h::brlapi_ignoreAllKeys" ref="gabdb9c75bc336c166b41d6b820e7e242c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_ignoreAllKeys</td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;brlapi_ignoreKeys(brlapi_rangeType_all, NULL, 0)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Ignore all key presses from the braille keyboard</p>
<p>This function asks the server to give all keys to <em>brltty</em>, rather than returning them to the application via <a class="el" href="group__brlapi__keys.html#ga3b5ba0c43d48792e7071e772b50b9cbe">brlapi_readKey()</a>. </p>

</div>
</div>
<a class="anchor" id="gaf17304a5f4afe60a423fd3f922d9f9b7"></a><!-- doxytag: member="brlapi.h::BRLAPI_UC_ROW" ref="gaf17304a5f4afe60a423fd3f922d9f9b7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BRLAPI_UC_ROW&nbsp;&nbsp;&nbsp;0x2800UL</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Unicode braille row </p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="ga04da4d59bcca169be939b8ebfc274bd2"></a><!-- doxytag: member="brlapi.h::brlapi_rangeType_t" ref="ga04da4d59bcca169be939b8ebfc274bd2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>types of key ranges </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga04da4d59bcca169be939b8ebfc274bd2a34074d26f350d14b438c402d7ff51b8b"></a><!-- doxytag: member="brlapi_rangeType_all" ref="gga04da4d59bcca169be939b8ebfc274bd2a34074d26f350d14b438c402d7ff51b8b" args="" -->brlapi_rangeType_all</em>&nbsp;</td><td>
<p>all keys, code must be 0 </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga04da4d59bcca169be939b8ebfc274bd2a740dd33effeed51f37cb29bb4fe5d6b8"></a><!-- doxytag: member="brlapi_rangeType_type" ref="gga04da4d59bcca169be939b8ebfc274bd2a740dd33effeed51f37cb29bb4fe5d6b8" args="" -->brlapi_rangeType_type</em>&nbsp;</td><td>
<p>all keys of a given type </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga04da4d59bcca169be939b8ebfc274bd2a6c5a9cea072b66fe0e5ad3e9d52b03e7"></a><!-- doxytag: member="brlapi_rangeType_command" ref="gga04da4d59bcca169be939b8ebfc274bd2a6c5a9cea072b66fe0e5ad3e9d52b03e7" args="" -->brlapi_rangeType_command</em>&nbsp;</td><td>
<p>all keys of a given command block, i.e. matching the key type and command parts </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga04da4d59bcca169be939b8ebfc274bd2a3ea0b1512b6fc33cab1e9d5726a4e4de"></a><!-- doxytag: member="brlapi_rangeType_key" ref="gga04da4d59bcca169be939b8ebfc274bd2a3ea0b1512b6fc33cab1e9d5726a4e4de" args="" -->brlapi_rangeType_key</em>&nbsp;</td><td>
<p>a given key with any flags </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga04da4d59bcca169be939b8ebfc274bd2a805970686b12dbcc77c2e1c4f12a635b"></a><!-- doxytag: member="brlapi_rangeType_code" ref="gga04da4d59bcca169be939b8ebfc274bd2a805970686b12dbcc77c2e1c4f12a635b" args="" -->brlapi_rangeType_code</em>&nbsp;</td><td>
<p>a given key code </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gafd425b67454237b5d35b4b5e5f5d92d9"></a><!-- doxytag: member="brlapi.h::brlapi__acceptAllKeys" ref="gafd425b67454237b5d35b4b5e5f5d92d9" args="(brlapi_handle_t *handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi__acceptAllKeys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *&nbsp;</td>
          <td class="paramname"> <em>handle</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gac131789506dfaa26094496dfe52358e4"></a><!-- doxytag: member="brlapi.h::brlapi__acceptKeyRanges" ref="gac131789506dfaa26094496dfe52358e4" args="(brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi__acceptKeyRanges </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *&nbsp;</td>
          <td class="paramname"> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a>&nbsp;</td>
          <td class="paramname"> <em>ranges</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga0e76fb5ffa4547ccbe54e1a09d562b0a"></a><!-- doxytag: member="brlapi.h::brlapi__acceptKeys" ref="ga0e76fb5ffa4547ccbe54e1a09d562b0a" args="(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi__acceptKeys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *&nbsp;</td>
          <td class="paramname"> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a>&nbsp;</td>
          <td class="paramname"> <em>keys</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gae0bc6b3628c42fa6387f3a398e424932"></a><!-- doxytag: member="brlapi.h::brlapi__ignoreAllKeys" ref="gae0bc6b3628c42fa6387f3a398e424932" args="(brlapi_handle_t *handle)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi__ignoreAllKeys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *&nbsp;</td>
          <td class="paramname"> <em>handle</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gad4de372b84bf12ec74cda2e59da31b8f"></a><!-- doxytag: member="brlapi.h::brlapi__ignoreKeyRanges" ref="gad4de372b84bf12ec74cda2e59da31b8f" args="(brlapi_handle_t *handle, brlapi_range_t ranges[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi__ignoreKeyRanges </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *&nbsp;</td>
          <td class="paramname"> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a>&nbsp;</td>
          <td class="paramname"> <em>ranges</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga6bd1a8af2c1d1b09a55d5647fbc9e035"></a><!-- doxytag: member="brlapi.h::brlapi__ignoreKeys" ref="ga6bd1a8af2c1d1b09a55d5647fbc9e035" args="(brlapi_handle_t *handle, brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi__ignoreKeys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *&nbsp;</td>
          <td class="paramname"> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a>&nbsp;</td>
          <td class="paramname"> <em>keys</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ga557d77c4e1bf70a0d01b619aea152120"></a><!-- doxytag: member="brlapi.h::brlapi__readKey" ref="ga557d77c4e1bf70a0d01b619aea152120" args="(brlapi_handle_t *handle, int wait, brlapi_keyCode_t *code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi__readKey </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__handles.html#ga57f2aec62b18f8aefea2ab550744b0c1">brlapi_handle_t</a> *&nbsp;</td>
          <td class="paramname"> <em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>wait</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> *&nbsp;</td>
          <td class="paramname"> <em>code</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="gafef1d9fd59fed736d1cdc50e0352aabb"></a><!-- doxytag: member="brlapi.h::brlapi_acceptKeyRanges" ref="gafef1d9fd59fed736d1cdc50e0352aabb" args="(brlapi_range_t ranges[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_acceptKeyRanges </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a>&nbsp;</td>
          <td class="paramname"> <em>ranges</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Accept some key presses from the braille keyboard</p>
<p>This function asks the server to return the provided key ranges (inclusive) to the application, and not give them to <em>brltty</em>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ranges</em>&nbsp;</td><td>key ranges, which are inclusive </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>number of ranges</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The given codes should be raw keycodes (i.e. some driver name was given to <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a>) </dd></dl>

</div>
</div>
<a class="anchor" id="ga15399581e093fc1635c53f4815fae551"></a><!-- doxytag: member="brlapi.h::brlapi_acceptKeys" ref="ga15399581e093fc1635c53f4815fae551" args="(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_acceptKeys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a>&nbsp;</td>
          <td class="paramname"> <em>keys</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Accept some key presses from the braille keyboard</p>
<p>This function asks the server to give the provided keys to the application, and not give them to <em>brltty</em>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>type of keys to be ignored </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>keys</em>&nbsp;</td><td>array of keys to be ignored </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>number of keys</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The given codes should be <em>brltty</em> commands (NULL or "" was given to <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a>) </dd></dl>

</div>
</div>
<a class="anchor" id="ga27cd6a123ab9c8685055b72e0481067d"></a><!-- doxytag: member="brlapi.h::brlapi_describeKeyCode" ref="ga27cd6a123ab9c8685055b72e0481067d" args="(brlapi_keyCode_t code, brlapi_describedKeyCode_t *description)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_describeKeyCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a>&nbsp;</td>
          <td class="paramname"> <em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structbrlapi__describedKeyCode__t.html">brlapi_describedKeyCode_t</a> *&nbsp;</td>
          <td class="paramname"> <em>description</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Describe the components of a key code.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>code</em>&nbsp;</td><td>the keycode to be described </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>description</em>&nbsp;</td><td>pointer to the structure that receives the description</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on error </dd></dl>

</div>
</div>
<a class="anchor" id="gafdac75a70de34360e62bd17cddaecb5d"></a><!-- doxytag: member="brlapi.h::brlapi_expandKeyCode" ref="gafdac75a70de34360e62bd17cddaecb5d" args="(brlapi_keyCode_t code, brlapi_expandedKeyCode_t *expansion)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_expandKeyCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a>&nbsp;</td>
          <td class="paramname"> <em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structbrlapi__expandedKeyCode__t.html">brlapi_expandedKeyCode_t</a> *&nbsp;</td>
          <td class="paramname"> <em>expansion</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Expand the components of a key code</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>code</em>&nbsp;</td><td>the key code to be expanded </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>expansion</em>&nbsp;</td><td>pointer to the structure that receives the components</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on error </dd></dl>

</div>
</div>
<a class="anchor" id="ga3ccaf06f70f11b9364a4610752f26c9e"></a><!-- doxytag: member="brlapi.h::brlapi_ignoreKeyRanges" ref="ga3ccaf06f70f11b9364a4610752f26c9e" args="(brlapi_range_t ranges[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_ignoreKeyRanges </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structbrlapi__range__t.html">brlapi_range_t</a>&nbsp;</td>
          <td class="paramname"> <em>ranges</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Ignore some key presses from the braille keyboard</p>
<p>This function asks the server to give the provided key ranges to <em>brltty</em>, rather than returning them to the application via <a class="el" href="group__brlapi__keys.html#ga3b5ba0c43d48792e7071e772b50b9cbe">brlapi_readKey()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ranges</em>&nbsp;</td><td>key ranges, which are inclusive </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>number of ranges</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The given codes should be raw keycodes (i.e. some driver name was given to <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a>) </dd></dl>

</div>
</div>
<a class="anchor" id="ga51f541d3e9e1a797a4e4c5ef884f02cb"></a><!-- doxytag: member="brlapi.h::brlapi_ignoreKeys" ref="ga51f541d3e9e1a797a4e4c5ef884f02cb" args="(brlapi_rangeType_t type, const brlapi_keyCode_t keys[], unsigned int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_ignoreKeys </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__brlapi__keys.html#ga04da4d59bcca169be939b8ebfc274bd2">brlapi_rangeType_t</a>&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a>&nbsp;</td>
          <td class="paramname"> <em>keys</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Ignore some key presses from the braille keyboard</p>
<p>This function asks the server to give the provided keys to <em>brltty</em>, rather than returning them to the application via <a class="el" href="group__brlapi__keys.html#ga3b5ba0c43d48792e7071e772b50b9cbe">brlapi_readKey()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>type of keys to be ignored </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>keys</em>&nbsp;</td><td>array of keys to be ignored </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>number of keys</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></dt><dd>The given codes should be <em>brltty</em> commands (NULL or "" was given to <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a>) </dd></dl>

</div>
</div>
<a class="anchor" id="ga3b5ba0c43d48792e7071e772b50b9cbe"></a><!-- doxytag: member="brlapi.h::brlapi_readKey" ref="ga3b5ba0c43d48792e7071e772b50b9cbe" args="(int wait, brlapi_keyCode_t *code)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int BRLAPI_STDCALL brlapi_readKey </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>wait</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__brlapi__keycodes.html#ga956fddb34f9b399e884b1fafdb037b6a">brlapi_keyCode_t</a> *&nbsp;</td>
          <td class="paramname"> <em>code</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read a key from the braille keyboard</p>
<p>This function returns one key press's code.</p>
<p>If NULL or "" was given to <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a>, a <em>brltty</em> command is returned, as described in <code>&lt;brltty/brldefs.h&gt;</code> . It is hence pretty driver-independent, and should be used by default when no other option is possible.</p>
<p>By default, all commands but those which restart drivers and switch virtual terminals are returned to the application and not to brltty. If the application doesn't want to see some command events, it should call <a class="el" href="group__brlapi__keys.html#ga51f541d3e9e1a797a4e4c5ef884f02cb">brlapi_ignoreKeys()</a></p>
<p>If some driver name was given to <a class="el" href="group__brlapi__tty.html#ga6d8ae822fa87d9bfb1fb15ecf2bbcaac">brlapi_enterTtyMode()</a>, a raw keycode is returned, as specified by the terminal driver, usually in &lt;brltty/brldefs-xy&gt; where xy is the driver's code. It generally corresponds to the very code that the terminal tells to the driver. This should only be used by applications which are dedicated to a particular braille terminal. Hence, checking the terminal type thanks to a call to <a class="el" href="group__brlapi__info.html#ga2dcd2285e75571a861c1f9c27a44bd0f">brlapi_getDriverName()</a> before getting tty control is a pretty good idea.</p>
<p>By default, all the keypresses will be passed to the client, none will go through brltty, so the application will have to handle console switching itself for instance.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>wait</em>&nbsp;</td><td>tells whether the call should block until a key is pressed (1) or should only probe key presses (0); </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>code</em>&nbsp;</td><td>holds the key code if a key press is indeed read.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 on error or signal interrupt and *code is then undefined, 0 if block was 0 and no key was pressed so far, or 1 and *code holds the key code.</dd></dl>
<p>Programming hints:</p>
<p>If your application is only driven by braille command keypresses, you can just call brlapi_readKey(1, &amp;code) so that it keeps blocking, waiting for keypresses.</p>
<p>Else, you'll probably want to use the file descriptor returned by <a class="el" href="group__brlapi__connection.html#gacd26dc42640bdad09a389be10b9e3618">brlapi_openConnection()</a> in your "big polling loop". For instance:</p>
<ul>
<li>in a <code>select()</code> loop, just add it to the <code>readfds</code> and <code>exceptfds</code> file descriptor sets;</li>
<li>in a gtk or atspi application, use <code>g_io_add_watch</code>(fileDescriptor, <code>G_IO_IN|G_IO_ERR|G_IO_HUP</code>, <code>f</code>, <code>data</code>) for adding a callback called <code>f</code>;</li>
<li>in an Xt/Xaw/motif-based application, use <code>XtAppAddInput</code>(app_context, <code>fileDescriptor</code>, <code>XtInputReadMask|XtInputExceptMask</code>, <code>f</code>, <code>data</code>)</li>
<li>etc.</li>
</ul>
<p>and then, when you detect inbound trafic on the file descriptor, do something like this:</p>
<p>while (brlapi_readKey(0, &amp;code) { // process keycode code // ... }</p>
<p>The <code>while</code> loop is needed for processing <em>all</em> pending key presses, else some of them may be left in libbrlapi's internal key buffer and you wouldn't get them immediately.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>If the read is interrupted by a signal, <a class="el" href="group__brlapi__keys.html#ga3b5ba0c43d48792e7071e772b50b9cbe">brlapi_readKey()</a> will return -1, brlapi_errno will be BRLAPI_ERROR_LIBCERR and errno will be EINTR. </dd></dl>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on 9 May 2010 for BrlAPI by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>