飞鼠增强

​买了个飞鼠,就这个玩意

按键齐全,但是发现问题就是组合键很难按,我本身是个全键盘党,桌上不放鼠标的,这就很尴尬了,比如我是吧caps映射为esc,然后caps引导一些按键

以及分号之类的引导,测试发现在飞鼠上面都很不好使,最后决定单独给飞鼠写一套单键快捷键,当然用的是ahk.

演示一些实际效果

演示不了...gif太大懒得折腾了

具体的按键对应的功能在源码里面都用中文注释写的很清楚了

if !(A_IsAdmin || InStr(DllCall("GetCommandLine", "str"), ".exe"" /r"))
    Run % "*RunAs " (s:=A_IsCompiled ? "" : A_AhkPath " /r ") """" A_ScriptFullPath """" (s ? "" : " /r")
/* 
飞鼠模式的帮助,由于飞鼠键盘非常小,只适合单独按键制作本脚本
*/

GV_ToggleKeyMode := 0
;************** 飞鼠模式 ************** 
#If GV_ToggleKeyMode=1
    ;方向键
j::Send {Down}
k::Send {Up}
h::Send {Left}
l::Send {Right}
;鼠标
':: Send {Click Right}
`;:: Send {Click}

;w和s对应home和end,对应的是vimium扩展的按键思路
s::
    KeyWait, F1, T0.5
    if (winc_presses > 0) {
        winc_presses ++
        Return
    } winc_presses = 1
    SetTimer KeyWinC1, -400
Return
KeyWinC1:
    if (winc_presses = 1) {
        SendInput, {end}
    } else if (winc_presses = 2) {
        SendInput, ^{end}
    } winc_presses = 0
Return

w::
    KeyWait, F1, T0.5
    if (winc_presses > 0) {
        winc_presses ++
        Return
    } winc_presses = 1
    SetTimer KeyWinC2, -400
Return
KeyWinC2:
    if (winc_presses = 1) {
        SendInput, {home}
    } else if (winc_presses = 2) {
        SendInput, ^{home}
    } winc_presses = 0
Return

;上下翻页,来自mpv的按键思路,nm大跳
n::
    KeyWait, F1, T0.5
    if (winc_presses > 0) {
        winc_presses ++
        Return
    } winc_presses = 1
    SetTimer KeyWinC3, -400
Return
KeyWinC3:
    if (winc_presses = 1) {
        SendInput,{PgDn}
    } else if (winc_presses = 2) {
        SendInput,^{PgDn}
    } winc_presses = 0
Return

m::
    KeyWait, F1, T0.5
    if (winc_presses > 0) {
        winc_presses ++
        Return
    } winc_presses = 1
    SetTimer KeyWinC4, -400
Return
KeyWinC4:
    if (winc_presses = 1) {
        SendInput,{PgUp}
    } else if (winc_presses = 2) {
        SendInput,^{PgUp}
    } winc_presses = 0
Return

;复制粘贴对应的是vim的yank等
y::
    Clipboard:=""
    SendInput, ^c
    ClipWait, 1, 1
    ToolTip, 复制成功, , , 
    sleep 500
    tooltip
Return
p::SendInput, ^v

;左右切换标签以及关闭标签以及返回历史同样来自vimium的按键思路
q:: send,{Blind}^+{Tab}
e:: send,{Blind}^{Tab}
.:: SendInput,^w
x:: SendInput,^w
b:: SendInput, ^{left}

;使用数字键来切换软件
1::SendInput, #1
2::SendInput, #2
3::SendInput, #3
4::SendInput, #4
5::SendInput, #5
6::SendInput, #6
7::SendInput, #7
8::SendInput, #8
9::SendInput, #9

#If
^!f::
GV_ToggleKeyMode := !GV_ToggleKeyMode
if(GV_ToggleKeyMode == 1)
    tooltip 飞鼠模式启用
else
    tooltip 飞鼠模式关闭
sleep 2000
tooltip
return

给TA捐赠
共{{data.count}}人
人已捐赠
其他

糯米模拟走砍Ver12.13.已经免费更新16个版本. 随游戏数据更新.优化走砍更加丝滑

2022-7-18 7:01:24

其他

批量打印工具

2022-7-23 9:06:31

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
有新私信 私信列表
搜索