30 lines
2.5 KiB
Plaintext
30 lines
2.5 KiB
Plaintext
##⇘⇘以下为基于 inputevent.lua 脚本实现的增强式功能键位绑定
|
||
## '#event:click'用于指定同键位单击时的操作,'#event:double_click'用于指定同键位双击时的操作,'#event:press'用于指定同键位长按时的操作,'#event:release'用于指定同键位长按释放时的操作
|
||
## 更多的键位动作请参考脚本上游说明:https://github.com/zhongfly/InputEvent/tree/property-expansion
|
||
##! 注意:并非所有键位都具有以上不同的触发动作
|
||
## 同时脚本支持同一种动作根据条件触发不同的命令,条件的语法等同于 profile-cond(自动 profile 的条件语句)
|
||
## 即脚本语法升级为 '#event:动作|条件'(原先的#event:动作视为无条件执行命令),命令执行的优先级是从下到上按顺序,执行第一个满足条件的命令
|
||
|
||
RIGHT seek 5 #event:click
|
||
RIGHT script-message-to evafast speedup #event:press
|
||
RIGHT script-message-to evafast slowdown #event:release
|
||
|
||
TAB script-message-to file_browser browse-files;script-message-to file_browser dynamic/reload;show-text '' #event:click
|
||
TAB script-message-to uosc toggle-ui #event:press
|
||
TAB script-message-to uosc toggle-ui #event:release
|
||
|
||
PGDWN add chapter -1 #event:click
|
||
PGDWN playlist-prev;show-text 播放列表:${playlist-pos-1}/${playlist-count} #event:click|chapter == 0
|
||
PGDWN playlist-prev;show-text 播放列表:${playlist-pos-1}/${playlist-count} #event:press
|
||
PGUP add chapter 1 #event:click
|
||
PGUP playlist-next;show-text 播放列表:${playlist-pos-1}/${playlist-count} #event:click|chapter+1 == chapters
|
||
PGUP playlist-next;show-text 播放列表:${playlist-pos-1}/${playlist-count} #event:press
|
||
|
||
SPACE cycle pause;script-message-to uosc flash-pause-indicator #event:click
|
||
SPACE script-binding simplehistory/history-load-last #event:click|idle_active
|
||
SPACE no-osd set speed 3; set pause no #event:press
|
||
SPACE ignore #event:release
|
||
|
||
MBTN_LEFT cycle pause;script-message-to uosc flash-pause-indicator #event:click
|
||
MBTN_LEFT cycle fullscreen #event:double_click
|