Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Created January 19, 2016 15:07
Show Gist options
  • Save johnlindquist/598f8aca221569e21c56 to your computer and use it in GitHub Desktop.
Save johnlindquist/598f8aca221569e21c56 to your computer and use it in GitHub Desktop.
; ***** PKL.ini file for PortableKeyboardLayout (by Farkas M�t�), written by �ystein Bech "DreymaR" Gadmar *****
; ***** Extend mapped for the AngleZ-ANSI left hand mod ( _ZXCVB --> _XCVBZ ) *****
; ***** Extend mapped for standard non-Wide (or Wide registry-mapped) layouts *****
; =======================================================================================
; NOTE: Remove the ';' in front of 'layout = ' on only one line below - or make your own!
; =======================================================================================
[pkl]
; The layout ini file is "layouts/[key value]/layout.ini"
; You can use multiple layouts and give them human-readable names like this:
; layout = LayoutFolder1:DisplayedName1,LayoutFolder2:DisplayedName2
; Tarmak learning setup for all (non-Wide-modded or ANSI-AWing) keyboards: Start with a Tarmak layout; gradually switch to VirtualKey Colemak
; The standard Tarmak steps are Tarmak0QWERTY, Tarmak1E, Tarmak2ET, Tarmak3ETR, Tarmak4ETRO and Tarmak5Colemak
; Choose ANSI or ISO keyboard, and progress to vanilla Colemak or Curl(DH)Angle modded Colemak (see http://forum.colemak.com/viewtopic.php?id=1467 for more info)
;layout = vk_Tarmak1E_ANSI:Tarmak1,vk_Tarmak0QWERTY_ANSI:QWERTY(VK-ANSI)
;layout = vk_Tarmak1E_ANSI:Tarmak1,vk_Tarmak2ET_ANSI:Tarmak2,vk_Tarmak3ETR_ANSI:Tarmak3,vk_Tarmak4ETRO_ANSI:Tarmak4,vk_Tarmak5Colemak_ANSI:Colemak(VK-ANSI)
;layout = vk_Tarmak1E_ISO:Tarmak1,vk_Tarmak2ET_ISO:Tarmak2,vk_Tarmak3ETR_ISO:Tarmak3,vk_Tarmak4ETRO_ISO:Tarmak4,vk_Tarmak5Colemak_ISO:Colemak(VK-ISO)
;layout = vk_TarmakCurlK1E_ISO:Tarmak-Curl1,vk_TarmakCurlK2ET_ISO:Tarmak-Curl2,vk_TarmakCurlK3ETR_ISO:Tarmak-Curl3,vk_TarmakCurlK4ETRO_ISO:Tarmak-Curl4,vk_TarmakCurlK5Colemak_ISO:Colemak-Curl(DbgHk)-ISO
;layout = vk_TarmakCurlK1E_AWing:Tarmak-Curl1,vk_TarmakCurlK2ET_AWing:Tarmak-Curl2,vk_TarmakCurlK3ETR_AWing:Tarmak-Curl3,vk_TarmakCurlK4ETRO_AWing:Tarmak-Curl4,vk_TarmakCurlK5Colemak_AWing:Colemak-Curl(DbgHk)-ANSI-AWing
;layout = vk_TarmakCurlK1E_ANSI-AZ:Tarmak-Curl1,vk_TarmakCurlK2ET_ANSI-AZ:Tarmak-Curl2,vk_TarmakCurlK3ETR_ANSI-AZ:Tarmak-Curl3,vk_TarmakCurlK4ETRO_ANSI-AZ:Tarmak-Curl4,vk_TarmakCurlK5Colemak_ANSI-AZ:Colemak-Curl(DbgHk)-ANSI-AngleZ
layout = colemak-eD_ISO
; Setup for ISO (Euro/World) non-Wide keyboard: Colemak [edition DreymaR]; switch to 'VirtualKey' QWERTY
; NOTE: The colemak-eD-Lat_ISO layout contains locale variants for several latin languages; see its layout.ini file
;layout = colemak-eD_ISO:Colemak[eD]-ISO,vk_qwerty_ISO:QWERTY(VK)-ISO
something e
; Setup for ANSI (US) non-Wide keyboard: Start with 'VirtualKey' Colemak; switch to 'VirtualKey' QWERTY (or vice versa)
;layout = vk_colemak_ANSI:Colemak(VK)-ANSI,vk_qwerty_ANSI:QWERTY(VK)-ANSI
;layout = vk_qwerty_ANSI:QWERTY(VK)-ANSI,vk_colemak_ANSI:Colemak(VK)-ANSI
; Display help images on startup
displayHelpImage = yes
;displayHelpImage = no
; Toggle the help images on/off
; http://www.autohotkey.com/docs/Hotkeys.htm#Symbols
displayHelpImageHotkey = ^+1
; With this hotkey you can switch between layouts
;changeLayoutHotkey = LAlt & LShift
changeLayoutHotkey = ^+2
; The original mode for non-ASCII characters may not work with
; all programs (for example GTK applications, like Klavaro or Pidgin)
; so you can try alternative modes with this hotkey.
; If you have found the best mode, you can write it into the
; nonASCII.ini; and please send it to me as well!
changeNonASCIIMode = ^+3
; Exit from the application
; http://www.autohotkey.com/docs/Hotkeys.htm#Symbols
exitAppHotkey = ^+4
; Suspend (disable/enable) the application.
; http://www.autohotkey.com/docs/Hotkeys.htm#Symbols
;suspendHotkey = LAlt & RAlt,RAlt & LAlt
;suspendHotkey = LCtrl & RCtrl,RCtrl & LCtrl
suspendHotkey = ^+SC029
; If your original layout has deadkeys, put them here;
; (For example on the Hungarian keyboard '^' is a dead key,
; so if I would like to type a '^', I must type '^' then 'Space'.)
; If you write "auto", PKL will hopefully use the correct mode (if someone sent it to me)
systemsDeadkeys = auto
;systemsDeadkeys = `��^~
; A file name in the Languages folder (without .ini). If it is 'auto',
; the language definitions are loaded from the system's default locale
; (http://www.autohotkey.com/docs/misc/Languages.htm)
language = auto
; Compact mode: every external file is in the same folder as pkl.exe
compactMode = no
; Windows internally translates the AltGr (right Alt) key to LEFT Ctrl + RIGHT Alt
; If you enable this option, PKL detect AltGr as (one of) Ctrl + (one of) Alt.
; (this is useful for notebook keyboards that do not have a right alt or AltGr key.)
; It is not recommended, because fortunately many programs know the
; difference between AltGr and Alt+Ctrl
altGrEqualsAltCtrl = no
; If you often forget to exit PKL at a shared computer, you can set a suspend timeout
; in minutes: After this time of inactivity (no keypresses) PKL will suspend itself.
; The exit timeout is similar: after this time is spent suspended PKL will shut down.
; For example if you use suspend=5, exit=30, then after 5 minutes of
; inactivity PKL suspends; if you are there, you can go live again. If you
; forgot to disable PKL and left, after 5 minutes your friend would not find it out.
; After 30 minutes in suspension, PKL would then exit.
; You can disable these features by setting the timeouts to 0.
; Important: only "coming out from suspend" counts as an activity for exitTimeOut,
; so if you write 0 to suspend and 30 to exit, it will exit after 30
; minutes, even if you type or press other keys.
suspendTimeOut = 0
exitTimeOut = 0
; If it is yes/true/1, pkl will start up suspended.
; (Yes, I know the helper image is appearing and hiding.)
; I think it's better to start PKL when you need it instead.
startsInSuspendMode = no
; =====================================================================================
; Extend mappings, providing a navigation/editing/etc modifier (set in layout.ini)
; NOTE: These need to be adapted to use a Wide/Angle ergonomic mod (or not) � see below
; =====================================================================================
; *** Commentaries for the PKL [extend] section(s) ***
; These keys are modified/transposed by holding down the 'extend key' (CapsLock by default):
;+------+------+------+------+------+------+------+------+------+------+------+------+------+
;|Esc + |F1 <> |F2 << |F3 >> |F4 <> |F5 <> |F6 << |F7 >> |F8 <> |F9 <> |F10<> |F11<> |F12<> |
;| Caps | Play | Prev | Next | Stop | Mute | Vol- | Vol+ | Media| BrHom| Mail | App1 | App2 |
;+======+======+======+======+======+======+======+======+======+======+======+======+======+
;|` ��� |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |
;| Cust | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
;+------+------+------+------+------+------+------+------+------+------+------+------+------+
;|Tab |Q ��� |W *** |F <<> |P <>> |G *** |J ### |L ### |U ### |Y ### |; ��� |[ ��� |] ��� |
;| | Esc | *WhUp| BrBck| BrFwd| *Up17| PgUp | Home | Up | End | Del | Esc | Ins |
;+------+------+------+------+------+------+------+------+------+------+------+------+------+
;|Caps+ |A +++ |R *** |S +++ |T +++ |D *** |H ### |N ### |E ### |I ### |O ��� |' ��� |\ ><> |
;| ++++ | Alt | *WhDn| Shift| Ctrl | *Dn17| PgDn | Left | Down | Right| Back | Apps | BrFav|
;+------+------+------+------+------+------+------+------+------+------+------+------+------+
;|< *** |Z ��� |X === |C === |V === |B *** |K *** |M *** |, *** |. *** |/ *** |Spc � |Entr� |
;| *WhLe| Undo | Cut | Copy | Paste| *BtnL| BtnM | *BtnR| *Le17| *Ri17| *WhRi| Enter| PrtSc|
;+------+------+------+------+------+------+------+------+------+------+------+-------------+
;Legend: # Movement; + Modifiers; = editing; * Mouse; <> MultiMedia; � Various commands.
; NOTES:
; - This map shows Colemak on an ISO board (with VK_102).
; * The remaps should be by scan codes though, so the positions are layout independent!
; * Since PKL currently doesn't remap scan codes, the Extend must be remapped instead.
; * For now, select between different [extend] sections below by renaming the sections.
; - Multiple extended mappings would've been nice; this setup is a general/basic one.
; * For instance, accelerated nav/mousing, NumPad/maths, mirroring, coder's toolbox...
; - If your layout doesn't define the key, 'extend' won't work with it!
; * Solution: Put, e.g., 'SC039 = SPACE VirtualKey' etc in your layout .ini file.
; * You'll need at least Escape/Space/Return/Back and F1-F12 for full functionality.
; - The Tab key is currently a poor candidate for remapping because of problems with AltTab.
; * It might be useable as another extensor/modifier though? (Probably best left alone.)
; - A WARS = modifier block idea didn't work because R couldn't map a modifier! A bug?!
; * (I believe the hardware scan matrix had CapsLock on the same column as the R key...)
; * R can map non-modifiers, so I settled for another solution for now: The mouse wheel.
; * My preferred way would have browsing/modifiers more ergonomically/logically placed:
;+------+------+------+------+------+
;|Tab |Q ��� |W <<> |F <>> |P *** |
;| | Esc | BrBck| BrFwd| *WhUp|
;+------+------+------+------+------+
;|Caps+ |A +++ |R +++ |S +++ |T *** |
;| ++++ | Alt | Ctrl | Shift| *WhDn|
;+------+------+------+------+------+
; - A Win key proved hard to implement, but many Win hotkeys use letters/nums anyway.
; * It'd be useful for Win-arrows, Win-F1/F3, Win-Break, the Start menu...
; * Tip: T+Q (Ctrl-Esc) shows the Start menu. Win-Help/Win-Search are on that menu.
; - Tech note: The mappings are on the form Send {Blind}{%YourMapping%} (see the AHK Help).
; * Thus, if you want, say, a modified keypress you can use, e.g., '}#r{' or '}^{Left'.
; - There isn't a sendable Undo key per se, oddly enough (but Ctrl+Z does the trick).
; * However, A+O (Alt-Back) = Undo (http://www.geocities.com/ian_springer/winkey.html).
; - Actually, it'd be nice to be able to Send any APPCOMMAND_ message, but AHK can't.
; * APPCOMMAND candidates: UNDO/REDO, NEW/OPEN/CLOSE, PRINT...
; - The Ctrl+ZXCV commands could be mapped with }!{Backspace, }+{Del, }^{Ins & }+{Ins
; * However, from Win7 there's a problem with this Cut command in some settings.
; - Mapping something to the Sleep or Power key doesn't seem to do a lot on most computers?
; - The Pause and CtrlBreak are usually both on the same physical key, which is a bit weird.
; * Using Pause, Win+Enter is System Properties.
; * Actually, both Pause/Break and SysRq/PrntScrn send their codes strangely.
; * Hence, I didn't remap any of them to avoid trouble.
; - The AppsKey and Btn2 may seem to do the same, but the menu appears in different places.
; - Mapping Del, Back or something else to the ` (Tilde) key was a bit of a toss-up.
; * For instance, use S+` (Shift-Del) to delete a file bypassing the Recycle Bin.
; * Other candidates: ^}w{ (Close), ^}a{ (Select All), ^}t{ (New Tab), #}t{ (Taskbar)...
; TIPS:
; - These mappings enable you to do many things without leaving the typing home position.
; * Mappings are based on ease of reach vs. usefulness, and some left-hand-only use.
; - This could take some getting used to for the left pinky, but it gets really cool!!!
; - Caps+Esc turns the CapsLock state on and off now.
; - It's handy to control your browser back/forward with the left hand only while browsing.
; - Space for Enter is also nice; can be worked with left-hand-only as well.
; * To press dialogue buttons for instance, use Tab to move and Space/Q to select/abort.
; * A+Space (=Alt+Enter) when a file/disk is selected, brings up the object's Properties.
; - Use Apps (or *Btn2) for context menus; arrows, 'mousing' or shortcuts select items.
; - Esc mapped to '[' (Telnet/Vim/etc compliant) is okay, but a left-hand one is also great.
; - Using S/T (Shift/cTrl) with the UNEI/LY/O' keys you can jump words, jump/select, etc.
; - The number keys are mapped to function keys. They are reachable with the left hand!
; * A4 closes apps; Win+3 GUI-searches; try 1(Help)/2(Rename)/3(Find)/5(Refresh) too.
; - The function keys are mapped to multimedia keys like the ones on multimedia keyboards.
; * Browser_Stop/Refresh/Search are usually covered by hotkeys (e.g., Esc/F5/^F).
; * Browser_Favorites usually needs a menu choice, so that's included (near the arrows).
; - The App1/2 keys are defined in the registry, in ShellExecute (REG_SZ) values:
; * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\17
; * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\18
; * You could also do user-specific ones in HKEY_CURRENT_USER (might have to create them).
; * Usually though, I find that the defaults of Explorer (App1) and Calc (App2) are fine.
; * The Mail one lies in AppKey\15, Media in 16, and Browser in 7. These too are editable.
; - Wheel Up/Dn are nice for scrolling windows/bars; Wheel Left/Right for horizontal scroll.
; * Horizontal scrolling doesn't always work though.
; - The 'virtual mousing' is rudimentary; a 'last resort' when arrows/Tab aren't enough.
; * I find it useful for moving the pointer out of the way and regaining window focus.
; * A mousing resolution of 17 pixels roughly fits *most* context and similiar menus.
; * A full mouse layout could have multi-resolution, diagonals, Btn4/Btn5 and sticky Btn1.
; * The keyboard's auto-repeat makes virtual mousing odd/'laggy' when a key is held down.
; * In particular, beware of holding down the *Btn key(s) for a 'rapid-click' effect.
[extend]
; *** SPACE/ /INS/DEL/HOME/END/PGUP/PGDN/ /LEFT/UP/DN/RIGHT
SC039 = Enter
;SC152 = }!d{BS}http://{
;SC153 = ScrollLock
;SC147 = Click Rel -128,0,0
;SC14f = Click Rel 128,0,0
;SC149 = PgUp 3
;SC151 = PgDn 3
;SC149 = Click Rel 0,-128,0
;SC151 = Click Rel 0,128,0
;SC14b = Left 6
;SC148 = Up 6
;SC150 = Down 6
;SC14d = Right 6
; *** PrtScr/SysRq[=!PrtScr]/ScrlLock/Pause[strange!]/Break/ /Menu/Power/Sleep/Wake
;SC137 = PrtScr
;SC054 = SysRq
;SC046 = ScrollLock
;SC045 = Pause
;SC146 = CtrlBreak
;SC15d = Menu
;SC15e = Power
;SC15f = Sleep
;SC163 = Wake
; *** ESC/F1-F12
SC001 = CapsLock
SC03b = Media_Play_Pause
SC03c = Media_Prev
SC03d = Media_Next
SC03e = Media_Stop
SC03f = Volume_Mute
SC040 = Volume_Down 2
SC041 = Volume_Up 2
SC042 = Launch_Media
SC043 = Esc}{Browser_Home
SC044 = Launch_Mail
SC057 = Launch_App1
SC058 = Launch_App2
; *** Row 1 (numbers row - left side)
;SC029 = Del
;SC029 = }^{w
;SC029 = }^{t
SC029 = }#{t
SC002 = F1
SC003 = F2
SC004 = F3
SC005 = F4
SC006 = F5
SC007 = F6
; *** Row 2 (upper letter row - left side)
SC00f = Tab
SC010 = Esc
SC011 = WheelUp 2
SC012 = Browser_Back
SC013 = Browser_Forward
SC014 = Click Rel 0,-17,0
; *** Row 3 (home row - left side)
;SC03a = CapsLock
SC01e = Alt
SC01f = WheelDown 2
SC020 = Shift
SC021 = Ctrl
SC022 = Click Rel 0,17,0
; *** Row 4 (lower letter row - left side)
;SC02a = LShift
; ##### FOR OPTIONAL 'ANGLE COMFORT' LAYOUTS, PASTE/REPLACE FROM THIS LINE (SEE SECTION BELOW) #######
; ***** Extend mapped for the AngleZ-ANSI left hand mod ( _ZXCVB --> _XCVBZ ) *****
SC056 = WheelLeft
SC02c = }^{x
SC02d = }^{c
SC02e = }^{v
SC02f = LButton
SC030 = }^{z
; ##### FOR OPTIONAL 'ANGLE COMFORT' LAYOUTS, PASTE/REPLACE TO THIS LINE #######
; ����� FOR OPTIONAL WIDE/NON-WIDE LAYOUT MAPPINGS, PASTE/REPLACE FROM THIS LINE �����
; ***** Extend mapped for standard non-Wide (or Wide registry-mapped) layouts *****
; *** Row 1 (numbers row - right side)
SC008 = F7
SC009 = F8
SC00a = F9
SC00b = F10
SC00c = F11
SC00d = F12
SC00e = CtrlBreak
; *** Row 2 (upper letter row - right side)
SC015 = PgUp
SC016 = Home
SC017 = Up
SC018 = End
SC019 = Del
SC01a = Esc
SC01b = Ins
; *** Row 3 (home row - right side)
SC023 = PgDn
SC024 = Left
SC025 = Down
SC026 = Right
SC027 = BackSpace
SC028 = AppsKey
SC02b = Browser_Favorites
SC01c = PrintScreen
; *** Row 4 (lower letter row - right side)
SC031 = MButton
SC032 = RButton
SC033 = Click Rel -17,0,0
SC034 = Click Rel 17,0,0
SC035 = WheelRight
;SC036 = RShift
; ����� FOR WIDE LAYOUTS (NON-REGISTRY-MAPPED), PASTE/REPLACE TO THIS LINE �����
; ===================================================================================
; These sections are not read by the program, but contain snippets for other sections
; ===================================================================================
; This section contains Extend maps for normal vs 'wrist angle comfort' layouts (ZXCVB+VK_102 keys)
[extend_AngleComfort]
; (These keys may already have been mapped on a lower level than PKL/ScanCodes, by registry remapping)
; Copy the appropriate set into your pkl.ini -> [extend] section, row 4 - left side.
; ***** Extend mapped for the Angle-ISO left hand mod ( _ZXCVB --> ZXCVB_ ) *****
SC056 = }^{z
SC02c = }^{x
SC02d = }^{c
SC02e = }^{v
SC02f = LButton
SC030 = WheelLeft
; ***** Extend mapped for the AngleZ-ANSI left hand mod ( _ZXCVB --> _XCVBZ ) *****
SC056 = WheelLeft
SC02c = }^{x
SC02d = }^{c
SC02e = }^{v
SC02f = LButton
SC030 = }^{z
; ***** Extend mapped for standard non-Angle layouts ( _ZXCVB unchanged) *****
SC056 = WheelLeft
SC02c = }^{z
SC02d = }^{x
SC02e = }^{c
SC02f = }^{v
SC030 = LButton
; If you need WheelLeft (on SC056) on an ANSI board, maybe replace an Esc or Del button?
; This section is storage for the normal or Wide-registry-remapped Extend mappings
[extend_NonWide]
; ***** Extend mapped for standard non-Wide (or Wide registry-mapped) layouts *****
; *** Row 1 (numbers row - right side)
SC008 = F7
SC009 = F8
SC00a = F9
SC00b = F10
SC00c = F11
SC00d = F12
SC00e = CtrlBreak
; *** Row 2 (upper letter row - right side)
SC015 = PgUp
SC016 = Home
SC017 = Up
SC018 = End
SC019 = Del
SC01a = Esc
SC01b = Ins
; *** Row 3 (home row - right side)
SC023 = PgDn
SC024 = Left
SC025 = Down
SC026 = Right
SC027 = BackSpace
SC028 = AppsKey
SC02b = Browser_Favorites
SC01c = PrintScreen
; *** Row 4 (lower letter row - right side)
SC031 = MButton
SC032 = RButton
SC033 = Click Rel -17,0,0
SC034 = Click Rel 17,0,0
SC035 = WheelRight
;SC036 = RShift
; This section is storage for the 'Wide' non-registry-remapped Extend mappings
[extend_WideNonRegMapped]
; ***** Extend mapped for the Wide-ISO-Slash right hand mod (non-registry-mapped) *****
; *** Row 1 (numbers row - right side)
SC008 = F12
SC009 = F7
SC00a = F8
SC00b = F9
SC00c = F10
SC00d = F11
SC00e = CtrlBreak
; *** Row 2 (upper letter row - right side)
SC015 = Esc
SC016 = PgUp
SC017 = Home
SC018 = Up
SC019 = End
SC01a = Del
SC01b = WheelRight
;SC01b = Ins
; *** Row 3 (home row - right side)
SC023 = Ins
;SC023 = Browser_Favorites
SC024 = PgDn
SC025 = Left
SC026 = Down
SC027 = Right
SC028 = BackSpace
SC02b = AppsKey
SC01c = PrintScreen
; *** Row 4 (lower letter row - right side)
SC031 = Browser_Favorites
SC032 = MButton
SC033 = RButton
SC034 = Click Rel -17,0,0
SC035 = Click Rel 17,0,0
;SC036 = RShift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment