Skip to content

Commit a821fa1

Browse files
Add files via upload
1 parent d181e95 commit a821fa1

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

plus.ahk

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ Hotkey, IfWinActive
9494

9595
;ListHotkeys
9696

97-
; Throw in an extra return just for good measure
97+
; Add an extra return for good measure here but may not be best position ?
9898
return
9999

100100
; ModWinS = Pass through Window & s key and Hook to test / pass web: clipboard
101-
~#s:: ; note lowercase only
101+
~#s:: ; note lowercase only, can work outside canvas to include find box
102102
if ModWinS = true ; note if false or clip empty then return
103103
{
104104
gosub GetClip
@@ -116,31 +116,30 @@ if ModWinS = true ; note if false or clip empty then return
116116
return
117117

118118

119-
~LButton:: ; ModSlct = Modify Single Click a word and alter to allow multiword selection
120-
IfWinActive, ahk_class SUMATRA_PDF_FRAME
119+
~LButton::
120+
; ModSlct = Modify Single Click a word and alter to allow multi-word selection or
121+
; ModLeft = Modify Left Click = hold right key down (Needs a right click to release)
122+
MouseGetPos,,,, MouseWin
123+
;confine actions to Canvas
124+
If MouseWin != SUMATRA_PDF_CANVAS1
125+
return ; Outside SumatraPDF Canvas
121126
{
122127
if ModSlct = true ; note initially false by default, change to = true in plus.ini
123128
{
124-
; msgbox ModSlct1 %ModSlct% ; for debugging only
129+
; msgbox ModSlctTrue %MouseWin% %ModSlct%; for debugging only
125130
Click down
126131
}
127-
;else
128-
; msgbox ModSlct2 %ModSlct% ; for debugging only
129132
if ModLeft = true ; note initially false by default, change to = true in plus.ini
130133
{
131-
; msgbox ModLeft1 %ModLeft% ; for debugging only
134+
; msgbox ModLeftTrue %MouseWin% %ModLeft% ; for debugging only
132135
Click {esc}
133-
Click down Right ; hold right key down (needs another right click to release)
134-
}
135-
else
136-
{
137-
; msgbox ModLeft2 %ModLeft% ; for debugging only
138-
return
136+
Click down Right
139137
}
140138
}
141-
return ; outside SumatraPDF
142-
msgbox Left Button Error, I should never be here
139+
; msgbox Still in canvas
143140
return
141+
msgbox Left Button Error, I should never be here
142+
144143

145144
; lets hook Alt + i to get current filename details (reserved for future use)
146145
!i::

0 commit comments

Comments
 (0)