Prevent the "Alt Gr" key from producing special characters

1

1

I'm using windows 10 and I want to use the alt gr key for setting shortcuts in an application.

The application is successfully interpreting the shortcut, but it doesn't stop the key from inserting the special character; for example, alt gr+o produces รณ. Is there any way I can stop this?

CL22

Posted 2015-10-25T15:11:23.023

Reputation: 401

Answers

2

Autohotkey could help in your case check their Overriding or Disabling Hotkeys section. With Autohotkey you can even disable hotkeys only if a certain window is active.

You can use autohotkey to remap the short cut. This script remaps alt gr+o to ctrl+t when Chrome is active.

$<^>!o::
IfWinActive ahk_class Chrome_WidgetWin_1
   Send ^{t}
return 

The drawback of this solution is, that your app will not receive the original hotkey either. You can use a different hotkey combination for your app to listen to, but the user still only needs to press alt gr+o.

Another possible solution could be to create a custom keyboard layout with the Microsoft Keyboard Layout Creator that does not include the AltGr combinations that you want to override. That way, you don't have to change the application.

TechImpossible

Posted 2015-10-25T15:11:23.023

Reputation: 176