添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Capslock数字键工具 – 用 AHK 神改键盘布局:用左手使用数字小键盘

AutoHotKey 2021/11/01

这两天我借助网上AHK代码,实现了一组左手键功能,如下:

一、按下 CapsLock+1 快捷键开启 数字输入 功能。
按下 zxcv sdf wer 键可输入 0123 456 789 数字
按下 3 4 t g b 键可输入 / * – + . 符号
按下 q a 键可实现 退格、回车 功能
按住 Alt 键不放,再按 e d s f 键可代替 上下左右 方向键
按住 Alt 键不放,再按 w r 键可代替 Home、End 键

二、按下 CapsLock+2 快捷键开启 转换MarkDown语法 功能。
按下 1-6 键可将当前文本行转换为 1-6 级 标题行
按下 “ 键可将当前标题行转换为普通文本
按下 b g t 键可将选文转换为 加粗、高亮、删除线 语法效果
按下 w e r 键可将选文转换为 无序、有序、待办列表
按下 s d f 键可执行搜索、删除、选文转换为内链 操作
按下 z x c v 键可执行 撤消、剪切、复制、粘贴 操作

三、按下 CapsLock+3 快捷键关闭 数字输入和转换MD语法 功能。

ahk 源码,所有的功能键是按空格键做为基键,功能键实现了Q=esc w={% e={{ r=# t =% y=- u=+ l=上o=下划线 p = 选择本行 {=下一个层 }=上一个词 a=删除左字 s= * d=/ f = 删除右字 G=删除整行 h==
j=左K=下L=右: =切换键盘 ;=上页 z=}x={c=[v=]b=$n=home m=end
;::usr::+3+1usr/bin/env python{Enter}+3coding:utf-8
; *** space
space::Send {space}

^space::Send ^{space}
#space::Send #{space}
^#space::Send ^#{space}
!space::Send !{space}
^!space::Send ^!{space}

;daxiejian fuzhi zhantie
; ctrl+x
;CapsLock & h::send ^x
; ctrl+c
;CapsLock & j::send ^c
; ctrl+v
;CapsLock & n::send ^v

; *** space + Num
space & 1::Send {space}
space & 2::Send {space}{space}
space & 3::Send {space}{space}{space}
space & 4::Send {space}{space}{space}{space}
space & 5::Send {space}{space}{space}{space}{space}
space & 6::Send {space}{space}{space}{space}{space}{space}
space & 7::Send {space}{space}{space}{space}{space}{space}{space}
space & 8::Send {space}{space}{space}{space}{space}{space}{space}{space}
;space & 9::Send {space}{space}{space}{space}{space}{space}{space}{space}{space}

;*** space + [] (windows virual desktop switcher)
space & [::Send ^#{left}
space & ]::Send ^#{right}

;add personal key

;#if ( GetKeyState(“Caps”, “P”))
; i:: Send +{up}
; j:: Send +{left}
; k:: Send +{down}
; l:: Send +{right}
; ;ctrl+x ctrl+v ctrl+c
; c:: send ^c
; v:: send ^v
; x:: send ^x
;Return

; *** space + XX +shift ^ctrl gshit&ctrl
#if ( GetKeyState(“space”, “P”))
;d & i:: Send +{up}
;d & j:: Send +{left}
;d & k:: Send +{down}
;d & l:: Send +{right}
;d & i:: Send ^{up}
;d & j:: Send ^{left}
;d & k:: Send ^{down}
;d & l:: Send ^{right}
;f & i:: Send ^+{up}
; ctrl+space chang language
;f & j:: send ^{space}
;f & j:: Send ^+{left}
;f & k:: Send ^+{down}
;f & l:: Send ^+{right}

;+ shift xuanzhe
+i:: Send +{up}
+j:: Send +{left}
+k:: Send +{down}
+l:: Send +{right}
;ctrl+x ctrl+v ctrl+c
+d:: send ^c
+w:: send ^v
+a:: send ^x
; up move down move
+n:: Send {Home}+{end}{ctrl down}c{ctrl up}{del}{up}{ctrl down}v{ctrl up}
+m:: Send {Home}+{end}{ctrl down}c{ctrl up}{del}{Down}{ctrl down}v{ctrl up}

;^ctrl yidongdaima
;Caps & i:: Send {Home}+{end}{ctrl down}c{ctrl up}{del}{up}{ctrl down}v{ctrl up}{up}
;Caps & k:: Send {Home}+{end}{ctrl down}c{ctrl up}{del}{Down}{ctrl down}v{ctrl up}{up}
;^k:: Send {end}+{home}{del}
;^l:: Send {end}+{home}{del}

;’:: Send {Wheelup 2}/:: Send {WheelDown 2}
i:: Send {up}
k:: Send {down}
j:: Send {left}
l:: Send {right}
n:: Send {home}
m:: Send {end}
‘:: Send {pgup}
/:: Send {pgdn}
,:: Send {up}{end}
.:: Send {down}{end}
; ctrl+space chang language
`;:: send ^{space}
;+shift

;q:: SendInput {#}{!}{/}{u}{s}{r}{/}{b}{i}{n}{/}{e}{n}{v} {p}{y}{t}{h}{o}{n}{Enter}{#} {c}{o}{d}{i}{n}{g}{:}{u}{t}{f}{-}{8}

;qwertyu
q:: SendInput {Escape}
w:: Send +[+5
e:: SendInput {{}{{}
r:: Send +3
p:: Send {home}+{end}
b:: Send +4
o:: SendInput {_}
t:: Send +5
;9( 0 )
9:: Send +9
0:: Send +0
h:: SendInput {=}

;a del left s del right d del line Backspace
a::Send {Backspace}
f::Send {del}
g::Send {end}+{home}{del}

;+-*/
u:: SendInput {+}
y:: SendInput {-}
s:: SendInput {*}
d:: SendInput {/}

;{ } [ ]
z:: SendInput {}}
x:: SendInput {{}
c:: SendInput {[}
v:: SendInput {]}

;tihuan
;y:: Send, Sincerely,{enter}John Smith
Return