🐣

CTRL配列 - Ver.1.1 - @hiyoctrl

2023/01/16に公開

こんにちは、Ctrl(@hiyoctrl)です。

作成したキーボードレイアウトの名前を決めていませんでしたが、暫定的に「CTRL配列」と呼ぶことにします。

その他、ほんの少し変更した箇所があったのでまとめました。

各種設定ファイルについては、変更していないものもありますが、自分用のメモとして掲載しています。

変更前

https://qiita.com/hiyoctrl/items/0632f89a0e0dc8d5007c

変更後

  • 左手のMode_switchによるアローキーを削除
  • 左手の物理キーの削減
  • 右手のトラックボールから届く範囲の物理キーを追加
  • 右手にアローキーの↓↑を配置
  • Mode_switchで入力する記号を再配置
  • ワンキーショートカットの再配置
  • レイアウト図のキーの右下にキーコードを追加

変更理由

  • keyboard-layout-editorは物理キーの方が移動が楽
  • 左手のアローキーはあまり使っていない気がした
  • Googleドキュメントのショートカットを押しやすくしたかった
  • 左手の左下は届きにくいのですっきりさせたかった
  • キーボードレイアウトにキーコードを入れた方がわかりやすい
  • キーボードレイアウトの名前を暫定的でも決めたかった

関連記事

https://qiita.com/hiyoctrl/items/70885ee39938b72dd657

https://zenn.dev/ctrl/articles/ed5531bc1a0248

https://zenn.dev/ctrl/articles/a18933359cae90

https://zenn.dev/ctrl/articles/0ab925b9ae1612

各種設定ファイル

xmodmap

clear control
clear shift
clear lock
clear mod1
clear mod2
clear mod3
clear mod4
clear mod5

! Left Hand

keycode  67 = period less bracketleft
keycode  68 = comma greater bracketright
keycode  69 = slash question colon
keycode  70 = NoSymbol

keycode  10 = equal plus exclam
keycode  11 = o O parenleft
keycode  12 = e E parenright
keycode  13 = y Y numbersign
keycode  14 = BackSpace
keycode  15 = Delete

keycode  23 = F2
keycode  24 = a A apostrophe
keycode  25 = F13 NoSymbol F15
keycode  26 = F14 NoSymbol F16
keycode  27 = i I quotedbl
keycode  28 = Return NoSymbol ampersand

keycode  38 = F3
keycode  41 = F4

keycode  42 = space NoSymbol percent

keycode  54 = F5
keycode  55 = u U
keycode  56 = w W semicolon

! Right Hand

keycode 114 = F11
keycode 116 = F7
keycode 113 = F8

keycode 105 = NoSymbol
keycode 135 = NoSymbol
keycode 108 = Alt_R

keycode 111 = F9
keycode  62 = NoSymbol
keycode  61 = v V
keycode  60 = c C
keycode  59 = l L
keycode  58 = j J

keycode  36 = NoSymbol
keycode  48 = p P plus
keycode  47 = t T at
keycode  46 = r R Down
keycode  45 = s S Up
keycode  44 = z Z

keycode 117 = 1 exclam exclam
keycode 115 = 2 at at
keycode 119 = 3 numbersign numbersign
keycode  51 = Escape
keycode  35 = f F
keycode  34 = n N Left
keycode  33 = d D
keycode  32 = g G grave
keycode  31 = q Q
keycode  30 = k K Right

keycode 112 = 4 dollar dollar
keycode 110 = 5 percent percent
keycode 118 = 6 asciicircum asciicircum
keycode  22 = Tab
keycode  21 = b B bar
keycode  20 = minus underscore asciitilde
keycode  19 = Left
keycode  18 = Down
keycode  17 = Up
keycode  16 = Right

keycode 127 = 7 ampersand ampersand
keycode  78 = 8 asterisk asterisk
keycode 107 = 9 parenleft braceleft
keycode  96 = 0 parenright braceright
keycode  95 = h H
keycode  76 = m M
keycode  75 = x X backslash
keycode  74 = NoSymbol
keycode  73 = NoSymbol
keycode  72 = NoSymbol

! Super_L to Mode_switch
keycode 133 = Mode_switch

! Shift_L
keycode  50 = Shift_L

! Alt_L
keycode  64 = Alt_L

! Control_L
keycode  37 = Control_L

! None Key

keycode 247 = Alt_R
keycode 248 = Control_L
keycode 248 = Shift_L
keycode 249 = Right
keycode 250 = Up
keycode 251 = Down
keycode 252 = Left
keycode 253 = Alt_L
keycode 254 = Home
keycode 255 = End
 
add control = Control_L
add shift   = Shift_L
add mod1    = Alt_L
add mod2    = Mode_switch
add mod4    = Alt_R

xbindkey

##### control ######

"xte 'key F20'"
release + control + plus

"xte 'key F20'"
release + control + minus

"xte 'key F20'"
release + control + g

"xte 'key F20'"
release + control + e

"xte 'key F20'"
release + control + d

"xte 'key F20'"
release + control + p

"xte 'key F20'"
release + control + t

"xte 'key F20'"
release + control + j

"xte 'key F20'"
release + control + q

##### chromium ######

"xdotool key ctrl+alt+0"
release + control + n

"xdotool key ctrl+alt+1"
release + control + 1
  
"xdotool key ctrl+alt+2"
release + control + 2

"xdotool key ctrl+alt+3"
release + control + 3

"xdotool key ctrl+alt+4"
release + control + 4

"xdotool key ctrl+shift+s"
release + c:72

"xdotool key ctrl+shift+s"
release + c:70

"xdotool key ctrl+shift+c"
release + c:74

"xdotool key ctrl+shift+Delete"
release + control + c:15

"xdotool key ctrl+h"
release + c:73

"xdotool key ctrl+b"
release + control + i

"xdotool key ctrl+alt+0"
release + control + o

##### Alt_L #####

"ibus-setup"
release + Alt + Alt_L + i

"xfwm4-settings"
release + Alt + Alt_L + w

"qpaeq"
release + Alt + Alt_L + q

"thunar"
release + Alt + Alt_L + t

"chromium-browser --incognito --new-window https://time.is/"
release + Alt + Alt_L + n

##### Alt_R #####

"./.nxx.sh"
release + Mod4 + Alt_R + n

"xdotool click --repeat 3 1"
release + Mod4 + Alt_R + space

"xdotool click 2"
release + Mod4 + Alt_R + u

"xdotool click 1"
release + Mod4 + Alt_R + w

##### c: #####

"xfdesktop --menu"
release + c:66

"xfce4-terminal --drop-down"
release + c:62

"./.nxx.sh"
release + c:36

"./.nmm.sh"
release + c:105

"./.nbb.sh"
release + c:135

##### b: #####

"xdotool keaay ctrl+y"
release + b:6

"xdotool key ctrl+z"
release + b:7

"xdotool key ctrl+shift+v"
release + b:8

"xdotool key ctrl+v"
release + b:9

"xdotool key ctrl+c"
release + b:10

"xdotool key ctrl+x"
release + b:11

"xdotool key ctrl+a"
release + b:12

vimium

### Custom keymappings ###

unmapAll

# Left Hand

map . scrollToBottom
map , scrollToTop
map / showHelp

map [ moveTabLeft
map ] moveTabRight

map = createTab
map + createTab https://time.is/
map o LinkHints.activateMode
map e LinkHints.activateModeToOpenInNewForegroundTab

map a previousTab
map i nextTab

map u scrollPageDown
map w scrollPageUp
map W createTab https://www.windy.com/

# Right Hand

map v createTab https://www.chatwork.com/
map c createTab https://crowdworks.jp/messages/starred
map l createTab https://www.lancers.jp/mypage/
map j createTab https://shonenjumpplus.com

map p createTab https://search.yahoo.co.jp/realtime
map t createTab https://tenki.jp/
map r removeTab
map s createTab
map z createTab https://zutool.jp

map f createTab https://feedly.com/
map n goNext
map g createTab https://drive.google.com
map d createTab https://docs.google.com
map q createTab https://mail.google.com
map k goBack

map b createTab https://b.hatena.ne.jp/entrylist/all
map - createTab https://o-dan.net/ja/

map 9 createTab http://koyomi.vis.ne.jp/moonage.htm
map 0 closeTabsOnRight
map h scrollPageUp
map m scrollPageDown
map x reload

xkeysnail


import re
from xkeysnail.transform import *

define_multipurpose_modmap({

    ###### Left ######
    # A
    Key.Q: [Key.Q, Key.LEFT_ALT],
    # O
    Key.KEY_2: [Key.KEY_2, Key.LEFT_CTRL],
    # E
    Key.KEY_3: [Key.KEY_3, Key.LEFT_CTRL],
    # I
    Key.R: [Key.R, Key.RIGHT_ALT],
    # U
    Key.V: [Key.V, Key.LEFT_META],

    ###### Right ######
    # Escape
    Key.BACKSLASH: [Key.BACKSLASH, Key.LEFT_CTRL],
    # Tab
    Key.BACKSPACE: [Key.BACKSPACE, Key.LEFT_SHIFT],
    # MINUS
    Key.MINUS: [Key.MINUS, Key.LEFT_META],

})


Discussion