TTTキーボード研究室


Leia4 std配列 Karabiner-Elementsソースコード(DUMANG DK6キーボード)

同時押し定義

●説明

ファイル名「LEIA4_abbreviation_v401a.json」

DUMANG DK6キーボード用のソースコードです。Karabiner-Elements15を使用しています。

略語を定義しています。
前半は2打鍵目の処理、後半が1打鍵目の処理です。


{
"title": "LEIA4 略語",
"rules": [
  {
	"description": "LEIA4 略語 v4.01a",
	"manipulators": [
  
  
  
  {"_comment": "2打鍵:子音略語=============================="},
  
  {"type":"basic","from":{"key_code":"k"},"to":[		{"key_code": "o"},	{"key_code": "k"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "h"}]},
  {"type":"basic","from":{"key_code":"n"},"to":[		{"key_code": "u"},	{"key_code": "n"},	{"key_code": "n"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "h"}]},
  {"type":"basic","from":{"key_code":"s"},"to":[		{"key_code": "a"},	{"key_code": "s"},	{"key_code": "i"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "h"}]},
								  
  {"type":"basic","from":{"key_code":"hyphen"},"to":[		{"key_code": "i"},	{"key_code": "g"},	{"key_code": "a"},	{"key_code": "s"},	{"key_code": "i"}			],"conditions":[{"type":"variable_if","name":"first_char","value": "h"}]},
  {"type":"basic","from":{"key_code":"t"},"to":[		{"key_code": "o"},	{"key_code": "d"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "h"}]},
								  
  {"type":"basic","from":{"key_code":"n"},"to":[		{"key_code": "o"},	{"key_code": "n"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "k"}]},
  {"type":"basic","from":{"key_code":"r"},"to":[		{"key_code": "a"},	{"key_code": "r"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "k"}]},
  {"type":"basic","from":{"key_code":"s"},"to":[		{"key_code": "u"},	{"key_code": "d"},	{"key_code": "a"},	{"key_code": "s"},	{"key_code": "a"},	{"key_code": "i"}		],"conditions":[{"type":"variable_if","name":"first_char","value": "k"}]},
  {"type":"basic","from":{"key_code":"t"},"to":[		{"key_code": "o"},	{"key_code": "t"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "k"}]},
  {"type":"basic","from":{"key_code":"w"},"to":[		{"key_code": "a"},	{"key_code": "w"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "k"}]},
  {"type":"basic","from":{"key_code":"k"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "g"},	{"key_code": "a"},	{"key_code": "t"},	{"key_code": "u"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "k"}]},
								  
  {"type":"basic","from":{"key_code":"hyphen"},"to":[		{"key_code": "i"},	{"key_code": "t"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "k"}]},
								  
  {"type":"basic","from":{"key_code":"k"},"to":[		{"key_code": "a"},	{"key_code": "s"},	{"key_code": "e"},	{"key_code": "n"},	{"key_code": "n"}			],"conditions":[{"type":"variable_if","name":"first_char","value": "m"}]},
  {"type":"basic","from":{"key_code":"n"},"to":[		{"key_code": "o"},	{"key_code": "n"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "m"}]},
  {"type":"basic","from":{"key_code":"s"},"to":[		{"key_code": "a"},	{"key_code": "s"},	{"key_code": "u"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "m"}]},
  {"type":"basic","from":{"key_code":"t"},"to":[		{"key_code": "a"},	{"key_code": "s"},	{"key_code": "i"},	{"key_code": "t"},	{"key_code": "a"}			],"conditions":[{"type":"variable_if","name":"first_char","value": "m"}]},
  {"type":"basic","from":{"key_code":"h"},"to":[		{"key_code": "a"},	{"key_code": "d"},	{"key_code": "e"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "m"}]},
								  
  {"type":"basic","from":{"key_code":"hyphen"},"to":[		{"key_code": "i"},	{"key_code": "n"},	{"key_code": "a"},	{"key_code": "m"},	{"key_code": "i"}			],"conditions":[{"type":"variable_if","name":"first_char","value": "m"}]},
								  
  {"type":"basic","from":{"key_code":"m"},"to":[		{"key_code": "a"},	{"key_code": "d"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "n"}]},
  {"type":"basic","from":{"key_code":"h"},"to":[		{"key_code": "i"},	{"key_code": "h"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "n"}]},
  {"type":"basic","from":{"key_code":"k"},"to":[		{"key_code": "a"},	{"key_code": "n"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "n"}]},
  {"type":"basic","from":{"key_code":"r"},"to":[		{"key_code": "a"},	{"key_code": "r"},	{"key_code": "u"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "n"}]},
  {"type":"basic","from":{"key_code":"s"},"to":[		{"key_code": "a"},	{"key_code": "r"},	{"key_code": "i"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "n"}]},
  {"type":"basic","from":{"key_code":"t"},"to":[		{"key_code": "i"},	{"key_code": "t"},	{"key_code": "i"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "n"}]},
								  
  {"type":"basic","from":{"key_code":"hyphen"},"to":[		{"key_code": "i"},	{"key_code": "s"},	{"key_code": "i"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "n"}]},
								  
  {"type":"basic","from":{"key_code":"r"},"to":[		{"key_code": "e"},	{"key_code": "r"},	{"key_code": "u"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "r"}]},
								  
  {"type":"basic","from":{"key_code":"hyphen"},"to":[		{"key_code": "a"},	{"key_code": "r"},	{"key_code": "e"},	{"key_code": "r"},	{"key_code": "u"}			],"conditions":[{"type":"variable_if","name":"first_char","value": "r"}]},
								  
  {"type":"basic","from":{"key_code":"k"},"to":[		{"key_code": "o"},	{"key_code": "k"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"m"},"to":[		{"key_code": "a"},	{"key_code": "m"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"n"},"to":[		{"key_code": "o"},	{"key_code": "n"},	{"key_code": "o"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"r"},"to":[		{"key_code": "u"},	{"key_code": "r"},	{"key_code": "u"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"s"},"to":[		{"key_code": "i"},	{"key_code": "m"},	{"key_code": "a"},	{"key_code": "s"},	{"key_code": "u"}			],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"t"},"to":[		{"key_code": "i"},	{"key_code": "t"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"x"},"to":[		{"key_code": "i"},	{"key_code": "m"},	{"key_code": "a"},	{"key_code": "s"},	{"key_code": "i"},	{"key_code": "t"},	{"key_code": "a"}	],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
								  
  {"type":"basic","from":{"key_code":"hyphen"},"to":[		{"key_code": "y"},	{"key_code": "u"},	{"key_code": "n"},	{"key_code": "n"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"h"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "z"},	{"key_code": "y"},	{"key_code": "u"},	{"key_code": "n"},	{"key_code": "n"}			],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
  {"type":"basic","from":{"key_code":"w"},"to":[		{"key_code": "i"},	{"key_code": "k"},	{"key_code": "i"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "s"}]},
								  
  {"type":"basic","from":{"key_code":"h"},"to":[		{"key_code": "o"},	{"key_code": "h"},	{"key_code": "a"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
  {"type":"basic","from":{"key_code":"k"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "d"},	{"key_code": "e"},	{"key_code": "k"},	{"key_code": "i"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
  {"type":"basic","from":{"key_code":"m"},"to":[		{"key_code": "a"},	{"key_code": "m"},	{"key_code": "e"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
  {"type":"basic","from":{"key_code":"r"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "d"},	{"key_code": "e"},	{"key_code": "r"},	{"key_code": "u"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
  {"type":"basic","from":{"key_code":"s"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "d"},	{"key_code": "e"},	{"key_code": "s"},	{"key_code": "u"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
  {"type":"basic","from":{"key_code":"t"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "d"},	{"key_code": "e"},	{"key_code": "s"},	{"key_code": "i"},	{"key_code": "t"},	{"key_code": "a"}		],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
								  
  {"type":"basic","from":{"key_code":"hyphen"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "d"},	{"key_code": "e"},	{"key_code": "s"},	{"key_code": "y"},	{"key_code": "o"},	{"key_code": "u"}		],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
  {"type":"basic","from":{"key_code":"x"},"to":[		{"key_code": "u"},	{"key_code": "g"},	{"key_code": "i"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "t"}]},
								  
  {"type":"basic","from":{"key_code":"k"},"to":[		{"key_code": "a"},	{"key_code": "k"},	{"key_code": "e"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "w"}]},
								  
  {"type":"basic","from":{"key_code":"k"},"to":[		{"key_code": "o"},	{"key_code": "k"},	{"key_code": "u"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "y"}]},
  {"type":"basic","from":{"key_code":"r"},"to":[		{"key_code": "o"},	{"key_code": "r"},	{"key_code": "i"}					],"conditions":[{"type":"variable_if","name":"first_char","value": "y"}]},
								  
  {"type":"basic","from":{"key_code":"w"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "y"},	{"key_code": "a"},	{"key_code": "n"},	{"key_code": "n"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "w"}]},
								  
  
  {"type":"basic","from":{"key_code":"period"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "y"},	{"key_code": "u"},	{"key_code": "n"},	{"key_code": "n"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "w"}]},
  
  {"type":"basic","from":{"key_code":"comma"},"to":[	{"key_code": "delete_or_backspace"},	{"key_code": "y"},	{"key_code": "o"},	{"key_code": "n"},	{"key_code": "n"}				],"conditions":[{"type":"variable_if","name":"first_char","value": "w"}]},
  
  
  {"_comment": "変数first_charには1打目の文字を格納する"},
  
  {
  "type": "basic",
  "from": {"key_code": "d"},
  "to": [
	  {"key_code": "d"},
	  { "set_variable": { "name": "first_char", "value": "d" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
	  { "type": "variable_if", "name": "first_char", "value": 0 }
  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "g"},
  "to": [
	  {"key_code": "g"},
	  { "set_variable": { "name": "first_char", "value": "g" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "h"},
  "to": [
	  {"key_code": "h"},
	  { "set_variable": { "name": "first_char", "value": "h" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "k"},
  "to": [
	  {"key_code": "k"},
	  { "set_variable": { "name": "first_char", "value": "k" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "m"},
  "to": [
	  {"key_code": "m"},
	  { "set_variable": { "name": "first_char", "value": "m" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "n"},
  "to": [
	  {"key_code": "n"},
	  { "set_variable": { "name": "first_char", "value": "n" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "r"},
  "to": [
	  {"key_code": "r"},
	  { "set_variable": { "name": "first_char", "value": "r" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "s"},
  "to": [
	  {"key_code": "s"},
	  { "set_variable": { "name": "first_char", "value": "s" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "t"},
  "to": [
	  {"key_code": "t"},
	  { "set_variable": { "name": "first_char", "value": "t" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "w"},
  "to": [
	  {"key_code": "w"},
	  { "set_variable": { "name": "first_char", "value": "w" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "x"},
  "to": [
	  {"key_code": "x"},
	  { "set_variable": { "name": "first_char", "value": "x" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "y"},
  "to": [
	  {"key_code": "y"},
	  { "set_variable": { "name": "first_char", "value": "y" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  {
  "type": "basic",
  "from": {"key_code": "z"},
  "to": [
	  {"key_code": "z"},
	  { "set_variable": { "name": "first_char", "value": "z" } }
  ],
  "to_delayed_action": {
	  "to_if_invoked": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ],
	  "to_if_canceled": [
		  { "set_variable": { "name": "first_char", "value": 0 } }
	  ]
  },
  "conditions": [
	  {	"type": "input_source_if",
		  "input_sources": [{ "language": "ja" }]
		},
		{ "type": "variable_if", "name": "first_char", "value": 0 }
	  ]
  },
  
  
  {"_comment": "EOF=============================="}
  
		  ]
	  }
  ]
  }
  


[TTTキーボード研究室 TOP] [東京タヌキ探検隊! TOP]