autohotkeyhotkeys

Re-enable right-Ctrl when using Canadian Multilingual Standard keyboard for my AutoHotkey function?


I have an Autohotkey function that lets me switch between tabs with "Control + left/right" as well as closing tabs (Ctrl-down) and going into the search bar (Ctrl-up). It helps me save clicks and use the mouse less.

However, I use the Canadian Multilingual Standard keyboard to type accents (éèçà) in French for some of my classes and this keyboard DISABLES the right control key (the one right beside my keyboard buttons) which is the most convenient to use with my right hand only.

Here is a source documenting this: http://archives.miloush.net/michkap/archive/2013/04/08/10409187.html

Is there any way I can override this? I very rarely use the letter œ for because I can just use ALT + 0156 instead.

Here is the very simple code for my hotkey!

^Left::SendInput, ^{PGUP}
^Right::SendInput, ^{PGDN}
^Up::SendInput, !d
^Down::SendInput, ^w

Solution

  • Using SciTE4AutoHotkey tool, on my UK hardware keyboard right ctrl is detected as expected (RControl)

    enter image description here

    When I switch to French (Canada) Canadian Multilingual keyboard, the right ctrl key is not found, also Virtual Key is different: DF

    enter image description here

    (SC means scan code and VK means virtual key)

    so if you remap, it should solve the problem

    ~SC11D::RControl
    

    After remapping: not found is replaced by RControl with each keypress.

    enter image description here

    Even if above remapping does not work for your case, it is a matter of finding which key corresponds to relevant scan code and then you can remap it.

    Double click on your ahk script on the taskbar, and then
    View > Key history and script info (Ctrl + K) by pressing key and refresh(F5) you can see respective keyboard scan codes.