Skip to content

Commit

Permalink
update SelectCurrentWord
Browse files Browse the repository at this point in the history
  • Loading branch information
no5ix committed Nov 15, 2021
1 parent b1c4b22 commit dca51a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions app_data/conf_bak/conf.no5ix.json
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@
"capslock_shift_c": "SaveSelectedFilePathToClipboard",
"ctrl_8": "SimulateClickDown",
"ctrl_shift_alt_m": "MaxMinWindow",
"capslock_w": ["ctrl_left", "ctrl_shift_right", "ctrl_c"],
"capslock_shift_w": ["home", "shift_end", "ctrl_c"],
"capslock_w": "SelectCurrentWord",
"capslock_shift_w": ["home", "shift_end"],
"capslock_`": "SwitchCapsState",
"capslock_tab": ["home", "tab"],
"capslock_v": "shift_ins",
Expand Down Expand Up @@ -245,4 +245,5 @@
},
"custom": {}
}
} }
}
16 changes: 8 additions & 8 deletions source/action.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -369,21 +369,21 @@ ScreenShotAndSuspend() {

SwapWinCtrlShiftAlt() {
TrayMenu.SetSwapWinCtrlShiftAlt()
TrayMenu.update_tray_menu()
}

SelectCurrentWord() {
send, ^{Right}
Sleep, 66
send, ^+{Left}
send, +{Left}
Sleep, 66
st := GetCurSelectedText()
first_char := SubStr(st, 0, 1)
first_char := SubStr(st, 1, 1)
if (!RegExMatch(first_char, "[a-zA-Z]") && !RegExMatch(first_char, "[\u4e00-\u9fa5]")) {
send, {Left}
sleep, 66
send, ^+{Right}
send, {Right}
}
else {
send, ^{Left}
}
sleep, 66
send, ^+{Right}
}


Expand Down

0 comments on commit dca51a4

Please sign in to comment.