3
votes

Skype HotKeys are really annoying as they cannot be disabled from Skype itself. The most annoying of all was Ctrl+R, that started a Skype call with any of your contact if it was selected. This has been replaced recently by 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+R as a mapped key to the "è" character (using microsoft keybord creator). So in all my applications, I can write happily in French with a US keyboard, using AltGr+r for my "è" character all the time. Except in Skype, now.

Reading the link above, I created an AutoKey script, to disable Skype's 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, although this disables the Skype hotkey, it prevents the normal input of my "è" character in a Skype discussion. So good, but not best, as my typing get all mangled in Skype now.

I have 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 is not strictly disabled, then it launched a Skype call.

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

Thanks.

2

2 Answers

1
votes

Please note that this

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

is no valid deactivation of a hotkey: attach the return keyword, so it is !^r::return. Otherwise, after pressing alt ctrl r, any code further down below will also be executed.

Also, if you only want to remap the AltGr hotkey, you should use <^>!r:: as the trigger, as suggested in the documentation. This way, the natural alt+ctrl+r behavior will be preserved, in this case making a call.


I cannot fully reproduce your issue.

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

works perfectly fine for me and does not call my active contact in skype. AltGr is being overridden correctly. But if I change send a to send è, the script starts acting weirdly. It only works for the first time: after that, I have to press Alt manually once in order for è to be sent again. This looks like a bug to me.

A workaround might 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 this still does not make it possible to send multiple è's while holding altGr down. You'll have 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.

10
votes

You can avoid the whole problem if you assign the "unfortunate" hotkey combination to something else. What I did:

  • Go to Tools->Options->Advanced->Hotkeys
  • Turn on "Enable keyboard shortcuts"
  • assign ctrl + alt + r to "Take a snapshot during video calls"

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