• You are not logged in.

DreymaR's Big Bag of Keyboard Tricks - PKL/Windows Edition!

  • Started by DreymaR
  • 155 Replies:
  • Reputation: 0
  • Registered: 02-Jan-2014
  • Posts: 11

Sorry to interrupt fruitful discussion with beginner question.
To be happy I need just one thing. To map keys outside of hands home position onto reachable keys. Mapping cursor navigation in extend layer is great. (actually I'd propose one change in extend layer -- switching caps lock; mapping it to esc makes it badly reachable, why not to use caps-backspace instead to controll it?) But I would like to map keypad on main part of keyboard also. But their placement on traditional positions is *slow*. I would like to type number with one hand, ideally right which is accustomed to write them on numpad. I can map them on alt-gr modifier, but that kills a lot of better symbols. Is there some way how to implement numpad layer -- for example some "sticky dead key"; the dead key which remain pressed until let's say esc key enabling "uiojklm,." to type "789456123"? Well the zero is problematic, since it's in place of spacebar. Do you know better solution how to map numpad as it is? (note: solution should work in xkb also).

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

Put the Caps where you want it! I use it so rarely that it's perfectly placed on Esc for me. In the pkl.ini file you'll see what you need to move. I didn't remap the Backspace key myself but it should be defined in the layout.ini files so you can then add it to the extend mappings (its code is SC00e).

As you can see in my XKB topic, I did make a NumPad layer (only missing a sensible modifier now) but there's no way of having multiple Extend layers in PKL so for now it's off the PKL menu. I recommend 789/luy/nei for the keypad number keys. There's also no sticky or toggling switch keys for the Extend mappings so it'd have to be coded and I only have an outdated set of PKL source files and Farkas Máté is incommunicado. :(

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

Offline
  • 0
  • Reputation: 0
  • Registered: 02-Jan-2014
  • Posts: 11

yes, I know how to do it. It was just a proposal concerning usability from mine point of view.
Thanks for reply, it's pity that in pkl cannot be numpad mapped in any better way.

Offline
  • 0
  • Reputation: 4
  • Registered: 04-Feb-2010
  • Posts: 149

Actually, I was wondering about that too. Or more specifically, if it wouldn't be possible to use the numpad scan codes on the extended layer (EG: SC024 = SC04B  ;Qwerty J = Numpad 4), and toggle between numbers and navigation as one normally would with numlock? As far as I know, the scancodes for the numberpad remain the same, regardless of numlock state...

The next step, for me at least, would then be messing around with the numberpad numlock-on shift layers. Fun!


Still, while that sounds all nice and reasonable, not having any luck getting PKL to recognize numlock. Anybody have any ideas?


On a semi-related topic, hey DreymaR, do you know what other shift states are available? Your layouts use 0,1,2,6 and 7; so presumably there must be at least a 3,4 and 5; and possibly more. Would any of those be Numlock? That might explain why numlock isn't working.

Last edited by cevgar (07-Feb-2014 22:24:54)
Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,363

For questions like these, google 'Autohotkey' with your question.

You should be right in that the NumLock state determines the actual function of the Numpad scan codes. The key names should be distinct (Numpad 7 vs Home). Feel free to play with it, but I feel that a NumPad-style navigation cross is too open to be of real goodness.

Again, the setup of the PKL layout.ini files is an inheritance from MSKLC. Check out some .klc files to see where it's at. Windows shift states are a sum of the bit states 1 for Shift, 2 for Ctrl, 4 for Alt. In this context, Ctrl+Alt is interpreted as AltGr (in AHK it's LCtrl+RAlt). Obviously, mapping symbols to Ctrl, Ctrl+Shift, Alt and Alt+Shift states of a key is frowned upon. So while the 2 state is listed since it's used for a key or two, the 3/4/5 states are omitted for brevity.

Last edited by DreymaR (07-Feb-2014 23:39:15)

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

Offline
  • 0
  • Reputation: 4
  • Registered: 04-Feb-2010
  • Posts: 149

You are absolutely right. I apologize for asking a readily available expert (perhaps the ONLY available expert, considering the creator is, as you say, incommunicado), before googling up the answers.

Then again, googling wouldn't have told me that PKL is capable of returning strings for deadkeys. I got that through experimentation, you know experience. Which you should have on the subject, eh? ...well anyways, enough teasing.


Deadkey Strings
This is dead simple really. First, find your deadkey in the layout.ini. Or make one. Then replace the resulting code point with your desired string.
Example:

[DeadKeyXX]
97 = This is a test    ;This will return the string 'This is a test' when pressing the appropriate deadkey, followed by 'a'

... but all kidding aside, I am guessing you knew that already. No way you could have been working on this project this long and not have known. *sigh*. So, to answer your question; no, I haven't figured out how to get it to work consistently. Interspersed with other text is fine, but two deadkeys in a row... it starts acting funny, requiring a space before activating. But hope springs eternal, right? So here is me, hoping you didn't know, and likewise hoping this helps you out.

Cheers!


PS. Numlock seems to not work with virtual keys. Checked it out online, and I'm guessing it is an extended scancode which PKL is truncating.

EDIT: corrected code example. 97=a.

Last edited by cevgar (08-Feb-2014 07:43:51)
Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,363

I was just trying to teach the man to fish instead of merely feeding him fish. ;) Actually, I had to google some of the answers so I thought you could just as easily have done it and learnt for yourself. Of course, I like to keep myself abreast too.

My experience with the dead key release was based on the attempt to make a Japanese Hiragana/Katakana layout where in my design dead keys had to release bigrams of kana characters. I wanted to use the consonants as dead keys so that you could type 'ma mi mu me mo' and get the corresponding five kana out. It was quite clever I thought, in effect making a simple IME out of a normal layout. But I couldn't get it to work in MSKLC, nor PKL. Thanks for your contributions to our understanding! :)

Last edited by DreymaR (08-Feb-2014 13:36:12)

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

Offline
  • 0
  • Reputation: 0
  • Registered: 15-Nov-2013
  • Posts: 2

Hello,

Thx so much for these contributions. I've found the wide layout to be extremely helpful and ergonomic. However I am a bit lost on making one modification; I have a US ANSI keyboard that does not have the extra button next to the left shift key. The wide angle version makes the "Z" key into an X. Therefore I would like to modify your default wide version to shift the bottom row over one key to the right in order to make the letter Z appear. Any tips on how I can do this?

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

In the pkl.ini file (for the Extend mod) I made the Wide and Angle mods modular in a way; there are snippets you can cut and paste in place for each.

In the layout.ini file it isn't quite so easy since I haven't made Colemak[eD] mapped layout files for all cases. But if all you want is the Wide (and Extend?) mod, then I suggest using the 'vk_colemak_ANSI_Wide(28)' layout which has the Wide mod and Colemak but keeps your AltGr mappings as they were since it's a "virtual key" layout.

If you do want the [eD] mappings for AltGr, you'll have to edit the 'colemak-eD_No_Wide(35)' file and probably change some of the OEM_# keys to fit ANSI mappings (see the vk_ layouts for ISO vs ANSI), fix the bracket keys as shown below and map Z to SC030.

SC015 = OEM_4    4    [    {    *{Esc}    å    Å    ; QWERTY [{
SC023 = OEM_6    0    ]    }    --    α    δ    ; QWERTY ]}

Let me know how that works out for you, and post the result (using code tags) if you're pleased with it. If you can't make it, I'll help you.

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

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

Update: I've revamped the PKL files a bit, particularly the Tarmak ones that now have help images and a default template in pkl.ini to help the newcomers. I hope it's intuitively easy (enough) to use... :o

Maybe I should make more help images, especially for the Extend mappings for other layouts as well? Would that be helpful?

Last edited by DreymaR (20-May-2014 09:55:18)

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

Offline
  • 0
  • Reputation: 2
  • Registered: 25-Oct-2013
  • Posts: 136

Three questions:
1. I feel a delay when pkl is active..... sounds familiar ?  Edit: with the graphical helper disabled, the delay is less (but still there).

2. How do I remap shortcuts like ctrl-f or ctrl-v to use the new locations and not the hard coded (?) old keys ?

3. caps=backspace works, but only deletes 1 caracter at a time, holding the key down doesn't work....

Thanks !

Edit: impressive work!

Last edited by pieter (02-Sep-2014 19:46:27)
Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,363

1) I don't feel a delay. I only type 80 WPM at the most, but haven't had any trouble I'm aware of (apart from the occasional modifier hangup which warrants a layout restart).

2) Shortcuts work fine for me. Make sure you use the right VK key names for each scan code in the layout file, not just the remapped output.

3) Could be your Caps key acting up. My Lenovo laptop shows an icon whenever I press it, no matter what it's remapped to. Sometimes the Caps has special implementation.

Edit: Thanks! :)

Last edited by DreymaR (03-Sep-2014 09:51:57)

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

Offline
  • 0
  • Reputation: 2
  • Registered: 25-Oct-2013
  • Posts: 136

Thank YOU, D. !  The delay is with Caps/Backsp, mainly because that key activates on release.... Regarding shortcuts: I hacked one of your layouts, but apperently I not good enough. LOL. I'll have to dive in again....

Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,363
Update:

I've made help images for all dead keys, and expanded the mappings for those dead keys too! See the main post.

In addition, I made a "Lat" layout variant which should give you the Colemak[eD]-UniversalSymbols mappings for several languages. I put in French, Spanish, Portuguese and Italian for now (locales be ca fr br pt es latam it). To activate one of your choice, comment out the active line and remove the comment from the one you want for all relevant keys in layout.ini. Sorry it's made in such an inconvenient way, but that's how PKL works.

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

Offline
  • 0
  • Reputation: 11
  • Registered: 06-Jun-2013
  • Posts: 560

@dreymar

have just downloaded the latest pkl stuff from the link at the start of this thread

do you have any more details on how to get the curl mods working?

my pkl.ini file has this layout enabled currently:

;  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

I've had a look in that layout but can't see any comments relating to curl or DH

Another thing of interest is that if you are running windows via virtualbox on a linux host, then it seems to bring over the wide angle mods automagically from the host layout

when i run pkl the graphic shows the angle but not wide mods, but when i type i definitely have both enabled

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

For now, the Curl mods are hidden from the layout choice and you have to edit the layout.ini file. Not all layouts have the necessary changes in them, but 'colemak-eD_ISO-Wide(35)' has. For the lines ending with "Cmk gG, Cmk-DbgH bB" for instance, you have to uncomment the Cmk-DbgH line and comment out the Cmk line.

The colemak-eD_ISO layout isn't an Angle one so it doesn't quite make sense to use Curl on that. I know, some might want Angle but not Wide – but PKL isn't modular so it'd be a lot of work for me to provide all possible combos. Not there for now.

In the colemak-eD-No_ISO-Wide(35) layout there are layout files for both vanilla Cmk and Cmk-DbgHk (but with Norwegian ÆØÅ letters on the layout). You could look how it's done there.

I'm looking into recompiling PKL so I could add a little modularity (as Farkas Máté is still MIA). Before that happens, making every mod and layout combination will be wayyyy too much work! Also, the graphics are much work as it is (I'd like a script that could make the SVG images based on a pkl layout.ini file, but that'd take a good scripter and some time to make). For an ISO keyboard I consider the Angle mod quite standard but the Wide mod is more optional.

Last edited by DreymaR (05-Feb-2015 14:13:07)

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

Offline
  • 0
  • Reputation: 11
  • Registered: 06-Jun-2013
  • Posts: 560

thanks for the pointers - will take a look..

Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,363
Update:

The PKL downloads now include layouts both for ISO (Euro/World) and ANSI (US) keyboard models which have some different symbol key mappings, and vanilla vs Curl-modded Colemak. Enjoy!

Update the second: ANSI-AWing files have been added for all Tarmak steps, QWERTY and full Colemak inclusive. The Extend mappings have been tweaked to work with this, putting the Extend key in the old A position. There's a pkl_awing.ini file that you need to use as pkl.ini for the Extend mappings to work as they're supposed to.

Update the third: ANSI-AngleZ files are there too now. And pkl.ini files for the different variants. The pkl_ANSI-AngleZ-nonWide file, for instance, by default activates the Tarmak-Curl progression for that mod.

Last edited by DreymaR (25-Jun-2015 21:30:07)

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

Offline
  • 0
  • Reputation: 0
  • Registered: 11-Sep-2015
  • Posts: 23

Is there a way to remap the to forward slash , \ , (which sits right above the enter key) to be the Caps Lock key? I think the extended layer is a cool concept, though I won't be using it. I've actually remapped some of the keys. I also changed the Caps Lock to be backspace, which meant disabling the extend layer, which I don't see myself using on laptop at all. Overall, I just want to say thank you for making such a versatile tool. If I ever find myself needing to change my layout, it's quite simple to do. I would love it if I could just remap the forward slash (\) to be Caps Lock.

Last edited by IQubic (15-Sep-2015 06:00:19)
Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,363

That's the backward slash (\), not forward slash (/) you mean, right? On an ANSI keyboard, since you describe it as sitting above Enter. And you want it to be a Caps Lock key, not the Extend key?

I'm confused, because you say that you love Extend but then you say that you won't be using it?

In PKL this isn't hard to do. In your layout file, do you have VK (VirtualKey) mappings or detailed mappings? If the former, there may be a line like this in there:

SC02b = OEM_5    VirtualKey    ; US \| (ANSI)

Whether your mappings in general are VK or not, you could make the SC02b line into this instead:

SC02b = OEM_CAPITAL    VirtualKey    ; US \| (ANSI)

That should do it.

Last edited by DreymaR (14-Sep-2015 12:49:13)

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

Offline
  • 0
  • Reputation: 0
  • Registered: 11-Sep-2015
  • Posts: 23

Yeah, what I meant to say was: "Although I find the extended layer to be a neat concept, I find having a Colmak style backspace is more convenient for me. I also don't think that I'd use the extend layer, even if it was mapped to some other key."
Also, the code you gave me for remapping my slash key to caps doesn't work.

Last edited by IQubic (15-Sep-2015 06:17:33)
Offline
  • 0
  • Reputation: 214
  • From: Viken, Norway
  • Registered: 13-Dec-2006
  • Posts: 5,363

You're right, VirtualKey mapping of CapsLock doesn't seem to work for me either. Try this explicit mapping instead then:

SC02b = OEM_CAPITAL    0    *{CapsLock}    *{CapsLock}    *{CapsLock}    *{CapsLock}    ; Caps Lock

Hitting Caps+O, once you get used to it, is as convenient as a Colemak-style backspace for two-handed typing. In fact, I feel that hitting Back repeatedly is easier this way.

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

Offline
  • 0
  • Reputation: 0
  • Registered: 11-Sep-2015
  • Posts: 23

DreymaR, that's not working either. I'm not sure why.

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

Did you use tabulators as separators?

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

Offline
  • 0
  • Reputation: 0
  • Registered: 11-Sep-2015
  • Posts: 23

I just copy pasted what you wrote.

Offline
  • 0