• You are not logged in.

    Question about Deadkeys in PKL

    • Started by n3p3nth3
    • 5 Replies:
    • Reputation: 0
    • Registered: 14-Mar-2017
    • Posts: 12

    I'm pretty much a newbie to all the keyboard layout thing, currently using DreymaR's DBGHK mod in PKL (w/o AngleMod) with one EXTEND layer on an ISO keyboard, while waiting for my ErgoDox EZ to arrive!
    Since I occasionally need to type German, I'm contemplating making one unused key a deadkey for the German umlaut, this is normally the " on ISO keyboard, but I would like the double quote to retain it's normal function as I need that more often than the dead key.
    The key position I have in mind is the one between the left shift and Z - \ on the ISO keyboard, as I already have the same key on the home row to the left of ENTER
    Basically I need to make the left pinky \ a deadkey ", is that possible?

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

    Sure. I'm very happy with my own umlaut dead key on AltGr+; as that's easy to hit, but for a German typist I'd recommend a proper key for Öö and Üü instead. See my locale topic (linked from my sig topics). If the need for German is only occasional, I'd make two layouts with brackets or letters on the bracket keys, and use a hotkey to swap between them (if you really need more accessible brackets too now and then).

    If your need for German is rare enough, then a dead key may be the best option nevertheless.

    Not using the ISO-Angle mod is bad for your wrist, but hey – your funeral! ^_^

    If you're using a proper layout and not just a "VirtualKey" one (well, actually anyway), the umlaut dead key looks like this in the layout.ini file:

    SC01a = OEM_3	0	;	:	--	dk13		…	; QWERTY pP - dk_umlaut

    You'll want to move the dk13 (or whatever its number is in your layout) from the SC01a key to SC056 which is the scan code for the VK_102 key.

    SC056 = Z	5	z	Z	--	ʒ	Ʒ	; QWERTY zZ

    Here's mine, which is Angle modded of course. (That number 5 is because both level1/2 and 3/4 on that key are shifted versions of each other.)

    All this is also nice on a Wide mod, as the dead key or special letter keys work well in the center of your keyboard.

        Cmk-eD-at+de-usym-aw_Xmc.png
        German (Germany and Austria) 'Unified Symbols' Colemak[eD]

    Last edited by DreymaR (15-Mar-2017 17:59:56)

    *** 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: 14-Mar-2017
    • Posts: 12

    Hi DreymaR, thanks a lot, I was secretly hoping you would reply, as most of the stuff I'm currently using originated from you!:D
    What I'm using is a slightly modified version of your vk_TarmakCurlK5Colemak_ISO from your "Trick Bag", and as I understand it IS using VirtualKey, would that work with what you suggested, as the layout.ini of mine looks quite different (fewer columns).
    Actually I've been wondering about how VirtualKey works, what I've observed is that it is somehow communicating the "position" of the keys and not the keycode themselves, or something like that? Really would like to know more about this stuff, is there some further reading I could educate myself with?
    One fun thing about this virtualkey business is that my other AHK scripts that were written for QUERTY still work in their original position, as long as I start the scripts AFTER PKL is loaded.
    I was quite dumbfounded finding that out, but very happy as well, since it saved me the trouble rewriting those scripts - they were designed with hand position in mind and not the meaning of the keys.
    Regarding the AngleMod, I've actually given it a few days time, but in the end, since I'm already using an MS Natural Keyboard at work and Surface Ergonomic at home, with an ErgoDox incoming, my wrist is in quite good position and the angle mod feels quite weird on an already split keyboard. If I had to skip with a "normal" keyboard then I'd definitely stick to the angle mod!

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

    Yes, you can mix VK and non-VK in the same layout without worry. You just have to replace the one key from one of my other layouts, and edit that a little.

    VK just sends the Virtual key code for the key. The key has a scan code which is what the OS sees when you press a key, then that gets translated to a VK code. After this, the OS will decide what to do with that key press depending on modifier state etc. So in PKL, a VK mapping means that you just send the key's "position" as you say and let Windows handle what happens with Shift/AltGr/etc. A full key mapping in PKL like the one in my previous post, handles these levels and sends an Input Event instead, which is a glyph or similar actual result of a key press.

    The columns of a full key mapping are:

    SC01a = OEM_3	0	;	:	--	dk13	…	; QWERTY pP - dk_umlaut
    SC    = VK   	SS	L0	L1	L2	L3	L4	; comment
    
    SC & VK: Scan code (hard) & Virtual Key Code
    SS: Shift state (+1 if L0/L1 are non-/shifted versions of the same letter; +4 for L3/L4)
    L0–L4: Normal, Shift, Ctrl (not often used), AltGr, Shift+AltGr

    Ah, yes – running several keyboard hooking AHK scripts at once can be fun. :-)

    Short of poking around for PKL info on forums, I'm not sure what to recommend. Máté Farkas hasn't been in touch for years, and his English wasn't so good. The source code is available, but a tough read. I've a feeling that my posts and the README in my PKL files are among the better information sources these days...

    Having puttered around with hardware remapping devices quite a lot lately, I think I may finally be ready for a bout of PKL tweaking now. Let's hope that gets good! :-)

    Last edited by DreymaR (17-Mar-2017 10:36:47)

    *** 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: 14-Mar-2017
    • Posts: 12

    Thanks a lot, it works now like a charm!!!
    Now that I finally understand how this works, I also mapped ß to my Shift layer of the deadkey, that about covers all my German needs!:D
    Really looking forward to the ErgoDox now, since their online configuration tool doesn't seem to support non-ascii characters, I guess I'll have to resort to some technique learned from here to get umlaut, deadkeys etc!
    It's gonna be a bit twisted, as ErgoDox comes with its own layer support on the firmware level, guess I'll have a lot of fun figuring things out...
    Nice weekend!

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

    It's possible to use PKL only to get AltGr mappings only, so you can have your keyboard's layer mappings active and still get the dead keys and stuff from PKL – as long as you don't let your keyboard capture the layer that PKL dead keys are on! I keep nearly all my dead keys on AltGr+(symbol)key for consistency and ease of use.

    I have ß on AltGr+s by the way. ;-)

    Last edited by DreymaR (19-Mar-2017 19:09:12)

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

    Offline
    • 0