AutoHotKey: how to disable Skype hotkey and make keyboard behave normally

Skype HotKeys are really annoying as they cannot be disabled from within Skype itself. The most annoying of them all was Ctrl+ R, which triggered a Skype call with any of your contacts, if selected. This has recently been replaced with Ctrl+ Alt+ R.

See http://community.skype.com/t5/Windows-desktop-client/Disable-CTRL-R-on-windows/td-p/2877763

Unfortunately, it happens to me that I get AltGr+ Ras the display key to the "è" character (with the help of the microsoft keybord creator). So in all my applications, I can write in French with an American keyboard using AltGr+ Rfor my "è" character all the time. Except for Skype, now.

Reading the link above, I created an AutoKey script to disable the Skype hotkey:

#IfWinActive, ahk_exe Skype.exe ; utilizes this script for Skype only
!^r:: ; replace [ctrl][alt][r] with nothing
#If     ; closes IfWinActive condition, needed if more code comes after this

      

But while this disables the Skype hotkey, it prevents my usual "è" from typing in a Skype discussion. So good, but not better as my typing is now running in Skype.

I've tried other options but to no avail:

#IfWinActive, ahk_exe Skype.exe ; utilizes this script for Skype only
!^r:: 
Send è  
return
#If     ; closes IfWinActive condition, needed if more code comes after this

      

or

#IfWinActive, ahk_exe Skype.exe ; utilizes this script for Skype only
!^r:: 
SendInput {Raw}è  
return
#If     ; closes IfWinActive condition, needed if more code comes after this

      

But as soon as! ^ r won't be strictly disabled, it started a Skype call.

Who has more experience with AutoHotKey and / or Skype to help me?

Thank.

+3


source to share


2 answers


Please note that this

#IfWinActive, ...
!^r::
#If

      

invalid hotkey deactivation: attach the keyword return

so it is !^r::return

. Otherwise, after pressing alt ctrl r, any code below will also be executed.

Also, if you want to remap the hotkey AltGr, you must use it <^>!r::

as a trigger, as suggested in the documentation . This way the natural behavior alt+ctrl+r

will be preserved, in which case the call is made.


I cannot fully reproduce your problem.

#IfWinActive, ahk_exe Skype.exe
<^>!r::
send a
return 
#ifWinActive

      

works great for me and doesn't call active contacts in skype. AltGr

is correctly overridden. But , if I change send a

to send è

, the script starts acting strangely. It only works the first time: after that I have to Altmanually click once to è

be sent again. This looks like a bug.



A workaround could be

#IfWinActive, ahk_exe Skype.exe
<^>!r::
send è
keywait, alt
send {alt}
return 
#ifWinActive

      

or

#IfWinActive, ahk_exe Skype.exe
<^>!r::
keywait, alt
send è
return 
#ifWinActive

      

... But it still doesn't allow sending multiple è

by holding AltGr

down. You will need to release AltGr

after each è

.

Edit . I found a 100% working solution:

#IfWinActive, ahk_exe Skype.exe
<^>!r::
SendUnicodeChar(0x00E8)
return 
#ifWinActive

; SOURCE for the following: http://www.autohotkey.com/board/topic/16404-inserting-unicode-special-characters/
SendUnicodeChar(charCode)
{
    VarSetCapacity(ki, 28 * 2, 0)
    EncodeInteger(&ki + 0, 1)
    EncodeInteger(&ki + 6, charCode)
    EncodeInteger(&ki + 8, 4)
    EncodeInteger(&ki +28, 1)
    EncodeInteger(&ki +34, charCode)
    EncodeInteger(&ki +36, 4|2)

    DllCall("SendInput", "UInt", 2, "UInt", &ki, "Int", 28)
}

EncodeInteger(ref, val)
{
    DllCall("ntdll\RtlFillMemoryUlong", "Uint", ref, "Uint", 4, "Uint", val)
}

      

this is the same as above, but instead of using send è

or send {ASC 0232}

it uses Unicode formatting.

+1


source


You can avoid the whole problem by assigning the "bad" hotkey combination to something else. What I've done:

  • Go to Tools-> Options-> Advanced-> Hotkeys
  • Enable "Enable keyboard shortcuts"
  • set "ctrl + alt + r" to "Take Snapshot During Video Calls"


This was driving me crazy, I found the combined answer on the skype forums.

+10


source







All Articles