キーバインド
◆ 目次
◆ 基本原則
◆ Karabiner-Element
◆ Vim
◆ VSCode
◆ 基本原則
ホームポジションが神
手の疲労は左右均等に
直感的に使用できればなおよし
◆ Karabiner-Element
▼ ドキュメント
▼ Simple Modification
left controlをよく使うので左手疲弊緩和のため
code:memo
- right commond to enter
- semicolon to left control
- left control to semicolon
▼ Complex Modification
内容
Simple Modificationの変更に伴い使いにくくなった部分を調整
Ctrl+semicolon → escape
Ctrl+q → up arrow
json記述
本当は~/.config/karabiner/assets/complex_modifications下にJSONファイル配置してAdd Rulesから選択したかったんだけど、なぜか読み込んでくれないので仕方なく~/.config/karabiner/karabiner.jsonに記述
code:karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"title": "My Keybind Rules",
"rules": [
{
"description": "Change control+semicolon to escape",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "semicolon",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "Change control+q to up arrow",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"mandatory": [
"control"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
]
}
]
}
]
},
//// 以下省略
}
◆ Vim
code:.vimrc
" 入力モードでのカーソル移動
inoremap <C-q> <Up>
inoremap <C-n> <Down>
inoremap <C-b> <Left>
inoremap <C-f> <Right>
" キー入れ替え
inoremap <silent> jj <ESC>
noremap ;w ^
noremap ;p &
◆ VSCode
自作のもの
code:keybinds.json
[
{
"command": "workbench.action.terminal.toggleTerminal"
},
{
"command": "-workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+cmd+f",
"command": "workbench.action.focusFirstEditorGroup",
"when": "terminalFocus"
},
{
"key": "ctrl+cmd+f",
"command": "workbench.action.terminal.focus",
"when": "editorTextFocus"
}
]