-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
[Bug] Can't map <capslock> #40
Comments
Thanks for using it. I have not been able to reproduce it. However, I am using a multi-language IME, so the keycode of I will first build a single language environment and try it. Please wait for a while. |
I have installed and tested Windows 10 Home Single Language 21H1 Build19043.1348 and found the same behavior. I will now work on fixing the bug. Thanks for the report. |
Hi. I found the factor of the problem, but I didn't know its solution. In Windows10, if absorb the input message of some toggle keys (e.g. This is due to the API not working, so I don't know the solution. If there is an open-source remapping tool that can handle CapsLock, let me know. I will refer them for a solution. Thanks. |
I've seen to have hit a similar issue. In regards to refering to another solution: Maybe AutoHotkeys can shed a light in this? I use it to implement Extend-Layer, as seen in https://dreymar.colemak.org/. That means that my pressing my caps-lock key acts just as another keyboard layer. It works pretty well. Maybe you could refer to othem? Attached, the piece of AHK code that enables the caps-lock remapping. |
Thanks for sponsoring and information. Is the problem with AltGr, in Single Language Edition? Otherwise, AltGr may be caused by another fact that AltGr is LCtrl + RAlt compound key code internally. I am not familiar with extend-layer, in other words, AHK can disable the original function of CapsLock with Thanks. |
I am not sure if it would work in the single-language edition: i wasn't even aware it existed until now. exploring further : this "AltGr stuck" Doesn't happen in every mode transition, strangely.
In more details: going from insert_mode to gui_normal , using What i tested was: doing commands while in stuck mode. To further explore, i turned on the trace-level logging on vscode, to inspect what he was dispatching on , as well as the screencast mode. On a side screen, i turned KeyboardStateViewer on. While in stuck mode, doing the following keystrokes result in the following actions :
From this point of view, it looks like the problem is the way programs handle the KeyDown -> Key Up transition. However, and this is the place where i got very confused. going from insert_mode to visual, using Some other observations: I also have other altgr shortcuts mapped by autohotkeys ( switches desktops, for example ), and they don't trigger stuck mode either. From my testing, this is because autohotkeys stops the propagation of key-events as soon as it hits a mapped shortcut, while you seen to only stop propagating after. That is:
( While testing these out, i found a similar bug in autohotkeys. Won't post now because this post is already long enough. We can discuss it below, if you want to. ) Pressing altgr + esc to exit insert mode works as a way of preventing stuck mode from happening. This is likely due to the ergonomics: when pressing altgr i most likely do the sequence TLDR:
|
Sorry for my late reply. As discussed above, I assume that If you are using the Single Language Edition, it will be shown as such in the log files. Like this.
I am trying to reproduce what you call AltGr stuck. I will let you know when I can confirm it. Just to be sure, is your keyboard French or something else? Thanks for your contribution. |
After verifying, i do not use the single language edition. |
Hi, Probably just a small addition, but I'm having the same issue, although I'm not on a single-language edition. On a side note, I also tried to remap jk to to_edi_normal, and it kind of worked, but the problem was that it also wrote out the two characters. The same happened with Tab: pressing it caused the program to go to normal mode, but it also meant that the system reacted as if I wanted to press Tab. I tried to swap CapsLock and Insert with PowerToys, but to no avail. As a temporary solution, Insert without remapping seems to work now, but it is, of course, less comfy. By the way, the log also shows a different kind of problem; there seems to be a bug with switch character case in my system. ========== System Infomation ========== [win-vind]
|
@canelhasmateus Key states observed from win-vindI inserted code in the source code of win-vind to check the status of the key code, and after rebuilding, I did the following mapping. inoremap <ralt> to_gui_normal At that time, I found that win-vind recognizes win-vind does not stop key propagation?Internally, win-vind performs three types of mapping.
In the specification, Solution for mapping AltGr
imap <ralt> <f20>
inoremap <f20-'> to_gui_normal
gnnoremap <ralt-esc> to_insert
gnnoremap <esc> to_insert Thanks. |
@pukkancsanyo About the log, it seems that You seem to want to map something about Insert mode, can you be more specific? |
@pit-ray Sorry if I was not specific enough with the core of my comment. I wanted to map CapsLock as an alternative way to have to_edi_normal when I am in Insert mode (Esc + arrows feel a bit unergonomic for me on my keyboard). I wanted to apply something that was mentioned in the original comment: imap However, it does not seem to work; it is as if CapsLock were not be pressed at all, and I cant switch back to edi_normal this way, although I am not on a single-language edition. So I just wanted to added this observation of mine to the thread that maybe not only single-language editions are affected by this issue. |
My edition from win-vind logs says |
for 'jk', i use 'imap jk <to_edi_normal>hhxx' to |
if this is still of interest, https://github.com/houmain/keymapper can remap capslock |
Describe the bug
As an example, I'm trying to remap
<capslock>
by doing:Also, I tried to remap
<capslock>
in other modes without success:I can remap all other keys except capslock.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: