Skip to content

Commit 6505c8f

Browse files
committed
Update personal_tekezo (Add Post command+click when fn is pressed alone)
1 parent 20d57f8 commit 6505c8f

File tree

3 files changed

+56
-138
lines changed

3 files changed

+56
-138
lines changed

public/extra_descriptions/personal_tekezo.json.html

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Change left_control to lazy left_control (Post spacebar when pressed alone)
66
</li>
77
<li>Post spacebar when left_shift is pressed alone</li>
8+
<li>Post command+click when fn is pressed alone</li>
89
</ul>
910

1011
<ul>
@@ -27,13 +28,6 @@
2728
<li>Change option+= to ==========</li>
2829
</ul>
2930

30-
<ul>
31-
<li>Change fn+page_down to display_brightness_decrement_decrement</li>
32-
<li>Change fn+page_up to display_brightness_decrement_increment</li>
33-
<li>Change page_down to volume_decrement</li>
34-
<li>Change page_up to volume_increment</li>
35-
</ul>
36-
3731
<ul>
3832
<li>Miscellaneous configuration for apps</li>
3933
</ul>

public/json/personal_tekezo.json

Lines changed: 28 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,36 @@
55
],
66
"rules": [
77
{
8-
"description": "Personal rules (@tekezo) (rev 40)",
8+
"description": "Personal rules (@tekezo) (rev 41)",
99
"available_since": "13.6.0",
1010
"manipulators": [
11+
{
12+
"type": "basic",
13+
"from": {
14+
"key_code": "fn",
15+
"modifiers": {
16+
"optional": [
17+
"any"
18+
]
19+
}
20+
},
21+
"to": [
22+
{
23+
"key_code": "fn"
24+
}
25+
],
26+
"to_if_alone": [
27+
{
28+
"pointing_button": "button1",
29+
"modifiers": [
30+
"left_command"
31+
]
32+
}
33+
],
34+
"parameters": {
35+
"basic.to_if_alone_timeout_milliseconds": 250
36+
}
37+
},
1138
{
1239
"type": "basic",
1340
"from": {
@@ -584,82 +611,6 @@
584611
}
585612
]
586613
},
587-
{
588-
"type": "basic",
589-
"from": {
590-
"key_code": "page_down",
591-
"modifiers": {
592-
"mandatory": [
593-
"fn"
594-
],
595-
"optional": [
596-
"any"
597-
]
598-
}
599-
},
600-
"to": [
601-
{
602-
"consumer_key_code": "display_brightness_decrement"
603-
}
604-
]
605-
},
606-
{
607-
"type": "basic",
608-
"from": {
609-
"key_code": "page_up",
610-
"modifiers": {
611-
"mandatory": [
612-
"fn"
613-
],
614-
"optional": [
615-
"any"
616-
]
617-
}
618-
},
619-
"to": [
620-
{
621-
"consumer_key_code": "display_brightness_increment"
622-
}
623-
]
624-
},
625-
{
626-
"type": "basic",
627-
"from": {
628-
"key_code": "page_down",
629-
"modifiers": {
630-
"mandatory": [
631-
632-
],
633-
"optional": [
634-
"any"
635-
]
636-
}
637-
},
638-
"to": [
639-
{
640-
"consumer_key_code": "volume_decrement"
641-
}
642-
]
643-
},
644-
{
645-
"type": "basic",
646-
"from": {
647-
"key_code": "page_up",
648-
"modifiers": {
649-
"mandatory": [
650-
651-
],
652-
"optional": [
653-
"any"
654-
]
655-
}
656-
},
657-
"to": [
658-
{
659-
"consumer_key_code": "volume_increment"
660-
}
661-
]
662-
},
663614
{
664615
"type": "basic",
665616
"from": {

src/json/personal_tekezo.json.rb

Lines changed: 27 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ def main
1919
'maintainers' => ['tekezo'],
2020
'rules' => [
2121
{
22-
'description' => 'Personal rules (@tekezo) (rev 40)',
22+
'description' => 'Personal rules (@tekezo) (rev 41)',
2323
'available_since' => '13.6.0',
2424
'manipulators' =>
2525
core_configuration +
2626
emacs +
2727
mouse +
2828
extra_cursor +
2929
option_hyphen +
30-
media_controls +
3130
app_virtual_machine +
3231
app_finder +
3332
app_terminal +
@@ -41,6 +40,31 @@ def main
4140

4241
def core_configuration
4342
[
43+
########################################
44+
# fn
45+
########################################
46+
47+
# Post command+click when fn is pressed alone
48+
{
49+
'type' => 'basic',
50+
'from' => {
51+
'key_code' => 'fn',
52+
'modifiers' => Karabiner.from_modifiers,
53+
},
54+
'to' => [
55+
{ 'key_code' => 'fn' },
56+
],
57+
'to_if_alone' => [
58+
{
59+
'pointing_button' => 'button1',
60+
'modifiers' => ['left_command'],
61+
},
62+
],
63+
'parameters' => {
64+
'basic.to_if_alone_timeout_milliseconds' => 250,
65+
},
66+
},
67+
4468
########################################
4569
# left_control
4670
########################################
@@ -145,7 +169,7 @@ def core_configuration
145169
},
146170

147171
########################################
148-
# fn
172+
# left_command, left_option
149173
########################################
150174

151175
# input source switch
@@ -473,57 +497,6 @@ def option_hyphen
473497
]
474498
end
475499

476-
def media_controls
477-
# Change fn+page_up,page_down to brightness control
478-
# Change page_up,page_down to volume control
479-
[
480-
# fn+page_down
481-
{
482-
'type' => 'basic',
483-
'from' => {
484-
'key_code' => 'page_down',
485-
'modifiers' => Karabiner.from_modifiers(['fn'], ['any']),
486-
},
487-
'to' => [
488-
{ 'consumer_key_code' => 'display_brightness_decrement' },
489-
],
490-
},
491-
# fn+page_up
492-
{
493-
'type' => 'basic',
494-
'from' => {
495-
'key_code' => 'page_up',
496-
'modifiers' => Karabiner.from_modifiers(['fn'], ['any']),
497-
},
498-
'to' => [
499-
{ 'consumer_key_code' => 'display_brightness_increment' },
500-
],
501-
},
502-
# page_down
503-
{
504-
'type' => 'basic',
505-
'from' => {
506-
'key_code' => 'page_down',
507-
'modifiers' => Karabiner.from_modifiers([], ['any']),
508-
},
509-
'to' => [
510-
{ 'consumer_key_code' => 'volume_decrement' },
511-
],
512-
},
513-
# page_up
514-
{
515-
'type' => 'basic',
516-
'from' => {
517-
'key_code' => 'page_up',
518-
'modifiers' => Karabiner.from_modifiers([], ['any']),
519-
},
520-
'to' => [
521-
{ 'consumer_key_code' => 'volume_increment' },
522-
],
523-
},
524-
]
525-
end
526-
527500
def app_virtual_machine
528501
[
529502
{

0 commit comments

Comments
 (0)