This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 311
/
samples.xml
2814 lines (2581 loc) · 124 KB
/
samples.xml
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
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<root>
<item>
<name>Samples for Karabiner Binding Developers</name>
<appendix>defined in .../include/checkbox/samples.xml</appendix>
<item>
<name>SetKeyboardType</name>
<appendix>Showing __SetKeyboardType__ and KeyboardType::*</appendix>
<item>
<identifier>remap.samples_setkeyboardtype_macbook</identifier>
<name>Set keyboardType = KeyboardType::MACBOOK</name>
<autogen>__SetKeyboardType__ KeyboardType::MACBOOK</autogen>
</item>
<item>
<identifier>remap.samples_setkeyboardtype_macbook_3_1</identifier>
<name>Set keyboardType = KeyboardType::MACBOOK_3_1</name>
<autogen>__SetKeyboardType__ KeyboardType::MACBOOK_3_1</autogen>
</item>
<item>
<identifier>remap.samples_setkeyboardtype_jis_macbook_2008</identifier>
<name>Set keyboardType = KeyboardType::JIS_MACBOOK_2008</name>
<autogen>__SetKeyboardType__ KeyboardType::JIS_MACBOOK_2008</autogen>
</item>
<item>
<identifier>remap.samples_setkeyboardtype_jis_macbook_2008_terminal</identifier>
<name>Set keyboardType = KeyboardType::JIS_MACBOOK_2008 on Terminal.app</name>
<only>TERMINAL</only>
<autogen>__SetKeyboardType__ KeyboardType::JIS_MACBOOK_2008</autogen>
</item>
</item>
<item>
<name>Pass Through Mode</name>
<appendix>(To "pass through" means to turn off further remapping.)</appendix>
<item>
<identifier>passthrough.samples</identifier>
<name>Core - Toggle Passthrough</name>
<appendix>Change A to toggle "Pass Through Mode"</appendix>
<autogen>
__KeyToKey__
KeyCode::A,
KeyCode::VK_CONFIG_TOGGLE_notsave_passthrough,
Option::IGNORE_PASSTHROUGH,
</autogen>
</item>
<item>
<identifier>remap.samples_passthrough</identifier>
<name>Mapping Samples</name>
<appendix>(mappings to test passthrough)</appendix>
<appendix></appendix>
<autogen>__ShowStatusMessage__ Mapping Samples Active</autogen>
<appendix>B to C (using __KeyToKey__ and KeyCode::*)</appendix>
<appendix></appendix>
<autogen>__KeyToKey__ KeyCode::B, KeyCode::C</autogen>
<appendix>Volume Mute to A (using ConsumerKeyCode::VOLUME_MUTE)</appendix>
<appendix></appendix>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_MUTE, KeyCode::A</autogen>
<appendix>RightClick+CursorMove to ScrollWheel</appendix>
<appendix>(using __PointingRelativeToScroll__ and PointingButton::*</appendix>
<appendix></appendix>
<autogen>__PointingRelativeToScroll__ PointingButton::RIGHT</autogen>
<appendix>Hold left click to open Mission Control</appendix>
<appendix>(using __HoldingKeyToKey__, KeyCode::MISSION_CONTROL, NOREPEAT)</appendix>
<appendix></appendix>
<autogen>
__HoldingKeyToKey__
PointingButton::LEFT,
@begin
PointingButton::LEFT,
@end
@begin
KeyCode::MISSION_CONTROL,
KeyCode::VK_NONE,
Option::NOREPEAT,
@end
</autogen>
<appendix>Simultaneous Key Presses [D+F] to Escape</appendix>
<appendix>(using __SimultaneousKeyPresses__)</appendix>
<autogen>__SimultaneousKeyPresses__ KeyCode::F, KeyCode::D, KeyCode::ESCAPE</autogen>
</item>
<item>
<identifier>remap.samples_passthrough_terminal</identifier>
<name>Disable all settings while you are using Terminal.</name>
<appendix>(using __PassThrough__ and only)</appendix>
<only>TERMINAL</only>
<autogen>__PassThrough__</autogen>
</item>
<item>
<identifier>remap.samples_passthrough_apple_devices</identifier>
<name>Disable all settings on Apple keyboards and pointing devices.</name>
<appendix>(using device_only, DeviceVendor::*, DeviceProduct::*)</appendix>
<device_only>DeviceVendor::APPLE_INC, DeviceProduct::ANY</device_only>
<autogen>__PassThrough__</autogen>
</item>
</item>
<item>
<name>ShowStatusMessage</name>
<appendix>(show a message box, usually in lower right corner)</appendix>
<item>
<identifier>remap.samples_showstatusmessage_sample1</identifier>
<name>Sample1</name>
<appendix>(using __ShowStatusMessage__)</appendix>
<!--
Note:
__ShowStatusMessage__ ignores all filters. (eg: `only`, `not`, etc)
It always shows the message when it is enabled.
-->
<autogen>__ShowStatusMessage__ Sample1</autogen>
</item>
<item>
<identifier>remap.samples_showstatusmessage_sample2</identifier>
<name>Sample2</name>
<appendix>(shares box with Sample1 if both selected)</appendix>
<autogen>__ShowStatusMessage__ Sample2</autogen>
</item>
<item>
<identifier>remap.samples_showstatusmessage_longmessage</identifier>
<name>A Long Message Taking Up Most Box Space</name>
<appendix>(shares box with Sample1 if both selected)</appendix>
<autogen>__ShowStatusMessage__ A Long Message Taking Up Most Box Space</autogen>
</item>
<item>
<identifier>remap.samples_showstatusmessage_multilinemessage</identifier>
<name>A Multiline Message Over Two Lines</name>
<autogen>__ShowStatusMessage__ A Multiline Message Over
Two Lines</autogen>
</item>
<item>
<identifier>remap.samples_showstatusmessage_sample3</identifier>
<name>Sample3</name>
<appendix>(cannot see if box is full)</appendix>
<autogen>__ShowStatusMessage__ Sample3</autogen>
</item>
<item>
<identifier>remap.samples_showstatusmessage_empty</identifier>
<name>(Empty)</name>
<appendix>(diplays box even when no other message active)</appendix>
<autogen>__ShowStatusMessage__</autogen>
</item>
<item>
<identifier>remap.samples_showstatusmessage_lock_sticky</identifier>
<name>Lock modifiers and Sticky</name>
<appendix>
<![CDATA[
(See modifiers if Preferences pane->Status Message tab->Show Sticky Modifiers is checked)
]]>
</appendix>
<appendix>Q to Lock Control_L</appendix>
<appendix>W to Lock Left Button</appendix>
<appendix>E to Sticky Shift_L</appendix>
<autogen>__KeyToKey__ KeyCode::Q, KeyCode::VK_LOCK_CONTROL_L</autogen>
<autogen>__KeyToKey__ KeyCode::W, KeyCode::VK_MOUSEKEY_LOCK_BUTTON_LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::E, KeyCode::VK_STICKY_SHIFT_L</autogen>
</item>
</item>
<item>
<name>KeyToKey</name>
<item>
<identifier>remap.samples_keytokey_standard</identifier>
<name>Standard Remappings</name>
<appendix>(using __KeyToKey__ and KeyCode::*)</appendix>
<appendix>A to B</appendix>
<appendix>S to SHIFT_L</appendix>
<appendix>SHIFT_L to Return</appendix>
<appendix>Option_L to Command_L</appendix>
<autogen>__KeyToKey__ KeyCode::A, KeyCode::B</autogen>
<autogen>__KeyToKey__ KeyCode::S, KeyCode::SHIFT_L</autogen>
<autogen>__KeyToKey__ KeyCode::SHIFT_L, KeyCode::RETURN</autogen>
<autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_right_left</identifier>
<name>MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT</name>
<appendix>Map A+(SHIFT_L or SHIFT_R) to B</appendix>
<appendix>MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT is alias to</appendix>
<appendix>ModifierFlag::SHIFT_L and ModifierFlag::SHIFT_R</appendix>
<appendix>+--------------------------------------------</appendix>
<appendix>| <autogen></appendix>
<appendix>| __KeyToKey__</appendix>
<appendix>| KeyCode::A, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT,</appendix>
<appendix>| KeyCode::B,</appendix>
<appendix>| </autogen></appendix>
<appendix>+--------------------------------------------</appendix>
<appendix>==> __KeyToKey__ KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::B</appendix>
<appendix>==> __KeyToKey__ KeyCode::A, ModifierFlag::SHIFT_R, KeyCode::B</appendix>
<autogen>__KeyToKey__ KeyCode::A, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::B</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_modifier_any</identifier>
<name>MODIFIERFLAGS_ANY</name>
<appendix>Map C+(any modifier keys) to D+(those same modifier keys) then E</appendix>
<appendix>Multiple MODIFIERFLAG_* in one definition are replaced with same value.</appendix>
<appendix>+--------------------------------------------</appendix>
<appendix>| <autogen></appendix>
<appendix>| __KeyToKey__</appendix>
<appendix>| KeyCode::C, MODIFIERFLAGS_ANY,</appendix>
<appendix>| KeyCode::D, MODIFIERFLAGS_ANY,</appendix>
<appendix>| KeyCode::E,</appendix>
<appendix>| </autogen></appendix>
<appendix>+--------------------------------------------</appendix>
<appendix>==> 2 MODIFIERFLAGS_ANYs are replaced to ModifierFlag::COMMAND_L</appendix>
<appendix>==> 2 MODIFIERFLAGS_ANYs are replaced to ModifierFlag::COMMAND_R</appendix>
<appendix>==> ... replaced to ModifierFlag::CONTROL_L</appendix>
<appendix>==> ... replaced to ModifierFlag::CONTROL_R</appendix>
<appendix>==> ... replaced to ModifierFlag::COMMAND_L|ModifierFlag::CONTROL_L</appendix>
<appendix>==> ...</appendix>
<autogen>__KeyToKey__ KeyCode::C, MODIFIERFLAGS_ANY, KeyCode::D, MODIFIERFLAGS_ANY, KeyCode::E</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_key2xxx</identifier>
<name>Key To Key with Modifier Flags</name>
<appendix>A to Shift_L+B (Key to Key+Modifier)</appendix>
<autogen>__KeyToKey__ KeyCode::A, KeyCode::B, ModifierFlag::SHIFT_L</autogen>
<appendix>B to Command_L+Shift_L (Key to Modifier+Modifier)</appendix>
<autogen>__KeyToKey__ KeyCode::B, KeyCode::COMMAND_L, ModifierFlag::SHIFT_L</autogen>
<appendix>Shift+C to Space (Key+Modifier To Key)</appendix>
<autogen>__KeyToKey__ KeyCode::C, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::SPACE</autogen>
<appendix>Shift+D to Option_L (Key+Modifier To Modifier)</appendix>
<autogen>__KeyToKey__ KeyCode::D, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::OPTION_L</autogen>
<appendix>Shift+E to Control_L+Space (Key+Modifier To Key+Modifier)</appendix>
<autogen>__KeyToKey__ KeyCode::E, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::SPACE, ModifierFlag::CONTROL_L</autogen>
<appendix>Shift+F to Option_L+Shift_L (Key+Modifier To Modifier+Modifier)</appendix>
<autogen>__KeyToKey__ KeyCode::F, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::SHIFT_L, ModifierFlag::OPTION_L</autogen>
<appendix>G to CapsLock (To CapsLock)</appendix>
<autogen>__KeyToKey__ KeyCode::G, KeyCode::CAPSLOCK</autogen>
<appendix>Shift+Control+H to Option_L+Space</appendix>
<autogen>__KeyToKey__ KeyCode::H, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL | MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::SPACE, ModifierFlag::OPTION_L</autogen>
<appendix>Fn+hjkl to Left/Down/Up/Right (Key+Fn to Key) (around KeyPad)</appendix>
<autogen>__KeyToKey__ KeyCode::H, ModifierFlag::FN, KeyCode::CURSOR_LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::J, ModifierFlag::FN, KeyCode::CURSOR_DOWN</autogen>
<autogen>__KeyToKey__ KeyCode::K, ModifierFlag::FN, KeyCode::CURSOR_UP</autogen>
<autogen>__KeyToKey__ KeyCode::L, ModifierFlag::FN, KeyCode::CURSOR_RIGHT</autogen>
<appendix>S to Shift_L+Shift_R</appendix>
<autogen>__KeyToKey__ KeyCode::S, KeyCode::SHIFT_R, ModifierFlag::SHIFT_L</autogen>
<appendix>1 to A (only if no Modifiers)</appendix>
<autogen>__KeyToKey__ KeyCode::KEY_1, ModifierFlag::NONE, KeyCode::A</autogen>
<appendix>2 to A (only if Shift_L is only modifier)</appendix>
<autogen>__KeyToKey__ KeyCode::KEY_2, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::A</autogen>
<appendix>Command+Volume Down to Space (if no other modifiers pressed)</appendix>
<autogen>
__KeyToKey__
ConsumerKeyCode::VOLUME_DOWN, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND | ModifierFlag::NONE,
KeyCode::SPACE,
</autogen>
<appendix>RightClick to CapsLock,A</appendix>
<autogen>
__KeyToKey__
<!-- from -->
PointingButton::RIGHT,
<!-- to -->
KeyCode::CAPSLOCK,
KeyCode::A,
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_key2xxx_2</identifier>
<name>Key To Key with Multiple Modifiers</name>
<appendix>Option+A to Command_L+Shift_L+Tab</appendix>
<appendix>Option+S to Command_L+Tab</appendix>
<autogen>__KeyToKey__ KeyCode::A, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::TAB, ModifierFlag::COMMAND_L | ModifierFlag::SHIFT_L</autogen>
<autogen>__KeyToKey__ KeyCode::S, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::TAB, ModifierFlag::COMMAND_L</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_key2xxx_3</identifier>
<name>Key To Key with Capslock</name>
<appendix>A to CapsLock</appendix>
<autogen>__KeyToKey__ KeyCode::A, KeyCode::CAPSLOCK</autogen>
<appendix>CapsLock+S to Shift_L+1</appendix>
<autogen>__KeyToKey__ KeyCode::S, ModifierFlag::CAPSLOCK, KeyCode::KEY_1, ModifierFlag::SHIFT_L</autogen>
<appendix>CapsLock+O to Option_L+2</appendix>
<autogen>__KeyToKey__ KeyCode::O, ModifierFlag::CAPSLOCK, KeyCode::KEY_2, ModifierFlag::OPTION_L</autogen>
<appendix>CapsLock+C to Command_L+3</appendix>
<autogen>__KeyToKey__ KeyCode::C, ModifierFlag::CAPSLOCK, KeyCode::KEY_3, ModifierFlag::COMMAND_L</autogen>
<appendix></appendix>
<appendix>Change Shift_L key to turning CapsLock off</appendix>
<appendix>(Retain Shift_L movement when CapsLock is off)</appendix>
<autogen>__KeyToKey__ KeyCode::SHIFT_L, ModifierFlag::CAPSLOCK, KeyCode::CAPSLOCK, KeyCode::VK_NONE</autogen>
<appendix></appendix>
<appendix>Change Shift_R key to turning CapsLock off</appendix>
<appendix>(Retain Shift_R movement at all times)</appendix>
<block>
<modifier_only>ModifierFlag::CAPSLOCK</modifier_only>
<autogen>__KeyToKey__ KeyCode::SHIFT_R, KeyCode::CAPSLOCK, KeyCode::SHIFT_R</autogen>
</block>
</item>
<item>
<identifier>remap.samples_keytokey_key2xxx_4</identifier>
<name>Key To Key with Shift</name>
<appendix>A to Shift_L</appendix>
<appendix>Shift_L+A to B</appendix>
<autogen>__KeyToKey__ KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::B</autogen>
<autogen>__KeyToKey__ KeyCode::A, KeyCode::SHIFT_L</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_modifier2xxx</identifier>
<name>Modifiers To Modifiers</name>
<appendix>Shift_R to Command_L+Option_L (Modifier to Modifier+Modifier)</appendix>
<appendix>Fn+Option_L to Command_L (Modifier+Modifier To Modifier)</appendix>
<autogen>__KeyToKey__ KeyCode::SHIFT_R, KeyCode::COMMAND_L, ModifierFlag::OPTION_L</autogen>
<autogen>__KeyToKey__ KeyCode::OPTION_L, ModifierFlag::FN, KeyCode::COMMAND_L</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_interactions</identifier>
<name>Key to Key interactions between mappings.</name>
<appendix>(These are best understood by watching the result in EventViewer)</appendix>
<appendix></appendix>
<appendix>Shift_L to Shift_L (if no other modifiers pressed)</appendix>
<appendix></appendix>
<autogen>__KeyToKey__ KeyCode::SHIFT_L, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::SHIFT_L</autogen>
<appendix>Shift_L to Command_L</appendix>
<appendix>(but only with other modifiers because Shift_L by itself grabbed by above)</appendix>
<appendix></appendix>
<autogen>__KeyToKey__ KeyCode::SHIFT_L, KeyCode::COMMAND_L</autogen>
<appendix>Shift+A to B</appendix>
<appendix>(including Shift_L+A but Control+L_shift+A gives control+command+a)</appendix>
<appendix></appendix>
<autogen>__KeyToKey__ KeyCode::A, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::B</autogen>
<appendix>Shift_R to Shift_R+A (if no other modifiers pressed)</appendix>
<appendix></appendix>
<autogen>__KeyToKey__ KeyCode::SHIFT_R, ModifierFlag::SHIFT_R | ModifierFlag::NONE, KeyCode::A, ModifierFlag::SHIFT_R</autogen>
<appendix>Command_L+Command_R to Command_L+Command_R (if no other modifiers pressed)</appendix>
<autogen>__KeyToKey__ KeyCode::COMMAND_R, ModifierFlag::COMMAND_L | ModifierFlag::COMMAND_R | ModifierFlag::NONE, KeyCode::COMMAND_R, ModifierFlag::COMMAND_L</autogen>
<appendix>Command_L+Command_R+A to B</appendix>
<autogen>__KeyToKey__ KeyCode::A, ModifierFlag::COMMAND_L | ModifierFlag::COMMAND_R, KeyCode::B</autogen>
<appendix>Command_R to Option_R</appendix>
<autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_R</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_modifier_self</identifier>
<name>Referencing a Modifier Key in its mapping</name>
<appendix>(including self modifier, ModifierFlag::SHIFT_R)</appendix>
<appendix>Shift_R to A</appendix>
<appendix>Shift_L+Shift_R to B</appendix>
<autogen>__KeyToKey__ KeyCode::SHIFT_R, ModifierFlag::SHIFT_L | ModifierFlag::SHIFT_R, KeyCode::B</autogen>
<autogen>__KeyToKey__ KeyCode::SHIFT_R, KeyCode::A</autogen>
<appendix></appendix>
<appendix>(excluding self modfier, ModifierFlag::COMMAND_R)</appendix>
<appendix>Command_R to A</appendix>
<appendix>Command_L+Command_R to B</appendix>
<autogen>__KeyToKey__ KeyCode::COMMAND_R, ModifierFlag::COMMAND_L, KeyCode::B</autogen>
<autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::A</autogen>
</item>
<item>
<identifier>remap.samples_consumertokey</identifier>
<name>ConsumerKeyCode to KeyCode</name>
<appendix>Command+Volume Down to A,S,Shift_L+D,Control_L+F,G</appendix>
<appendix>Volume Down to A</appendix>
<appendix>Option+Volume Up to Shift_L (Key+Modifier to Modifier)</appendix>
<appendix>Shift+Volume Up to B (with Modifier)</appendix>
<appendix>Volume Up to Control_L (to Modifier)</appendix>
<appendix>Option+Volume Mute to Shift_L+C (to Key+Modifier)</appendix>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_DOWN, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND, KeyCode::A, KeyCode::S, KeyCode::D, ModifierFlag::SHIFT_L, KeyCode::F, ModifierFlag::CONTROL_L, KeyCode::G</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_DOWN, KeyCode::A</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_UP, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::SHIFT_L</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_UP, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, KeyCode::B</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_UP, KeyCode::CONTROL_L</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_MUTE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::C, ModifierFlag::SHIFT_L</autogen>
</item>
<item>
<identifier>remap.samples_keytoconsumer</identifier>
<name>KeyCode to ConsumerKeyCode</name>
<appendix>A to Volume Mute</appendix>
<appendix>Shift+B to Volume Mute (With Modifier)</appendix>
<appendix>Shift_L to Volume Mute (Modifier To)</appendix>
<appendix>C to Option_L+Volume Mute (To Key+Modifier)</appendix>
<appendix>D to Volume Up, Brightness Up</appendix>
<autogen>__KeyToKey__ KeyCode::A, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>__KeyToKey__ KeyCode::B, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>__KeyToKey__ KeyCode::SHIFT_L, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>__KeyToKey__ KeyCode::C, ConsumerKeyCode::VOLUME_MUTE, ModifierFlag::OPTION_L</autogen>
<autogen>__KeyToKey__ KeyCode::D, ConsumerKeyCode::VOLUME_UP, ConsumerKeyCode::BRIGHTNESS_UP</autogen>
</item>
<item>
<identifier>remap.samples_consumertoconsumer</identifier>
<name>ConsumerKeyCode to ConsumerKeyCode</name>
<appendix>Volume Mute to Volume Up</appendix>
<appendix>Volume Down to Volume Mute</appendix>
<appendix>Shift+Volume Up to Volume Mute (with Modifier)</appendix>
<appendix>Music Play to Power</appendix>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_MUTE, ConsumerKeyCode::VOLUME_UP</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_DOWN, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_UP, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, ConsumerKeyCode::VOLUME_MUTE</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::MUSIC_PLAY, ConsumerKeyCode::POWER</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontokey</identifier>
<name>PointingButton to KeyCode</name>
<appendix>MiddleClick to Return</appendix>
<appendix>Option_L+RightClick to Shift_L</appendix>
<appendix>Command_L+RightClick to A, Shift_L+B, Control_L+C</appendix>
<appendix>RightClick to Control_L</appendix>
<appendix>RightClick to Tab (if application == TERMINAL)</appendix>
<appendix>Control_L+LeftClick to Space</appendix>
<autogen>__KeyToKey__ PointingButton::MIDDLE, KeyCode::RETURN</autogen>
<autogen>__KeyToKey__ PointingButton::RIGHT, ModifierFlag::OPTION_L, KeyCode::SHIFT_L</autogen>
<autogen>__KeyToKey__ PointingButton::RIGHT, ModifierFlag::COMMAND_L, KeyCode::A, KeyCode::B, ModifierFlag::SHIFT_L, KeyCode::C, ModifierFlag::CONTROL_L</autogen>
<block>
<only>TERMINAL</only>
<autogen>__KeyToKey__ PointingButton::RIGHT, KeyCode::TAB</autogen>
</block>
<autogen>__KeyToKey__ PointingButton::RIGHT, KeyCode::CONTROL_L</autogen>
<autogen>__KeyToKey__ PointingButton::LEFT, ModifierFlag::CONTROL_L, KeyCode::SPACE</autogen>
</item>
<item>
<identifier>remap.samples_keytopointingbutton</identifier>
<name>KeyCode to PointingButton</name>
<appendix>A to LeftClick (Standard)</appendix>
<appendix>S to Double-LeftClick</appendix>
<appendix>D to Shift_L+LeftClick,RightClick</appendix>
<appendix>Option_L to LeftClick (Modifier)</appendix>
<appendix>Shift_R to LeftClick,RightClick (Modifier)</appendix>
<appendix>Shift+B to RightClick (Key+Modifier)</appendix>
<appendix>Shift+F to RightClick,MiddleClick (Key+Modifier)</appendix>
<appendix>Shift+Control_L to RightClick (Modifier+Modifier)</appendix>
<appendix>Shift+Command_L to RightClick,MiddleClick (Modifier+Modifier)</appendix>
<appendix>1 to LeftClick</appendix>
<appendix>2 to MiddleClick</appendix>
<appendix>3 to RightClick</appendix>
<appendix>4 to Button4</appendix>
<appendix>5 to Button5</appendix>
<appendix>6 to Button6</appendix>
<appendix>7 to Button7</appendix>
<appendix>8 to Button8</appendix>
<appendix>Q to Button9</appendix>
<appendix>W to Button10</appendix>
<appendix>E to Button11</appendix>
<appendix>R to Button12</appendix>
<appendix>T to Button13</appendix>
<appendix>Y to Button14</appendix>
<appendix>U to Button15</appendix>
<appendix>I to Button16</appendix>
<autogen>__KeyToKey__ KeyCode::A, PointingButton::LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::S, PointingButton::LEFT, PointingButton::LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::D, PointingButton::LEFT, ModifierFlag::SHIFT_L, PointingButton::RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::OPTION_L, PointingButton::LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::SHIFT_R, PointingButton::LEFT, PointingButton::RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::B, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, PointingButton::RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::F, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, PointingButton::RIGHT, PointingButton::MIDDLE</autogen>
<autogen>__KeyToKey__ KeyCode::CONTROL_L, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, PointingButton::RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::COMMAND_L, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_SHIFT, PointingButton::RIGHT, PointingButton::MIDDLE</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_1, PointingButton::LEFT</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_2, PointingButton::MIDDLE</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_3, PointingButton::RIGHT</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_4, PointingButton::BUTTON4</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_5, PointingButton::BUTTON5</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_6, PointingButton::BUTTON6</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_7, PointingButton::BUTTON7</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_8, PointingButton::BUTTON8</autogen>
<autogen>__KeyToKey__ KeyCode::Q, PointingButton::BUTTON9</autogen>
<autogen>__KeyToKey__ KeyCode::W, PointingButton::BUTTON10</autogen>
<autogen>__KeyToKey__ KeyCode::E, PointingButton::BUTTON11</autogen>
<autogen>__KeyToKey__ KeyCode::R, PointingButton::BUTTON12</autogen>
<autogen>__KeyToKey__ KeyCode::T, PointingButton::BUTTON13</autogen>
<autogen>__KeyToKey__ KeyCode::Y, PointingButton::BUTTON14</autogen>
<autogen>__KeyToKey__ KeyCode::U, PointingButton::BUTTON15</autogen>
<autogen>__KeyToKey__ KeyCode::I, PointingButton::BUTTON16</autogen>
</item>
<item>
<identifier>remap.samples_keytopointingbutton_modifier</identifier>
<name>KeyCode to Modifier+PointingButton</name>
<appendix>Escape to Command_L+LeftClick</appendix>
<appendix></appendix>
<appendix>Events should be following order.</appendix>
<appendix></appendix>
<appendix>eventType:keyMod name:Command_L flags:Cmd</appendix>
<appendix>eventType:mouseDown name:left flags:Cmd</appendix>
<appendix>eventType:mouseUp name:left flags:Cmd</appendix>
<appendix>eventType:keyMod name:Command_L flags:</appendix>
<autogen>__KeyToKey__ KeyCode::ESCAPE, PointingButton::LEFT, ModifierFlag::COMMAND_L</autogen>
</item>
<item><name>──────────────────────────────</name></item>
<item>
<name>PointingButton to PointingButton</name>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_r2m</identifier>
<name>RightClick to MiddleClick</name>
<autogen>__KeyToKey__ PointingButton::RIGHT, PointingButton::MIDDLE</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_r2cl</identifier>
<name>RightClick to Command_L+LeftClick</name>
<autogen>
__KeyToKey__
PointingButton::RIGHT,
PointingButton::LEFT, ModifierFlag::COMMAND_L
</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_ol2or</identifier>
<name>Option+LeftClick to Option+RightClick</name>
<autogen>
__KeyToKey__
PointingButton::LEFT, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION,
PointingButton::RIGHT, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION
</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_ol2m</identifier>
<name>Option+LeftClick to MiddleClick</name>
<autogen>__KeyToKey__ PointingButton::LEFT, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, PointingButton::MIDDLE</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_fl2ol</identifier>
<name>Fn+LeftClick to Option_L+LeftClick</name>
<autogen>__KeyToKey__ PointingButton::LEFT, ModifierFlag::FN, PointingButton::LEFT, ModifierFlag::OPTION_L</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_r2dl</identifier>
<name>RightClick to Double-LeftClick</name>
<autogen>__KeyToKey__ PointingButton::RIGHT, PointingButton::LEFT, PointingButton::LEFT</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_r2sll</identifier>
<name>RightClick to Shift_L+LeftClick, LeftClick</name>
<autogen>__KeyToKey__ PointingButton::RIGHT, PointingButton::LEFT, ModifierFlag::SHIFT_L, PointingButton::LEFT</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_r2slr</identifier>
<name>RightClick to Shift_L+LeftClick, RightClick</name>
<autogen>__KeyToKey__ PointingButton::RIGHT, PointingButton::LEFT, ModifierFlag::SHIFT_L, PointingButton::RIGHT</autogen>
</item>
<item>
<identifier>remap.samples_pointingbuttontopointingbutton_cr2dl</identifier>
<name>Control+RightClick to Double-LeftClick</name>
<autogen>__KeyToKey__ PointingButton::RIGHT, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL, PointingButton::LEFT, PointingButton::LEFT</autogen>
</item>
<item><name>──────────────────────────────</name></item>
<item>
<identifier>remap.samples_keytokey_combination</identifier>
<name>Combination</name>
<appendix>A to B,C (Standard)</appendix>
<appendix>B to A,B,Shift_L+C,D,Control_L+P (Key To)</appendix>
<appendix>C to JIS_KANA,A,I,JIS_EISUU,U (Key To with Japanese)</appendix>
<appendix>Shift_L to A,B,Control_L+B,Shift_L+C,D (Modifier To)</appendix>
<appendix>Control+D to Shift_L+A, Control_L+F (Key+Modifier To)</appendix>
<appendix>E to Type "https://pqrs.org/osx/karabiner/"</appendix>
<appendix>F to CapsLock,A,S,D,CapsLock</appendix>
<appendix>G to Option_L,Shift_L,A,S</appendix>
<appendix>Volume Mute to Volume Up,Brightness Up</appendix>
<appendix></appendix>
<appendix>H to A,KeyCode::VK_NONE</appendix>
<appendix>(KeyDown and KeyUp will be fired at the same time when H key is pressed)</appendix>
<autogen>__KeyToKey__ KeyCode::A, KeyCode::B, KeyCode::C</autogen>
<autogen>__KeyToKey__ KeyCode::B, KeyCode::A, KeyCode::B, KeyCode::C, ModifierFlag::SHIFT_L, KeyCode::D, KeyCode::P, ModifierFlag::CONTROL_L</autogen>
<autogen>__KeyToKey__ KeyCode::C, KeyCode::JIS_KANA, KeyCode::A, KeyCode::I, KeyCode::JIS_EISUU, KeyCode::U</autogen>
<autogen>__KeyToKey__ KeyCode::SHIFT_L, KeyCode::A, KeyCode::B, KeyCode::B, ModifierFlag::CONTROL_L, KeyCode::C, ModifierFlag::SHIFT_L, KeyCode::D</autogen>
<autogen>__KeyToKey__ KeyCode::D, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL, KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::F, ModifierFlag::CONTROL_L</autogen>
<autogen>
__KeyToKey__
KeyCode::E, ModifierFlag::NONE,
KeyCode::H, KeyCode::T, KeyCode::T, KeyCode::P, KeyCode::S,
KeyCode::SEMICOLON, ModifierFlag::SHIFT_L, KeyCode::SLASH, KeyCode::SLASH,
KeyCode::P, KeyCode::Q, KeyCode::R, KeyCode::S,
KeyCode::DOT,
KeyCode::O, KeyCode::R, KeyCode::G,
KeyCode::SLASH,
KeyCode::O, KeyCode::S, KeyCode::X,
KeyCode::SLASH,
KeyCode::K, KeyCode::A, KeyCode::R, KeyCode::A, KeyCode::B, KeyCode::I, KeyCode::N, KeyCode::E, KeyCode::R,
KeyCode::SLASH
</autogen>
<autogen>__KeyToKey__ KeyCode::F, KeyCode::CAPSLOCK, KeyCode::A, KeyCode::S, KeyCode::D, KeyCode::CAPSLOCK</autogen>
<autogen>__KeyToKey__ KeyCode::G, KeyCode::OPTION_L, KeyCode::SHIFT_L, KeyCode::A, KeyCode::S</autogen>
<autogen>
__KeyToKey__
ConsumerKeyCode::VOLUME_MUTE,
ConsumerKeyCode::VOLUME_UP,
ConsumerKeyCode::BRIGHTNESS_UP,
</autogen>
<autogen>__KeyToKey__ KeyCode::H, KeyCode::A, KeyCode::VK_NONE</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_combination1</identifier>
<name>Combination (2)</name>
<appendix>A to A,S,Shift_L (Shift_L is active while we're pressing A key)</appendix>
<appendix>Shift_R to A,S,Control_L (Control_L is active while we're pressing Shift_R key)</appendix>
<appendix>Command+B to A,S,Shift_L (Shift_L is active while we're pressing B key)</appendix>
<appendix>Control_L+Option_L to A,S,Shift_L (Shift_L is active while we're pressing Option_L key)</appendix>
<autogen>__KeyToKey__ KeyCode::A, KeyCode::A, KeyCode::S, KeyCode::SHIFT_L</autogen>
<autogen>__KeyToKey__ KeyCode::SHIFT_R, KeyCode::A, KeyCode::S, KeyCode::CONTROL_L</autogen>
<autogen>__KeyToKey__ KeyCode::B, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND, KeyCode::A, KeyCode::S, KeyCode::SHIFT_L</autogen>
<autogen>__KeyToKey__ KeyCode::OPTION_L, ModifierFlag::CONTROL_L, KeyCode::A, KeyCode::S, KeyCode::SHIFT_L</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_combination_3</identifier>
<name>Combination(3)</name>
<appendix>Shift_L to A,Shift_L+S,D (if no other modifiers pressed)</appendix>
<appendix>Command+A to Volume Mute (if no other modifiers pressed)</appendix>
<autogen>__KeyToKey__ KeyCode::SHIFT_L, ModifierFlag::SHIFT_L | ModifierFlag::NONE, KeyCode::A, KeyCode::S, ModifierFlag::SHIFT_L, KeyCode::D</autogen>
<autogen>
__KeyToKey__
KeyCode::A, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND | ModifierFlag::NONE,
ConsumerKeyCode::VOLUME_MUTE,
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_combination_4</identifier>
<name>Combination(4)</name>
<appendix>A to CapsLock,A,S</appendix>
<appendix>// This has a issue with key repeat.</appendix>
<appendix>// In key repeat, CapsLock status is not changed.</appendix>
<autogen>__KeyToKey__ KeyCode::A, KeyCode::CAPSLOCK, KeyCode::A, KeyCode::S</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_norepeat</identifier>
<name>NoRepeat</name>
<appendix>1 to A (with Option::NOREPEAT)</appendix>
<appendix>2 to A,B,C (with Option::NOREPEAT)</appendix>
<appendix>3 to Shift_L (with Option::NOREPEAT)</appendix>
<appendix>A to Volume Up (with Option::NOREPEAT)</appendix>
<appendix>Volume Mute to Volume Up,Brightness Up (with NoRepeat)</appendix>
<appendix>Volume Down to A (with Option::NOREPEAT)</appendix>
<appendix>Volume Up to Volume Down (with NoRepeat)</appendix>
<appendix>RightClick to A (with Option::NOREPEAT)</appendix>
<autogen>__KeyToKey__ KeyCode::KEY_1, KeyCode::A, Option::NOREPEAT</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_2, KeyCode::A, KeyCode::B, KeyCode::C, Option::NOREPEAT</autogen>
<autogen>__KeyToKey__ KeyCode::KEY_3, KeyCode::SHIFT_L, Option::NOREPEAT</autogen>
<autogen>
__KeyToKey__
ConsumerKeyCode::VOLUME_MUTE,
ConsumerKeyCode::VOLUME_UP,
ConsumerKeyCode::BRIGHTNESS_UP,
Option::NOREPEAT,
</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_DOWN, KeyCode::A, Option::NOREPEAT</autogen>
<autogen>__KeyToKey__ ConsumerKeyCode::VOLUME_UP, ConsumerKeyCode::VOLUME_DOWN, Option::NOREPEAT</autogen>
<autogen>__KeyToKey__ PointingButton::RIGHT, KeyCode::A, Option::NOREPEAT</autogen>
<autogen>__KeyToKey__ KeyCode::A, ConsumerKeyCode::VOLUME_UP, Option::NOREPEAT</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_delayuntilrepeat</identifier>
<name>DelayUntilRepeat, KeyRepeat</name>
<appendix>1 to A (with DelayUntilRepeat::RawValue::1, KeyRepeat::RawValue::1)</appendix>
<appendix>Volume Down to A (with DelayUntilRepeat::RawValue::1, KeyRepeat::RawValue::1)</appendix>
<appendix>RightClick to A (with DelayUntilRepeat::RawValue::1, KeyRepeat::RawValue::1)</appendix>
<autogen>
__KeyToKey__
KeyCode::KEY_1,
KeyCode::A,
<!-- 1 millisecond -->
DelayUntilRepeat::RawValue::1,
<!-- 1 millisecond -->
KeyRepeat::RawValue::1,
</autogen>
<autogen>
__KeyToKey__
ConsumerKeyCode::VOLUME_DOWN,
KeyCode::A,
<!-- 1 millisecond -->
DelayUntilRepeat::RawValue::1,
<!-- 1 millisecond -->
KeyRepeat::RawValue::1,
</autogen>
<autogen>
__KeyToKey__
PointingButton::RIGHT,
KeyCode::A,
<!-- 1 millisecond -->
DelayUntilRepeat::RawValue::1,
<!-- 1 millisecond -->
KeyRepeat::RawValue::1,
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_beforekeydown</identifier>
<name>BeforeKeyDown, AfterKeyUp</name>
<appendix>1 to A (BeforeKeyDown Return, AfterKeyUp Tab)</appendix>
<appendix>Shift_R to A (BeforeKeyDown Control+B,C AfterKeyUp Option+D,E)</appendix>
<appendix></appendix>
<appendix>Control_L+2 to Control+Option+A</appendix>
<appendix>(BeforeKeyDown Shift+B,C AfterKeyUp Option+D,E,Control+F)</appendix>
<appendix></appendix>
<appendix>Control_L+Shift_L to A,B</appendix>
<appendix>(BeforeKeyDown C AfterKeyUp D)</appendix>
<appendix></appendix>
<appendix>Change Input Source while pressing right option key.</appendix>
<appendix>(Sending Command+Space when pressing/releasing right option key.)</appendix>
<appendix></appendix>
<appendix>SimultaneousKeyPresses S+D to B.</appendix>
<appendix>(BeforeKeyDown C, AfterKeyUp D)</appendix>
<appendix></appendix>
<appendix>Volume Mute to B.</appendix>
<appendix>(BeforeKeyDown C, AfterKeyUp D)</appendix>
<appendix></appendix>
<appendix>Right Click to B.</appendix>
<appendix>(BeforeKeyDown C, AfterKeyUp D)</appendix>
<autogen>
__KeyToKey__
KeyCode::KEY_1, KeyCode::A,
Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::RETURN,
Option::KEYTOKEY_AFTER_KEYUP, KeyCode::TAB
</autogen>
<autogen>
__KeyToKey__
KeyCode::SHIFT_R, KeyCode::A,
Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::B, ModifierFlag::CONTROL_L, KeyCode::C,
Option::KEYTOKEY_AFTER_KEYUP, KeyCode::D, ModifierFlag::OPTION_L, KeyCode::E,
</autogen>
<autogen>
__KeyToKey__
KeyCode::KEY_2, ModifierFlag::CONTROL_L, KeyCode::A, ModifierFlag::CONTROL_L | ModifierFlag::OPTION_L,
Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::B, ModifierFlag::SHIFT_R, KeyCode::C,
Option::KEYTOKEY_AFTER_KEYUP, KeyCode::D, ModifierFlag::OPTION_L, KeyCode::E, KeyCode::F, ModifierFlag::CONTROL_L
</autogen>
<autogen>
__KeyToKey__
KeyCode::SHIFT_L, ModifierFlag::CONTROL_L, KeyCode::A, KeyCode::B,
Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::C,
Option::KEYTOKEY_AFTER_KEYUP, KeyCode::D
</autogen>
<!-- Hack: Sending KeyCode::CONTROL_L after send control-space to release the control key -->
<autogen>
__KeyToKey__
KeyCode::OPTION_R, KeyCode::VK_NONE,
Option::KEYTOKEY_BEFORE_KEYDOWN, {{ ENV_Select_the_previous_input_source_shortcut }}, KeyCode::CONTROL_L,
Option::KEYTOKEY_AFTER_KEYUP, {{ ENV_Select_the_previous_input_source_shortcut }},
</autogen>
<autogen>
__SimultaneousKeyPresses__
KeyCode::S, KeyCode::D,
KeyCode::B,
Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::C,
Option::KEYTOKEY_AFTER_KEYUP, KeyCode::D,
</autogen>
<autogen>
__KeyToKey__
ConsumerKeyCode::VOLUME_MUTE,
KeyCode::B,
Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::C,
Option::KEYTOKEY_AFTER_KEYUP, KeyCode::D,
</autogen>
<autogen>
__KeyToKey__
PointingButton::RIGHT,
KeyCode::B,
Option::KEYTOKEY_BEFORE_KEYDOWN, KeyCode::C,
Option::KEYTOKEY_AFTER_KEYUP, KeyCode::D,
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_afterkeyup1</identifier>
<name>AfterKeyUp with ModifierFlag conditional pattern matching. (1)</name>
<appendix>* Change the right option key to control key.</appendix>
<appendix>* AfterKeyUp f1 when the left shift key and the left control key are pressed.</appendix>
<appendix>* AfterKeyUp f2 when the left shift key is pressed.</appendix>
<appendix>* AfterKeyUp f3 when the left control key is pressed.</appendix>
<appendix>* Otherwise, AfterKeyUp f4.</appendix>
<appendix></appendix>
<appendix>For example, OPTION_R down, SHIFT_L down, OPTION_R up sends f2.</appendix>
<autogen>
__KeyToKey__
KeyCode::OPTION_R,
KeyCode::CONTROL_L,
Option::KEYTOKEY_AFTER_KEYUP, ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L,
KeyCode::F1,
Option::KEYTOKEY_AFTER_KEYUP, ModifierFlag::SHIFT_L,
KeyCode::F2,
Option::KEYTOKEY_AFTER_KEYUP, ModifierFlag::CONTROL_L,
KeyCode::F3,
Option::KEYTOKEY_AFTER_KEYUP,
KeyCode::F4,
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_afterkeyup2</identifier>
<name>AfterKeyUp with ModifierFlag conditional pattern matching. (2)</name>
<appendix>* Change the right shift key to shift-right arrow.</appendix>
<appendix>* AfterKeyUp command-c.</appendix>
<appendix>* If the escape key is pressed, AfterKeyUp will be cancel.</appendix>
<autogen>
__KeyToKey__
KeyCode::SHIFT_R,
KeyCode::CURSOR_RIGHT,
Option::KEYTOKEY_BEFORE_KEYDOWN,
KeyCode::VK_LOCK_SHIFT_R_FORCE_ON,
Option::KEYTOKEY_AFTER_KEYUP, ModifierFlag::SHIFT_R,
KeyCode::VK_LOCK_SHIFT_R_FORCE_OFF,
KeyCode::C, ModifierFlag::COMMAND_L,
</autogen>
<autogen>
__KeyToKey__
KeyCode::ESCAPE, ModifierFlag::SHIFT_R,
KeyCode::VK_LOCK_SHIFT_R_FORCE_OFF,
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_delayed_action</identifier>
<name>Option::KEYTOKEY_DELAYED_ACTION</name>
<appendix>────────</appendix>
<appendix>Change the return key x2 to the space key.</appendix>
<appendix></appendix>
<appendix>* When you press the return key twice, a space key event will be sent. (no return key events)</appendix>
<appendix>* When you press the return key once, a return key event will be sent.</appendix>
<appendix>────────</appendix>
<appendix>Change control-tab to the left shift key.</appendix>
<appendix>+ Change control-tab x2 to a,option-b,control-c,d</appendix>
<appendix></appendix>
<appendix>* When you press control-tab twice, "left shift, a, option-b, control-c, d" will be sent.</appendix>
<appendix>* When you press control-tab once, "left shift" will be sent.</appendix>
<appendix>────────</appendix>
<appendix>Change control-escape to option-1.</appendix>
<appendix>+ Change control-escape x2 to option-2.</appendix>
<appendix>────────</appendix>
<autogen>
__KeyToKey__
KeyCode::RETURN,
KeyCode::VK_NONE,
<!--
| You can send key events in the timeout callback that is set at key up by Option::KEYTOKEY_DELAYED_ACTION.
| (You can adjust timeout milliseconds by Preferences > Parameters tab.)
|
| You can also send key events when timeout callback is cancelled.
| * Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY
| * Option::KEYTOKEY_DELAYED_ACTION_CANCELED_DEFAULT
|
| If you specify KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT,
| the pressed key will be ignored.
| For example, the following command sends the space key event if you interrupted timeout callback by the return key.
| The KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT suppresses the return key event.
| Without it, the space key and the return key events will be sent.
|
| Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY, KeyCode::RETURN,
| KeyCode::SPACE,
| KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT,
-->
Option::KEYTOKEY_DELAYED_ACTION,
KeyCode::RETURN,
Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY, KeyCode::RETURN,
KeyCode::SPACE,
KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT, <!-- drop second return key event -->
</autogen>
<autogen>
__KeyToKey__
KeyCode::TAB, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL,
KeyCode::SHIFT_L,
Option::KEYTOKEY_DELAYED_ACTION,
KeyCode::VK_NONE,
Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY, KeyCode::TAB,
KeyCode::A,
KeyCode::B, ModifierFlag::OPTION_L,
KeyCode::C, ModifierFlag::CONTROL_L,
KeyCode::D,
KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT, <!-- drop second tab key event -->
</autogen>
<autogen>
__KeyToKey__
KeyCode::ESCAPE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_CONTROL,
KeyCode::VK_NONE,
Option::KEYTOKEY_DELAYED_ACTION,
KeyCode::KEY_1, ModifierFlag::OPTION_L,
Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY, KeyCode::ESCAPE,
KeyCode::KEY_2, ModifierFlag::OPTION_L,
KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT, <!-- drop second escapet key event -->
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_delayed_action_2</identifier>
<name>Option::KEYTOKEY_DELAYED_ACTION (2)</name>
<appendix>────────</appendix>
<appendix>Change the right command key x2 to shift-space.</appendix>
<appendix></appendix>
<appendix>* When you press the right command key twice, "right command, shift-space" will be sent.</appendix>
<appendix>* When you press the right command key once, right command key event will be sent.</appendix>
<appendix>────────</appendix>
<autogen>
__KeyToKey__
KeyCode::COMMAND_R,
KeyCode::COMMAND_R,
Option::KEYTOKEY_DELAYED_ACTION,
KeyCode::VK_NONE,
Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY, KeyCode::COMMAND_R,
KeyCode::SPACE, ModifierFlag::SHIFT_L,
KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT, <!-- drop second right command key event -->
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_delayed_action_3</identifier>
<name>Option::KEYTOKEY_DELAYED_ACTION (3)</name>
<appendix>With __HoldingKeyToKey__</appendix>
<appendix>────────</appendix>
<appendix>Change the return key to `1`.</appendix>
<appendix>+ Input `2` by holding the return key down.</appendix>
<appendix>+ Input `3` by press the return key twice.</appendix>
<appendix>────────</appendix>
<autogen>
__HoldingKeyToKey__
KeyCode::RETURN,
<!-- ======================================== -->
<!-- normal press -->
@begin
KeyCode::VK_NONE,
Option::KEYTOKEY_DELAYED_ACTION,
KeyCode::KEY_1,
Option::KEYTOKEY_DELAYED_ACTION_CANCELED_BY, KeyCode::RETURN,
KeyCode::KEY_3,
KeyCode::VK_KEYTOKEY_DELAYED_ACTION_DROP_EVENT,
@end
<!-- ======================================== -->
<!-- holding -->
@begin
KeyCode::KEY_2,
@end
</autogen>
</item>
<item>
<identifier>remap.samples_keytokey_delayed_action_4</identifier>
<name>Option::KEYTOKEY_DELAYED_ACTION (4)</name>
<appendix>* change space,1 to f1</appendix>
<appendix>* change space,2 to f2</appendix>
<appendix>* change space,3 to f3</appendix>
<appendix>* change space,4 to f4</appendix>
<appendix>* space will be the return key when another key is pressed (eg. change space,5 to return,5).</appendix>
<autogen>
__KeyToKey__