Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert PKL ini file to EPKL layout #36

Open
Konfekt opened this issue Oct 31, 2021 · 12 comments
Open

convert PKL ini file to EPKL layout #36

Konfekt opened this issue Oct 31, 2021 · 12 comments

Comments

@Konfekt
Copy link

Konfekt commented Oct 31, 2021

The layout variant tutorial shows how to edit an EPKL layout, but is it also documented how to convert an existing PKL ini file to an EPKL layout? Unfortunately, the given layout under PKL does not print the non-ASCII characters on Windows 10.

@DreymaR
Copy link
Owner

DreymaR commented Nov 1, 2021

Since my work to improve on the abandonware PKL started in 2015, it's come a very long way. In all this time, the need to convert old PKL files has been nearly non-existent, so the short answer is no: There is no guide because "nobody" needed it.

However, it's still possible to do. The main thing you'll have to do is to add a @ in front of your dead keys to mark them as dead keys, and dk_ in the section name for each dead key, followed by their dk name. Whether you have to define the deadkeyname or not, I'm uncertain of. See the Colemak-eD Hebrew variant Baselayout for an example of how to introduce layout-specific dead keys.

You can still use the scan codes in addition to the more intuitive KLM codes I use, and the same goes for the VK codes.

HOWEVER: Looking at your layout file, I'd say that I'd strongly recommend that you remake it based on one of my Colemak layout files instead! That way you'll get far more mappings on your dead keys, for one. I don't use your deadkey8 but have special symbols in the other dead keys instead, in addition to having Compose key sequences for many of them. As an example, the © glyph is on AltGr+c in Colemak-eD – but also on the ringabove dead key since it's a ring symbol and that DK didn't use the c key for anything before. And instead of one mapping for µ on that special DK, there's an entire DK full of Greek letters.

I would boldly claim that my Colemak-eD is in fact a more evolved version of your layout. Check it out in EPKL and tell me if you disagree, please?

@Konfekt
Copy link
Author

Konfekt commented Nov 1, 2021

Thank you very much! Is this conversion of the layout from PKL to EPKL how it was meant to be? I fully agree on your observations and am dumbfounded where all these mentioned mappings areise from, since by design they should not be there; it is a layout solely containing most accents for most european languages; not special non-alphabetic symbols. @gargle as the creator of altgr-weur.klc: is this how it is meant to be or did the conversion tool mix dead key mappings up?

@gargle
Copy link

gargle commented Nov 1, 2021 via email

@DreymaR
Copy link
Owner

DreymaR commented Nov 2, 2021

Is this conversion of the layout from PKL to EPKL how it was meant to be?

I would suggest changing the file heading to the standard EPKL one, although it's a purely cosmetic thing. You should fix the typo in the [information] section that stems from the old PKL typo in that section.

Other than that, it looks fine by me. Have you tested it yet?

;
;;  Layout definitions
;;  for Portable Keyboard Layout by Farkas Máté [https://github.com/Portable-Keyboard-Layout]
;;  edition DreymaR (Øystein B Gadmar, 2015-)   [https://github.com/DreymaR/BigBagKbdTrixPKL]
;
;;  To use this layout, edit the EPKL_Layouts .ini 'layout = ' and/or Type/Mod/ID/etc entries.
;;  A simpler way is the Layout/Settings dialog from the EPKL tray menu (or try Ctrl+Shift+6).
;;  Alternatively, run EPKL in compactMode with the layout's files in the main program folder.
;
;;  This is an EPKL style layout.ini file
;;    - It may point to a base layout, Extend and DeadKey table files containing layout parts
;;    - The layout.ini file holds changes from the base layout, remaps and other layout info
;

[information]
layoutName      = Colemak-eD CurlAngleWideSym-ISO ergo.
layoutCode      = Cmk-eD-CAWS-ISO
localeID        = 00000409

copyright       = DreymaR (GPL v3)
company         = Shai Coleman, DreymaR
homepage        = http://forum.colemak.com/viewtopic.php?id=1467
version         = 4.0

[pkl]

This is an example from the Colemak layouts. Do try to look at one of my layout files to see how you can specify background image etc for the layout, this makes it much nicer. To get Extend file etc specified you need to copy the relevant parts from one of my BaseLayout files, or make a BaseLayout file for your layout (this is the layout without ergonomic mods, they can then be played over the BaseLayout easily by layout.ini files referring to the BaseLayout).

@DreymaR
Copy link
Owner

DreymaR commented Nov 2, 2021

I fully agree on your observations and am dumbfounded where all these mentioned mappings areise from, since by design they should not be there...

Not sure what you mean, but that file has dead keys that are common to the Colemak layout. It seems to me that the weur file was based on that. As mentioned, in my Colemak-eD files I take this much further and include very many useful mappings, both symbols and letters.

Could you comment on why you want a less advanced layout instead of a more advanced one, please?

I've discussed with the EUR creator about the utility of AltGr mappings for accented letters, and I disagree strongly with them on that point. This weur layout falls into the same trap in my opinion: You get intuitive mappings for one accent (umlaut-diaeresis) and some more keys, and the rest have to be put in mostly confusing and hard-to-remember positions. I feel it's much more tidy to use dead keys for the accents in general, and add locale variants for the languages that need some accents a lot (like the acute accent for Spanish and grave for Italian, etc).

@Konfekt
Copy link
Author

Konfekt commented Nov 6, 2021

Is this conversion of the layout from PKL to EPKL how it was meant to be?

I would suggest changing the file heading to the standard EPKL one, although it's a purely cosmetic thing. You should fix the typo in the [information] section that stems from the old PKL typo in that section.

Other than that, it looks fine by me. Have you tested it yet?

;
;;  Layout definitions
;;  for Portable Keyboard Layout by Farkas Máté [https://github.com/Portable-Keyboard-Layout]
;;  edition DreymaR (Øystein B Gadmar, 2015-)   [https://github.com/DreymaR/BigBagKbdTrixPKL]
;
;;  To use this layout, edit the EPKL_Layouts .ini 'layout = ' and/or Type/Mod/ID/etc entries.
;;  A simpler way is the Layout/Settings dialog from the EPKL tray menu (or try Ctrl+Shift+6).
;;  Alternatively, run EPKL in compactMode with the layout's files in the main program folder.
;
;;  This is an EPKL style layout.ini file
;;    - It may point to a base layout, Extend and DeadKey table files containing layout parts
;;    - The layout.ini file holds changes from the base layout, remaps and other layout info
;

[information]
layoutName      = Colemak-eD CurlAngleWideSym-ISO ergo.
layoutCode      = Cmk-eD-CAWS-ISO
localeID        = 00000409

copyright       = DreymaR (GPL v3)
company         = Shai Coleman, DreymaR
homepage        = http://forum.colemak.com/viewtopic.php?id=1467
version         = 4.0

[pkl]

This is an example from the Colemak layouts. Do try to look at one of my layout files to see how you can specify background image etc for the layout, this makes it much nicer. To get Extend file etc specified you need to copy the relevant parts from one of my BaseLayout files, or make a BaseLayout file for your layout (this is the layout without ergonomic mods, they can then be played over the BaseLayout easily by layout.ini files referring to the BaseLayout).

Thank you, I'm still struggling to compile an altgr-weur layout; replacing in EPKL_Layouts_Default.ini the line

layout = @L-@T@V_@K@E:@L@V(@T) @E , QWERTY\QWE-@T_@K@H:QWERTY(@T) @H

by

layout = altgr-weur:altgr-weur

with Layouts\altgr-weur\layout.ini and compiling still showed the Colemak layout. Changing it to altgr-weur in the dialog obtained by hitting Ctrl+Shift+6 left the AltGr layer unresponsive.

@Konfekt
Copy link
Author

Konfekt commented Nov 6, 2021

Could you comment on why you want a less advanced layout instead of a more advanced one, please?

I would not mind an advanced layout later on, only at the moment the priority is to get it running.

You get intuitive mappings for one accent (umlaut-diaeresis) and some more keys, and the rest have to be put in mostly confusing and hard-to-remember positions. I feel it's much more tidy to use dead keys for the accents in general, and add locale variants for the languages that need some accents a lot (like the acute accent for Spanish and grave for Italian, etc).

This is meant for users that type words of more than one language with accented letters, say German and French (Umlauts on the vowel, accent aigu below it). More common letters are easier to remember; for less frequent ones compromises had to be made.

@DreymaR
Copy link
Owner

DreymaR commented Nov 12, 2021

No. This kind of compromises don't really have to be made, that's a misconception.

I now use the Compose key a lot, by means of which you can always have intuitive sequences for accents you don't use a lot. Such as 'e for é, ;o for ö, >a for â, _e for ē etc etc. For accents you do use a lot, I still recommend using the bracket keys (in the middle of the board using the Wide ergo mod) for dead keys suited to your main language, if the Colemak-eD dead key you need isn't already well placed. I think aigu is already well placed, for instance, but grave is not.

The Compose tables from Linux are quite extensive. In order to provide a really intuitive method, they use redundancy in several mappings. For instance to type a caron you can compose with a c in front (ce for ě etc), or with <e or with e<. Or you can use dead keys which also allow for intuitive mappings. The possibilities are many.

And Compose just keeps giving: You can also make symbols and combinations such as =/ for , oo for °, OE for Œ etc etc.

There is in sum no need to put accented letters on unintuitive mappings as a compromise. It's a bad idea and always was.

@Konfekt
Copy link
Author

Konfekt commented Nov 12, 2021

In an ideal world keyboards would default to the Colemak layout and have a compose key. In the world we live we build on their default Qwerty layout and Capslock key. For example, the Vim commands assume Qwerty and CapsLock is often used as Ctrl and Escape key.

@DreymaR
Copy link
Owner

DreymaR commented Nov 15, 2021

While this is true, it does not concern our discussion as I see it? I agree that CapsLock behavior should be left up to the user's preference, it's like a user configurable resource (that I happen to use for the extremely powerful Extend layer method).

However, as we were discussing layer mappings for accented letters I'll take the opportunity to point out another flaw with your preferred system: Using QWERTY, Colemak or another keyboard layout, which keys are below the vowels (for your accent aigu mappings) will be layout dependent and that will create further confusion! It's messy to base letter mappings on geometric ideas, in general. I do it only where I deem it absolutely necessary. My dead keys themselves weren't all possible to place by mnemonics, so the currency and greek dead keys just got AltGr+4/5 since those were available. But for the most part there's a good bit of sense to the madness!

@Konfekt
Copy link
Author

Konfekt commented Nov 20, 2021

If there is no compose key, how to compose the accented letters? If there has to be one, then which key has to be taken? The AltGr key presents itself. Still, while compositions are easily memorized, altgr-weur makes the point that common characters are easily reached by simultaneously hitting the AltGr character. I'd say compositions are for the majority of those who rarely type accented letters.

@DreymaR
Copy link
Owner

DreymaR commented Nov 22, 2021

If there is no Compose key, I use the Dead Keys found on my AltGr layers. For instance, AltGr+semicolon triggers the Umlaut DK. The addition of the Compose key to EPKL for Windows is fairly recent, so that's what I've been using all those years before.

The AltGr key isn't bad, and using a Wide ergo mod it's better still. I think it's good enough for something you use more rarely than the standard letters of your language, but not really good enough for letters you use more than, say, 1% of the time. While it isn't hard to use (with a Wide mod) it's still chording. That's my take on it. And as said before, you can't cram everything and the kitchen sink onto your AltGr layer since that'll lead to unintuitive mappings and you do want most AltGr mappings to be intuitive.

For a Compose key position, I use the ISO_102 key, which on my layout sits in the middle of the lower row. For an ANSI board without this key, I'd maybe use the key next to RAlt, since I also use the AltGr layers. It's harder to reach though, so maybe I'd use a trick to type Z instead and use the Z key as Compose, as that letter is fairly rare. As an example, the Z key could be Compose and AltGr+Z could be Z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants