• You are not logged in.

    Merits of PKL and AHK

    • Started by stevep99
    • 7 Replies:
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 975

    I have been using AHK for my keymapping needs in Windows for years, but note PKL is also popular, especially on this forum. The two programs offer similar capabilities, both offering quick and easy portable remapping capabilities. The main difference seems to be that AHK is more flexible, as you can program and combine arbitrary scripts, whereas PKL is more focused on its core functionality of keyboard remapping.

    For our purposes, there's not a lot of difference between them, so it may be down to simple preference. But on the face on it, AHK seems to me to be the better option, down to it's sheer flexibility! Is there a reason to use PKL over AHK that I have missed? What is the reason for the PKL love?

    Using Colemak-DH with Seniply.

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    PKL is an AHK script (PortableKeyboardlayout by Farkas Máté), so your post seems a little confused. :-)

    Writing your own remapping is obviously more flexible, but getting it as advanced as PKL will be a lot of work. Fun work to some, not to others.

    I'm looking into the PKL code to tweak it to my desires.

    Last edited by DreymaR (20-Sep-2017 12:37:55)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 975
    DreymaR said:

    PKL is an AHK script (PortableKeyboardlayout by Farkas Máté), so your post seems a little confused. :-)

    Writing your own remapping is obviously more flexible, but getting it as advanced as PKL will be a lot of work. Fun work to some, not to others.

    I'm looking into the PKL code to tweak it to my desires.

    Oh, then I am confused. I had assumed PKL had a separate codebase from AHK. What are the advanced things that PKL does? I have implemented Extend in AHK for example and it's fairly straightforward.

    Edit: Yes, I see, it's a compiled AutoHotKey script. In that case, it should be possible to make PKL work together with other AHK scripts. You could have a feature in the PKL config file to import/include AHK scripts.... That would give you all the flexibility of AHK!

    Last edited by stevep99 (20-Sep-2017 13:39:08)

    Using Colemak-DH with Seniply.

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    Umm... that's an interesting thought but I'm not sure how to do it unless you mean by recompiling PKL. Which isn't that hard but still too much for many. But people wanting the flexibility of AHK are probably advanced users anyway!

    To see what advanced things PKL does, just run it. ;-) Well, it provides a way of converting other layout formats to its use, it provides non-intrusive on-screen help images, multiple layouts with Extend etc, dead key handling, Unicode etc. It does a lot of things, and I wouldn't bother to write all that in raw AHK myself so I'll rather build from that vantage point.

    I suppose it could be handy to have the PKL source code #include a "user-definable" script by default. If you leave that empty, nothing happens, but if you add something to that script PKL will compile with your additions in place. You'd have to make sure your code doesn't conflict with any of PKL's code of course.

    PKL as it stands plays well with other AHK scripts unless they compete for the low-level keyboard hook. Normal key mappings don't, but some mappings may.

    Last edited by DreymaR (21-Sep-2017 10:19:42)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 975

    I wasn't imagining having to recompile PKL. AutoHotKey already has an #include command which lets you include other script files. So my thinking was, if PKL is itself a compiled AHK script, it ought to be possible in theory for it to expose this feature.

    I did briefly try PKL at one point, but as I was already used to AHK and had existing scripts, I didn't really see the benefit of it. Instead what I do is have a main AHK file from which I #include the scripts to use. There are a lot of AHK script examples on the internet. So if you want to experiment or try stuff out, this ability to easily add arbitrary scripts to your configuration is a killer feature, and is what has kept me with AHK.

    Last edited by stevep99 (21-Sep-2017 10:44:09)

    Using Colemak-DH with Seniply.

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    You can run PKL uncompiled from source, in which case it's of course easier to include other code on the fly. But as a concept, PKL comes compiled and ready to use without having to get AHK as well.

    For you, PKL may not hold any big benefits. But most people aren't willing to code a lot to get their layout up.

    Last edited by DreymaR (21-Sep-2017 15:42:38)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    I just remembered one of the main points:

    PKL is a PortableApp. It sits comfortably on your PC for sure, but also on USB drives or shared net folders and whatnot. Getting your desired layout setup is as simple as running it from wherever it may reside. For instance, when I have Windows on a virtual machine I plop PKL into it and have it run on startup. Problem solved. I also have it in my PortableApps folders, ready for action.

    In these cases, installing and running AHK with the PKL script is more of a hassle.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 117
    • From: UK
    • Registered: 14-Apr-2014
    • Posts: 975

    Although AutoHotKey is also runnable without having to install, so you could easily have it on a USB drive together with your scripts, so it's not much more complicated. In the end, since the underlying code is basically the same, it amounts to the same thing. Perhaps you're right though, for people that have no knowledge or interest in AHK and just want to remap their keybooard, PKL might be slightly easier.

    Using Colemak-DH with Seniply.

    Offline
    • 0