Jump to content


Photo

map f:: but keep all original hotkeys with +^!f


  • Please log in to reply
4 replies to this topic

#1 vangop

vangop
  • Members
  • 3 posts

Posted 06 April 2012 - 08:27 AM

Hi,
I want to map f::<smth> in an application.
But want to retain the original application hotkeys like ^f. (if I press ^f it invokes the <smth>). Is there an option to map just the key, but not substitute it to <smth> when it is used with modifiers?
Thanks!

#2 Nota Bene

Nota Bene
  • Guests

Posted 06 April 2012 - 03:44 PM

f::Send smth

!+f::MsgBox

; Press ctrl+f in an application; it works.


#3 vangop

vangop
  • Members
  • 3 posts

Posted 07 April 2012 - 06:00 AM

Nope, unfortunately this won't work. The alt_shift_f does the box, but the ctrl_f still acts as plain f

#4 tomoe_uehara

tomoe_uehara
  • Members
  • 2077 posts

Posted 07 April 2012 - 08:43 PM

Try to use the ~ modifier, or use the #IfWinActive

#5 vangop

vangop
  • Members
  • 3 posts

Posted 08 April 2012 - 06:59 AM

Thanks for the ~ tip.
I made this work, but I just had to remap the ^f, which doesn't seem like a clean solution..
#IfWinActive ahk_class SUMATRA_PDF_FRAME
n::j
e::k
~f::^+l
^f::^f
#IfWinActive
If I remove the ^f mapping, ctrl_f first invokes the f: mapping (fullscreen), but then works as ctrl_f (find).