starrynte / BigBagKbdTrixPKL

"DreymaR's Big Bag of Keyboard Tricks" for Windows with PKL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DreymaR's Big Bag Of Keyboard Tricks - PKL[eD]

For PortableKeyboardLayout on Windows

(PKL[edition DreymaR] by DreymaR, 2017-)

Documentation

Info about DreymaR's Big Bag of keyboard trickery is mainly found on the Colemak forum:

  • The Big Bag main topic with better explanations and links.

  • Daughter topics for implementations, including the Big Bag for PKL/Windows one.

  • This repo implements most of my Big Bag for PKL, as layout and PKL .ini files.

  • It also adds my own PKL - edition DreymaR (PKL[eD]) with several improvements.

  • Big thanks to Farkas Máté, the AutoHotkey people, Vortex(vVv) and all other contributors.

Getting PKL up and running

  • Download a copy of this repo, for instance with its GitHub Download/Clone button (and then unzip the file you got).

  • The simplest way of running PKL is to just put the main folder somewhere and run PKL.exe any way you like!

  • PKL, being portable, doesn't need an install with admin rights to work. You must still be allowed to run programs.

  • I usually put a shortcut to PKL_eD.exe in my Start Menu "Startup" folder so it starts on logon, per user.

  • PKL can also easily be used with the PortableApps.com menu by putting its folder in a C:\PortableApps folder.

  • If the PortableApps menu is started on logon it can start up PKL for you too.

  • Choose a layout with your ISO/ANS(I) keyboard type, locale and Curl/Angle/Wide preferences, by shorthand or full name.

  • In PKL_Settings.ini, activate the layout(s) you want by uncommenting (remove initial semicolon) and/or editing.

    • My shortcuts use the KbdType (@K) etc values but you could also type the path to a layout folder out in full
    • The format is: layout = <1st layout folder name>:,<2nd layout folder>:<2nd menu entry> etc

More Know-How-To

  • The repo contains executables for the original PKL as well as PKL[eD], and source code for both.
  • Most of the layouts are now updated to PKL[eD] format though, so they'd need a little reconstruction for old PKL.
  • To make many PKL_eD changes work, your PKL settings .ini and layout.ini files need extra settings.

These PKL files may take a little tweaking to get what you want. Remember, there are several parameters:

  • The PKL_Settings.ini file holds layout choices. The layout.ini files hold layout settings and mappings.

  • ISO (European/World) vs ANSI (US) vs other keyboard types

    • These differ notably in the VK_102 key at the lower left, and some of the OEM_ key codes
    • I haven't supported JIS (Japanese) etc so far - sorry
  • QWERTY vs Colemak vs what-have-you, obviously. Choose wisely!

  • Full/VK mappings: I've provided my own Colemak[eD] as well as 'VirtualKey' versions

    • The 'VK' layouts just move the keys of your installed OS layout around, without other changes
    • The [eD] layouts have their own Shift/AltGr mappings specified. You may mix types if you want.
  • Curl(DH), Angle and/or Wide ergonomic mods, moving some keys to more comfortable positions

    • Angle/Wide affect the "hard" key positions in the layout.ini file, usually both for Layout and Extend
    • Curl(DH) is Colemak/Tarmak specific and for the most part should not affect Extend
  • Extend mappings, using for instance CapsLock as a modifier for nav/edit/multimedia/etc keys. It's awesome!!!

  • In PKL .ini you can use a shorthand specifying KbdType, CurlMod and ErgoMod, or use the layout folder name directly.

  • In layout.ini you can specify in the [eD_info] section some remaps that turn one layout into a modded one, and more.

  • If you need to tweak some Extend mappings, they're now in a separate file usually found in the PKL_eD folder.

  • In the layout folder(s) you've chosen, you may edit their layout.ini files further if required.

    • Check out that the ISO/ANSI OEM_# key numbers are right for you, or remapped with a VK remap.
    • Help image specifications, Extend key, key mappings etc are in the layout.ini file.
  • Help images aren't always available with the right ergo mod and keyboard type, since there are so many combos.

    • First, check around in some of the eD layout folders. Maybe there's something that works for you there.
    • With Advanced Mode active, there is a Help Image Generator that can make images for the currently active layout.
    • You have to have Inkscape installed, for instance from PortableApps.com, and point to it in the HIG settings file.
    • I recommend making state images only at first, since a full set of about 80 dead key images takes a long time!

Here are the columns of a full key mapping together with a sample key – semicolon (QWERTY P) from one of my layout.ini files:

SC01a = OEM_3   0   ;   :   --  dk13    …   ; QWERTY pP - dk_umlaut
SC    = VK      CS  S0  S1  S2  S6      S7  ; comments

Where:

Look in the PKL .ini files if you're interested! Much is explained there.

These hotkeys are found in the PKL settings file:

  • Ctrl+Shift+1 – Display/hide help image
  • Ctrl+Shift+2 – Switch layout between the ones specified in the settings file
  • Ctrl+Shift+3 – Suspend PKL; hit again to re-activate
  • Ctrl+Shift+4 – Exit PKL
  • Ctrl+Shift+5 – Refresh PKL, if it gets stuck or something

NOTES:

Maybe all the layout files aren't quite updated with remaps yet. Check out base ones like Colemak-eD_ISO vs Cmk-eD_ISO_CAWide.

  • Tech note: Running PKL with other AutoHotkey key mapping scripts may get confusing if there is hook competition.

Anti-madness tips for PKL file editing:

  • In layout.ini: Always use tabs as separators.
  • In Extend sections: Don't use empty mappings; comment these out. See my examples for advanced mappings like hotstrings!
  • PKL_eD uses both .ini and source files that may be UTF-8 Unicode encoded.
  • PKL_eD allows end-of-line comments (whitespace-semicolon) in .ini files, but the original PKL only handles them in layouts.

DONE:

These changes are now implemented in PKL_eD:

  • A Refresh menu option with a hotkey (default Ctrl+Shift+5) in case the program hangs up in some way (stuck modifiers etc).
  • Advanced Mode setting that shows 'Key history...' and other menu options, plus more info in the About... dialog.
  • Help image opacity, scaling, background color and gutter size settings. Help images can be pushed horizontally too.
  • Separate help image background/overlay, so keys/fingering, letters/glyphs and Shift/AltGr marks can be in different images.
  • A Help Image Generator that uses Inkscape (separate download) to generate a set of help images from the current layout.
  • A PKL_Tables.ini file for info tables that were formerly internal. This way, the user can make additions as necessary.
  • Sensible dead key names for images and entries (e.g., dk14 -> tilde) in a central file that layouts can point to.
  • A base layout file can be specified, allowing layout.ini to only contain entries that should override the base layout.
  • Scan and virtual code modular remapping for layouts and Extend, making ergo and other variants much more accessible.
  • The settings/layout and Extend parts of PKL.ini are now split into separate files.
  • There's a shorthand notation in PKL_Settings.ini to specify KbdType (ISO/ANSI), CurlMod and ErgoMod with the layouts.

TODO:

I have many more PKL_eD changes on my wishlist, including:

  • A timer that checks whether the underlaying Windows layout has changed (affects dead keys) - and fixes any stuck modifiers?
  • Multiple Extend layers (NumPad, hotstring...).
  • Sticky a.k.a. One-Shot modifiers: Press-release modifier, then within a certain time hit the key to modify.
  • More flexible dead key output in general, allowing literal glyphs, ligatures and DK chaining (one DK may release another).
  • A settings panel instead of editing .ini files.

Best of luck! Øystein "DreymaR" Gadmar, 2018-10

About

"DreymaR's Big Bag of Keyboard Tricks" for Windows with PKL

License:Other


Languages

Language:AutoHotkey 100.0%