Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
lluke
Posts: 22
Joined: 12 Feb 2018, 19:10

Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

11 Mar 2018, 16:49

I have remaping code for Ctrl. Ctrl + key behaves as normal. If Ctrl is pressed alone it behaves as ESC.

#InstallKeybdHook

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Problem appears when I type polish characters like: "ą"(Alt Gr + a) etc. "ę","ń". Scripts behaves like Ctrl is presssed and not released. I have to press ESC(or Ctrl alone) to release this action.

How to fix this behaviour so I type polish characters and not beeing blocked?
Rohwedder
Posts: 1092
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

12 Mar 2018, 02:02

Hallo,
only a try:

Code: [Select all] [Download] GeSHi © Codebox Plus

~<^>!::Return
LControl::
g_DoNotAbortSendEsc := true
etc.
lluke
Posts: 22
Joined: 12 Feb 2018, 19:10

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

12 Mar 2018, 04:43

What is going on here actually?
Rohwedder wrote:~<^>!::Return


It looks like it solve a problem. Thank you. :)
Rohwedder
Posts: 1092
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs  Topic is solved

12 Mar 2018, 06:41

Hallo,
~ (Tilde) when the hotkey fires, its key's native function will not be blocked.
<^>! = AltGr see http://ahkde.github.io/docs/Hotkeys.htm#AltGr
:: = Hotkey
Return = do not do anything else!
lluke
Posts: 22
Joined: 12 Feb 2018, 19:10

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

10 Apr 2018, 07:32

This solution works for pervious example but I have tried this solution:

for script below and unfortunatelly it dosn't work in this case and accent characters blocks. What might be wrong?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Rohwedder
Posts: 1092
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

13 Apr 2018, 03:59

Hallo,
my "solution" unblocks Alt Gr and this is unnecessary here because Alt Gr seems not to be blocked
(my german "Alt Gr"-characters: @€µ|~²³{[]}\ can be entered).
Which accent characters are blocked, and how exactly are they entered?
I do not know what your script should do, but I would replace this:

Code: [Select all] [Download] GeSHi © Codebox Plus

$Ctrl::Send {Ctrl Down}
$Ctrl UP::
ChordIsBroken := True
Send {Ctrl Up}
Return
with that:

Code: [Select all] [Download] GeSHi © Codebox Plus

~Ctrl Up::ChordIsBroken := True
lluke
Posts: 22
Joined: 12 Feb 2018, 19:10

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

13 Apr 2018, 11:20

Thank you for your reply :)
My goal with this script is to have many fast shortcuts to run apps. I copied it from here:
https://superuser.com/questions/724653/how-do-i-create-a-hotkey-for-a-sequence-of-inputs-while-holding-ctrl-e-g-ctrl/725303#725303
I want to have shortcuts while holding CTRL all the time:

Code: [Select all] [Download] GeSHi © Codebox Plus

CTRL + g g  = run gvim
CTRL + g t = run todo
CTRL + g e = reload explorer
etc...


This script:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


is simplified version of my script (with a lot of such a shortcuts). Script works fine, but for some reason, while my normal typing, CTRL is blocked. It behaves like it is still pressed. Then when I press for ex: 'a' it behaves like CTRL + a (select all). So it is quite anoying :problem: This behaviour is for ALL letters that are typed with ALTGr, not only polish letters, even if I press ex: AltGr + P it not produce letter but CTRL is blocked.
Ex: I press
ALTGr + o it typed ó and next charater let say is 'a' so it behaves like Ctrl + a. To release this behaviour (holded Ctrl) you need to press ESC key.

Your last solution:

Code: [Select all] [Download] GeSHi © Codebox Plus

~Ctrl Up::ChordIsBroken := True

blocks even more so I cannot easly get rid of this behaviour by pressing ESC
Rohwedder
Posts: 1092
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

19 Apr 2018, 05:09

Hallo,
try:
If the Ctrl key is pressed alone, Esc will be sent after releasing
(In my opinion, you should better do without THIS!)
Typing polish characters like: "ą"(Alt Gr + a) etc. should be possible.
^g -shortcuts while holding CTRL all the time:
CTRL + g g = run gvim
CTRL + g t = run todo
CTRL + g e = reload explorer etc...also.
^g alone has its native function.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

lluke
Posts: 22
Joined: 12 Feb 2018, 19:10

Re: Remaping Ctrl as Esc+Ctrl with polish,accent characters hangs

24 Apr 2018, 07:58

Rohwedder wrote:Hallo,
try:
If the Ctrl key is pressed alone, ESC will be sent after releasing
...

Your script works fine for Polish charaters, but there is conflict with first script
https://autohotkey.com/boards/viewtopic.php?p=205499#p205499
at this topic. Ctrl up+[key] combination send ESC instead do the desired operation (like ex: selection). It just send ESC while released with other key. For example: I press Ctrl + A and while I hold Ctrl key, text is selected. When I release Ctrl it just sends ESC and selection is vanished.
How to fix this?

Thank You for your help

Return to “Ask For Help”

Who is online

Users browsing this forum: 204squares, ahkfan, faab68 and 38 guests