Open rbreaves opened 4 years ago
@rbreaves I'm trying to use this: https://github.com/adunning/Mac-Keyboard-Layouts-for-Windows to add accents but so far the combination of this layout with kinto and my keyboard is giving me headaches. I'm getting a new keyboard soon so that may be the problem. I'll let you know. At any rate, I used this linked layout + sharpkeys for years and it worked great (tho cmd+q, terminal copy/paste etc didnt work)
Hmmm... I am not entirely sure why but I assume it might have something to do with the remapping of the right Alt key? In theory I'd think it just means that AltGr is being shifted one key to the right, but if you were to want to undo it then on line 230 of the kinto.ahk file you'd want to make this change and then suspend and restart kinto.
You could also try holdkey instead, not free - but alas.. the curse of using Windows without intuitive UX decisions. https://www.holdkey.eu/
Just comment it out by adding "; " in front of RAlt if that's a problem.
https://github.com/rbreaves/kinto/blob/master/windows/kinto.ahk ~/.kinto/kinto.ahk
; Basic Remap
;
; Primary::LCtrl
; Secondary::LAlt
; Tertiary::LWin
; $LAlt::LCtrl ; CB/IBM
; $RAlt::RCtrl ; CB/IBM
; $CapsLock::LWin ; IBM
; $LCtrl::LAlt ; CB/IBM
; $LAlt::LCtrl ; WinModifiers
; $RAlt::RCtrl ; WinModifiers
; $LWin::LAlt ; WinModifiers
; $LCtrl::LWin ; WinModifiers
; $LWin::LCtrl ; MacModifiers
; $RWin::RCtrl ; MacModifiers
; $LCtrl::LWin ; MacModifiers
I just noticed RCtrl was missing so it has now been added.
@rbreaves turns out Windows On-Screen Keybord (that I had open to check the key presses) was screwing things up royally (making ctrl stick and other nonsense). I change my kinto.ahk to remap LAlt -> RAlt and using the keyboard layout from the other repo now I can type like in my mac (using the left alt button to input accented characters.)
Anyway, thanks for the help! Love this project, your work is great.
personally I added
!e::Send {RAlt Down}e{Ralt Up} ; MacModifiers
!i::Send {RAlt Down}i{Ralt Up} ; MacModifiers
!u::Send {RAlt Down}u{Ralt Up} ; MacModifiers
!c::Send {RAlt Down}c{Ralt Up} ; MacModifiers
!`::Send {RAlt Down}``{Ralt Up} ; MacModifiers
to my kinto.ahk to make it work
Plan to bring accented characters to Kinto, not quite the same way as macOS does it, but for Windows holding down a key to cycle through accented options is possible.
https://autohotkey.com/board/topic/33015-script-accent-chars-yet-another-take/
Will also revisit how this might be done with xkeysnail, however its implementation on Linux may lag behind Windows. I am not sure.
https://unix.stackexchange.com/questions/154781/select-characters-by-holding-down-a-key-in-linux-like-in-osx
From having debugged xkeysnail I know that it sees a held key as a repeating key until it is released, so in a sense duration of it being held could be measured or counted. Beyond that I am not entirely sure what I can do with that knowledge. Perhaps write some code to detect the caret location, if IBus is being used and use a program to show an emoji like onboard screen keyboard with the specific accented characters for that key. It is probably a doable - but it's implementation would be more difficult than Autohotkey unless someone is aware of a 3rd party app that could take care of it.
Related https://github.com/rbreaves/kinto/issues/94