hotkey in nordic qwerty layout sending key combination in us nordic qwerty layout?

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 24 Dec 2019, 17:38

hotkey in nordic qwerty layout sending key combination in us nordic qwerty layout?

26 Dec 2019, 05:05


Here comes another newbie that wants some attention. I'm using the general productivity software Notion. This program is quite powerful for what it's made for but some of the shortcuts use various key combinations that are not easily accessible using the nordic qwerty layout (or rather, does not work at all). For example the combination "ctrl + \" (which toggles the menu in Notion) on an us layout is equivalent with ctrl + rightalt/altgr + "+" on the nordic layout (since \ is a second layer character, and is accessed pressing rigtalt /altgr + "+"). Firstly, having to press one extra button is a pain in the ass, and this pain only increases when the program doesn't even notice the nordic combination of keys.

I figured I could bypass this problem with this simple script:

#ifWinActive ahk_class Chrome_WidgetWin_1
; the characters [,],\ are all on a second layer on the nordic layout
<^8::Send ^[
<^9::Send ^]
<^+::Send ^\

This does not seem to work though, and I can imagine that the reason why is an easy one, but I don't really know where to start. My guess not knowing how ahk handels characters such as [ is that when i want ahk to send said [ it mimics what combination on my keyboard that would have made one. This perhaps effectively makes my wanted ctrl + [ combination into ctrl + altgr + "+" whatever I do.

I want to write a script that notices when Notion is active, and directly sends the shortcut combination when i press my own defined key combination.

Any help please?

Return to “Ask For Help”

Who is online

Users browsing this forum: AHKStudent, autohotkeycool, Google [Bot], Loop, Weshuggah and 50 guests