Skip to content

Instantly share code, notes, and snippets.

@kimoto
Created September 12, 2010 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimoto/576008 to your computer and use it in GitHub Desktop.
Save kimoto/576008 to your computer and use it in GitHub Desktop.
Subject: 複数キー同時押しバインドの作り方
Date: 2010/09/12
Author: KIMOTO
書くのめんどくさいので以下plab.skypeに書いたやつのコピペです
SHIFTキー+数字キー、の時の例で説明します
まず、普通のuserconfig.cfgを作ります
次に、SHIFTキー押している時だけ読み込まれるcfgを作ります
ここでは、shift_key.cfgとします
userconfig.cfgには以下を記述します
alias "+go_shift_mode" "exec shift_key"
alias "-go_shift_mode" "exec userconfig"
bind "SHIFT" "+go_shift_mode"
bind "1" "slot1"
bind "2" "slot2"
次に、shift_key.cfg
bind "1" "echo 1"
bind "2" "echo 2"
こんな感じです
解説すると
shiftキー押したときに、+go_shift_modeが実行され、shift_key.cfgが読み込まれます。
そしてbind "1"が上書きされますので、SHIFT+1のときは、shift_key.cfgのbind "1"が実行されます
shiftキーを離すと、-go_shift_modeが実行され、userconfig.cfgが実行されますので
普段のbind "1"は、userconfig.cfgのものになります。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment