Colemak Keyboard Layout Remappings Using AutoHotkey

Post your working scripts, libraries and tools for AHK v1.1 and older
MaEstRo
Posts: 5
Joined: 21 Oct 2018, 10:22

Colemak Keyboard Layout Remappings Using AutoHotkey

22 Oct 2018, 00:49

Overview of the layout:

+-----------------------------------------------------------------------+
| NATURAL LAYER:....º1234567890¿?=+(),._abcdefghijklmnopqrstuvwxyz
| Shift LAYER:......ª!"·$%&/()≈¡!^*[];:\ABCDEFGHIJKLMNOPQRSTUVWXYZ
| LAlt LAYER:.......♭ ♯ ♮ ̧ ̆ ̃ ̂ ̀ ́ " ̈ ⇔ ⇐ ⇒ /* */ < > /
| AltGr LAYER:......\|@#~€¬[]{}
| OTHER:............CapsLock ⇔ Backspace, LAlt + CapsLock ⇒ Del
|...................LAlt + e f d s ⇒ Up, Right, Down, Left
|...................LAlt + w p a g ⇒ PgUp, PgDn, Home, End
+-----------------------------------------------------------------------+


This script is a remaping of all the keys in a Logitech k235 qwerty spanish keyboard to a customized Colemak layout optimized for programming. You can use this same script for other keyboard layouts as well. To customize it simply replace the character to the left of every double colon (::) with the key printed in your keyboard and replace the character to the right of the (::) with the character that you want to send to screen with that key instead. The character pairs (original::replacement) are listed by rows from top to bottom and from left to right on the keyboard. There are 3 layers of keys, that is, this remapping redefines 3 characters for every key in the keyboard:

-The layer of natural characters (those produced when no modifier keys are pressed)
-The layer of Shift characters (those produced when the shift key is pressed)
-The layer of LAlt characters (those produced when the left alt key is pressed)

I hope this helps, it has made my life much easier, I hope it does the same for you.

qwerty_2_Colemak.ahk
Script remapping of a qwerty keyboard layout to a Colemak keyboard layout with convenient hotkeys for programming work
(14.32 KiB) Downloaded 342 times

For anyone interested in Colemak out there:
If you know about AutoHotkey and find a way to use AltGr instead of the LAlt for the third keyboard layer of the script above, or you can find it in your heart to simplify and improve this script, please let us know at the forums of AutoHotkey, I (MaEstRo) will create a thread there for Colemak Keyboard Layout Remappings Using AutoHotkey. I have been using Colemak for general typing and programming for a while and know that a good customizable Colemak layout is sorely needed by Colemak enthusiast on the web. I don't know much about AutoHotkey at the time of this writing, and had to read the docs for 3 days to produce this script. Although it is far better than anything else I have found (including more rigid layouts produced by Microsoft Keyboard Layout Manager) I know it can be much better and friendlier, I just don't know enough to improve it anymore myself, perhaps you can take it from here. if you do, or you know about better Colemak keyboard layout alternatives using AutoHotkey, please let us know at the forums.

Thank you for your time and your help.
MaEstRo
Posts: 5
Joined: 21 Oct 2018, 10:22

Re: Colemak Keyboard Layout Remappings Using AutoHotkey

23 Oct 2018, 21:53

Thanks to Scr1pter's help we finally found a way to use AltGr as a modifier key for hotkeys without LCtrl getting stuck.
The idea is simple: every time you press AltGr two key presses are sent to the screen LCtr and RAlt, so instead of trying to capture them both, capture one and ask AutoHotkey to ignore the other with the * option...this is the solution:


"capture AltGr presses with the hotkey (*!>) which captures the RAlt and ignores the LCtrl"


That way I have been able to use AltGr as a modifier key for many hotkeys without Ctrl getting stuck or having to press AltGr multiple times for multiple consecutive target keys.

And this would be the improved and expanded QWERTY to Colemak layout that uses that technique above and has a ton of useful hotkeys for programming work in Python, HTML, CSS, JavaScript, AutoHotkey and any other language with similar syntax to those. This scrip is now much closer to what I originally wanted. Now we just need someone to make the script more friendly by creating a UI that allows customization and better visualization of the key remappings and this could very well be, the most versatile Colemak layout I have ever heard of.

qwerty_2_Colemak.ahk
Script that remaps a QWERTY keyboard to a Colemak keyboard with many useful hotkeys for programming work.
(16.08 KiB) Downloaded 230 times

Overview of the layout:

╔══════════════════════════════════════════════════════════════════════════════════════════════════╗

║ NATURAL LAYER:......º 1 2 3 4 5 6 7 8 9 0 ¿ ? - = + ( ) , . ' abcdefghijklmnopqrstuvwxyz
║ Shift LAYER:........ª ! " · $ % & / ( ) ≈ ¡ ! # ^ * [ ] _-_ ; : """ ABCDEFGHIJKLMNOPQRSTUVWXYZ
║ LAlt/RAlt LAYER:....≪ ≫ ≅ ⇔ ⇐ ⇒ ̆ ̈ ̃ ̂ ̀ ́ {} < > \ ♯ ♭ ♮ ̭ … "_ /* */
║ AltGr LAYER:........\ | @ # ~ € ¬
║ OTHER:..............CapsLock ⇔ Backspace, RAlt + CapsLock ⇒ Del
║ ....................RAlt + e f d s ⇒ Up, Right, Down, Left
║ ....................RAlt + w p a g ⇒ PgUp, PgDn, Home, End
║ ....................a, LAlt + ̆ ̈ ̃ ̂ ̀ ́ ⇒ ă ä ã â à á
║ ....................c, RAlt + ̧ ⇒ ç

╚══════════════════════════════════════════════════════════════════════════════════════════════════╝

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 243 guests