Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotkeys cease functioning when Caps Lock is on #85

Open
Tomurisk opened this issue Jun 28, 2024 · 6 comments
Open

Hotkeys cease functioning when Caps Lock is on #85

Tomurisk opened this issue Jun 28, 2024 · 6 comments

Comments

@Tomurisk
Copy link

Tomurisk commented Jun 28, 2024

Previous title: Hotkeys assigned to number row cease functioning when Caps Lock is on
Distro: Xubuntu 24.04 running X on VMWare Workstation 17 Pro hypervisor
Expected behavior (also noted in the docs)

Remapping a key or button is "complete" in the following respects:
<...>
CapsLock generally affects remapped keys in the same way as normal keys.

4::MsgBox, test – works when Caps Lock is off, message box with "test" is displayed instead of "4" being sent as keyboard input. However, when Caps Lock is on, on the contrary, "4" is being sent as keyboard input.

I've taken means of troubleshooting this issue by prefixing the 4 here with modifiers, like *, $, ~, however that didn't solve anything.

I'm left with an assumption that such behavior is a bug on behalf of AHK_X11.

PS. Please implement UTF-8/Unicode support whenever it's possible. It severely hinders my use cases for which I'd be using this program for, as I happen to be a non-English speaker, that deals with modified Latin alphabet outside ASCII on a daily basis. Nevertheless, it seems that I'm able to input the characters with Run, xdotool key [code], which appears to be a working solution in the meanwhile, albeit the increased typing latency from such "hack" is present. Otherwise kudos for taking a step forwards in replicating AutoHotkey for Linux.

Edit:
Okay, it is a bug – ALL of the hotkeys break once keyboard is in Caps Lock state. Not just those within the scope of number row.

Also, it appears that there is no differentiation of lower-case and upper-case letters, as in this script:

Endkeys = {LControl}{RControl}{LAlt}{RAlt}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{Backspace}{Capslock}{Numlock}{PrintScreen}{Pause}

$4::
	Input, key, L1, %Endkeys%
	StringReplace, InviKey, ErrorLevel, EndKey:
	IfInString, Endkeys, {%InviKey%}
	{
		Send {%InviKey%}
	}
	else
	{
		if key = i
			Run, xdotool key U021B
		else if key = I
			Run, xdotool key U021A
		else
			Send %key%
	}

if key = i condition takes place despite the case, line Run, xdotool key U021B gets executed. If Caps are on, NOTHING gets executed at all, and "I" is sent as input as usual.

@Tomurisk Tomurisk changed the title Hotkeys assigned to number row cease functioning when Caps Lock is on Hotkeys cease functioning when Caps Lock is on Jun 29, 2024
@phil294 phil294 closed this as completed in 2d8898f Jul 1, 2024
@phil294 phil294 reopened this Jul 1, 2024
@phil294
Copy link
Owner

phil294 commented Jul 1, 2024

Hi! I couldn't quite believe it, but you're right. Apparently this never bothered anybody, including me. I think I have fixed the CapsLock issue, but only in the non-released version (release probably in a week or so). So if you want to use it right away, you need to compile from source.

Regarding the unicode problem - no idea, and looks rather complicated, for now you'll have to keep using your workaround, sorry. (there's also #34 which is probably the same thing)

@phil294
Copy link
Owner

phil294 commented Jul 1, 2024

ahh, but when using Send, the caps lock state gets removed...

@phil294
Copy link
Owner

phil294 commented Jul 1, 2024

and yes, currently all keys are downcased when processed. Fixing this is rather non-trivial, yet WIP.

@phil294
Copy link
Owner

phil294 commented Aug 3, 2024

The capslock issue fix has now also been released

@phil294 phil294 closed this as completed Aug 3, 2024
@phil294 phil294 reopened this Aug 3, 2024
@Tomurisk
Copy link
Author

Tomurisk commented Aug 5, 2024

The capslock issue fix has now also been released

Just tested out, unfortunately the bug is still present 😔

@phil294
Copy link
Owner

phil294 commented Aug 10, 2024

ummm you're right, unsure why. will have to have another look o.o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants