forked from mxstbr/karabiner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karabiner.ts
55 lines (53 loc) · 1.61 KB
/
karabiner.ts
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
import fs from "fs";
import { KarabinerRules } from "./types";
import { createDisableKeyMapOnPrograms } from "./disableKeyMapsOfProgram";
import { createHyperKeyRules } from "./hyperKeyRules";
import { createFnKeyMaps } from "./fnKeyRules";
import { createMouseKeyRules } from "./mouseKeysRules";
import karabinerRaw from "./karabiner_raw.json";
const rules: KarabinerRules[] = [
...createHyperKeyRules(),
...createDisableKeyMapOnPrograms(),
createFnKeyMaps(),
createMouseKeyRules(),
...(karabinerRaw.rawJson as KarabinerRules[]),
];
fs.writeFileSync(
"karabiner.json",
JSON.stringify(
{
global: {
ask_for_confirmation_before_quitting: true,
check_for_updates_on_startup: true,
show_in_menu_bar: true,
show_profile_name_in_menu_bar: false,
unsafe_ui: false,
},
profiles: [
{
name: "Quang Nguyen Karabiner modified",
complex_modifications: {
rules,
},
parameters: {
delay_milliseconds_before_open_device: 1000,
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 500,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100,
},
selected: true,
simple_modifications: [],
virtual_hid_keyboard: {
country_code: 0,
indicate_stiky_modifier_keys_state: true,
mouse_key_xy_scale: 100,
},
},
],
},
null,
2
)
);