Giter VIP home page Giter VIP logo

klfc's People

Contributors

39aldo39 avatar andreineculau avatar ilyad avatar jmcwilliams403 avatar lf- avatar the0demiurge avatar wismill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

klfc's Issues

Support U+1234 notation for Unicode symbols?

It is customary to denote Unicode characters by U+[character code], but it seems klfc does not support this notation:

% klfc --from-json x --xkb y
klfc: parse fail in x: Error in $.keys[0].letters[0]: ‘U+2002’ is not a valid letter

Note that the character in this example is a kind of a space, so I would like not to insert it verbatim: it will hardly be clear for the reader what kind of space it is.

I also propose that there were a flag that allows writing json files with U+... format. Most fonts only support a narrow range of characters, so in many cases the more unusual characters would not show in any meaningful way.

Cancle latch status for modifier keys?

I am using latch: options for all my modifier keys. Sometimes I hit a modifier key by accident and want to cancel it. Is there anyway to do it in klfc? or it's not supported by xkb?

Thanks!

Export data types and parsers as a library?

I would like my build script to look inside the json files to see the names of the layouts. But, at the moment, it is not quite feasible. Perhaps you would consider moving some section of the code to a library, so that it can be integrated with other projects?

How to use xkb keycode for position for hiragana-katakana key?

I want to remap my hiragana-katakana key. According to the documentation, I should be able to use the xkb keycode w/o the brackets. If I understand correctly, I can get this from the evdev file:

» grep 101 /usr/share/X11/xkb/keycodes/evdev
        <HKTG> = 101;   // Hiragana/Katakana toggle

But If I have [ "HKTG", "PrintScreen" ] as a permutation, I get the error Error in $.mods[1].permutation[0]: ‘HKTG’ is not a valid position

What is the correct way to do this?

XKB: arrow keys from Extend layer behave differently than arrow keys in Base layer

XKB is so weird.

I've generated an Extend layer with KLFC (a while back). For some reason it never works with sufficient stability in KDE or XFCE, but works perfectly when installed to system in GNOME (in Ubuntu, Manjaro GNOME and Pop!_OS, always worked).

The problem at hand: "Proper" (base layer, normal) arrow keys will work for general navigation (e.g. Nautilus, highlighting stuff in GUI), but arrow keys from the Extend layer will not.

xev returns different key codes for each.

  • The proper Left will return keycode 113;
  • The Left from the Extend layer will return keycode 44, with a subsequent XKeysymToKeycode returns keycode:113 line.

I wonder if that's where the problem lies.

Any thoughts?

understanding the "singleton" keys entry

Hi @39aldo39. I have a file that has this entry

  "singletonKeys": [
    ["Alt_R", "Control"],
    ["CapsLock", "Escape"]
  ],

When I run the ./run-session.sh script, this works.

whey I run the install-system.sh (as root) and install-xcompose scripts and restart my machine, the configuration is not applied.

the results should be the same shouldnt they?

Simulating Control+w sometimes inserts a bunch of Ws

I have this in my config:

"shiftlevels": [ "None", "Shift", "AltGr", "Shift+AltGr", "Extend" ],
....
{ "pos": "W", "letters": [ "w", "W", "`", "~", "Control+w" ] },

I use Control+w for "backspace a word" functionality in a lot of applications. Most of the time this works fine, but maybe 5% of the time, after the deleting a word a bunch of ws will be continuously inserted (even though I'm not pressing any keys). It may also simulate C-w a few times and delete more than one word. (I'm using XKB)

further enrich the documentation adding a cedilla tweak example

@39aldo39, klfc is pretty important for non english speakers that must compose special characters through deadkeys. As a brazilian that uses us keyboards, this is specially important.

In OSx, this is a solved problem. In windows it is solved too. But in linux, we have a shortage of options when it comes to programs that allow the user to easily tweak his keyboard and klfc is really a god send. Even now, if you search for ways of how to achieve this in linux, you are directed to various hacks that solve the issue tangentially, while breaking other parts of the system.

That said, would you be willing to accept a PR that adds an example of how to configure a us keyboard to tweak the cedilla settings using the customDeadKeys options?

for example, It was not clear for me that I had to append the cdk:nameOfMyCustomDeadKey. Further, I don't understand yet what is the semantics of leaving out the baseChar field from the customDeadKeys entry.

run-session.sh errors

I've made my keyboard layout and installed it (with xkb), but when I try to run ./run-session.sh I get the following output:
Error: Unknown field Alt in a symbol interpretation
Definition ignored
Error: Unknown field NumLock in a symbol interpretation
Definition ignored
Error: symbols not defined in XkbWriteXKBSymbols
Output file "/tmp/temp.xkb" removed

I've also noticed that my layout name (BEAKL 15) has replaced the English(us) layout name, and that half of the variants that were there (in the English(us) layout) are now invisible when I select the newly named BEAKL 15 layout. (for example, dvorak is missing). I do see the missing layouts when I open the us symbols file, however.

This is the layout I've tried to add: (I can't upload .json, so .txt will do)
beakl.txt

Any ideas on how I could fix this? I feel like I've made some major mistake that ruined my xkb files or something, since uninstalling the layout doesn't seem to revert the second issue I had.

issues with 'cabal install'

Just pulled klfc on M1 macbook (can't use releases) and started building it locally with cabal (v3.6.2.0).

Some issues with aeson types and "no such file" had to be solved. Here's a patch to get things working again:

diff --git i/keyboard-layout-files-creator.cabal w/keyboard-layout-files-creator.cabal
index 2bc92f3..4136dac 100644
--- i/keyboard-layout-files-creator.cabal
+++ w/keyboard-layout-files-creator.cabal
@@ -6,6 +6,21 @@ license-file:   LICENSE.txt
 build-type:     Simple
 cabal-version:  >=1.2

+Extra-source-files:
+  files/pkl/pkl.exe,
+  files/xkb/run-session.sh,
+  files/xkb/install-system.sh,
+  files/xkb/uninstall-system.sh,
+  files/xkb/scripts/install-xcompose.sh,
+  files/xkb/scripts/uninstall-xcompose.sh,
+  files/xkb/scripts/add-layout-to-xml.py,
+  files/xkb/scripts/remove-layout-from-xml.py,
+  files/xkb/scripts/functions.sh,
+  files/xkb/scripts/add-models-to-xml.py,
+  files/xkb/scripts/remove-models-from-xml.py,
+  files/keylayout/install-user.sh,
+  files/keylayout/install-system.sh
+
 executable klfc
   hs-source-dirs:  src
   main-is:         Main.hs
@@ -57,7 +72,7 @@ executable klfc
                    containers,
                    unordered-containers,
                    vector,
-                   aeson >= 0.8.1.0,
+                   aeson >= 0.8.1.0 && < 2,
                    time >= 1.5,
                    mtl,
                    microlens-platform,
``

Extend xkb support

  1. Add support of ISO_Next_Group and ISO_Prev_Group that can be named NextLayout and PrevLayout. Being able to embed a toggle configuration into a layout is a great idea I think.
  2. Variants does't support fullName, while xkb can.
  3. If you assign to Return or Backspace level3-key, thay become unrepeatable.

Issue parsing KLC files, boolean conversion fails for complex layouts

MSKLC will use a bitmap for determining if a key is affected by CAPS LOCK. For shift, this will be a value 1, which properly parsed into a boolean true. A more complex layout like EurKEY has this flag set for the AltGr level as well, causing the value to be 4 or 5.

The parser seems to fail on any other value then 0 or 1.

understanding the customDeadKeys entry

hi @39aldo39,

I'm trying to fix the cedilla (ć) in my custom layout using klfc. For this I'm trying to use the customDeadKeys entry, like so:

$ klfc --from-json qwerty.json deadkeys.json --xkb $DIST

qwerty.json is just a standard qwerty layout. deadkeys.json is as follows:

{
  "singletonKeys": [
    ["Alt_R", "Control"],
    ["CapsLock", "Escape"]
  ],
  "shiftlevels": [ "None", "Shift" ],
  "customDeadKeys": [
    {
      "name": "cedilhaFix",
      "baseChar": "'",
      "stringMap": ["c", "ç"]
    }
  ],
  "keys": [
    { "pos": "~", "letters": [ "grave", "tilde" ] },
    { "pos": "6", "letters": [ "6", "circumflex" ] },
    { "pos": "'", "letters": [ "acute", "\"" ] }
  ]
}

I'm getting the error:

  klfc: parse fail in deadkeys.json: Error in $.customDeadKeys[0].stringMap[0]: expected (a, b), encountered String

but I cannot pinpoint my error following the documentation. Am I doing something wrong or maybe this is a bug?

I'm using the version that comes with the AUR as of 2017.07.20

thanks in advance for any help

Where to put mods?

If I add a permutation to my file, i get an error when running klfc --from-json .colemak-DH-custom.json --xkb xkb: klfc: parse fail in .colemak-DH-custom.json: Error in $: unknown key ‘permutation’. I've tried putting the default permutation right after name and I get the same error:

...
    "name": "colemak_dh_custom",
    "permutation": [
        [ "Y", "U", "I", "O", "P", "[" ],
        [ "H", "J", "K", "L", ";", "'" ],
        [ "N", "M", ",", ".", "/", "]" ],
        [ "]", "'", "\\" ]
    ],
...

It works fine if I remove the permutation. This happens even with the example colemak file, so it's not a problem with my specific configuration. I installed manually with cabal if it matters.

MSKLC does not accept LF line endings generated on Linux

no matter what i do, i cannot seem to get a klc file exported by klfc into msklc correctly without that (sadly nondescriptive) error
i have a json file in your format that i want to use, mainly in xkb (which works) and klc
i even imported a working klc file (after doing what was referenced in issue #29 ) into the json format, and then exported the json back into klc and it still does not work

this is the file i want to work (not the file i converted klc -> json -> klc):
us-refor.klc.txt
and yes, it's a modified version of US-International to suit my wants, oft-performed genre of keyboard layouts but i mean that layout is just such a good start so why not

apologies if this isn't the right place to ask

"dead key is not defined" when converting from .klc

When converting a certain .klc file (attached), I get the error klfc: warning: dead key ‘ְ’ is not defined., and the converted output files (also attached) do not contain the dead key definition. The dead key is definitely defined, on lines 95-102 of the input. I've attached my input file, as well as all of the output files produced by the conversion (which do not include the dead key).

he_phon.klc.txt (renamed to .txt to attach)
output.zip (zipped)

[Enhancement] Uninstall script

First of all, amazing piece of software, thanks for developing this. I'm using it to help a highly endangered regional language.

I have an enhancement suggestion, an uninstall script for generated (xkb) layouts would be a good addition. Most of the files the install scripts are easy to remove manually, except the base.xml and evdev.xml in-situ modifications.

I suppose similar scripts would also be beneficial for the other keyboard layout formats this software generates.

The `NONE_SHIFT_ALTGR_ALPHABETIC` keys are partially ignored by `xkbcomp`.

Description:

I am trying to build a customized fr(bepo) layout. You can see my source and build script
here.
Unfortunately, I discover that I cannot type ~, the tilde sign. I looked at the
compiled key map files and I discovered that keys that have type NONE_SHIFT_ALTGR_ALPHABETIC
lose their type when translated by xkbcomp, along with some of the mappings. See the relevant files:

  1. After converting json to xkb with klfc, the file xkb/symbols/kindaro-bepo:

         ...
         key.type[Group1] = "FOUR_LEVEL";
         key <AB04> { [       period,        colon,     ellipsis, periodcentered ] };
         key.type[Group1] = "NONE_SHIFT_ALTGR_ALPHABETIC";
         key <AB05> { [            k,            K,   asciitilde ] };
         key.type[Group1] = "FOUR_LEVEL";
         key <AB06> { [   apostrophe,     question, questiondown,    dead_hook ] };
         ...
    
  2. After invoking xkbcomp, the file xkm/kindaro-bepo.xkb:

         ...
         key <AB04> {
             type= "FOUR_LEVEL",
             symbols[Group1]= [          period,           colon,        ellipsis,  periodcentered ]
         };
         key <AB05> {         [               k,               K ] };
         key <AB06> {
             type= "FOUR_LEVEL",
             symbols[Group1]= [      apostrophe,        question,    questiondown,       dead_hook ]
         ...
    

An inspection reveals that all other keys of this type also lose the type.

Try it yourself:

The commit I linked above contains a build script. Clone, run, and you will have obtained these same
files.

My proposal:

It seems that xkbcomp does not recognize the type we want it to recognize. We can use
FOUR_LEVEL type instead and pad with NoSymbol.

Set umask in xkb's install-system and uninstall-system scripts

If the umask is set to something like 077 in /etc/profile for hardening purposes, running ./install-system.sh creates files unreadable by the user. Furthermore, on my system they also changed the permissions of the $xkbdir/rules/evdev file, which my DE did not like very much.
My suggestion would be to set the umask inside the generated scripts meant for linux.

Only AltGr and Shift as modifiers triggering action.

I'm new to xkb layouts, so my question may sound silly, but I having troubles understanding shift levels at all. As I get from docs, control and alt is supported modifiers. But if I edit those two lines in colemak layout from examples:

"shiftlevels": [ "None", "Shift", "Alt" ],

...

    { "pos": "J", "letters": [ "n", "N", "Left" ] },

then pressing Alt+n will trigger nothing. Same as if I added Control or Win to shiftlevels instead of Alt. The only modifier that triggers action is AltGr. Is that supposed behavior? Looking at examples I do see everywhere combinations of either Shift or AltGr and no other modifiers listed in docs, is this intentional? Or its smth wrong with my config that I get no action?

Chaining dead keys

Hello, I would like to use chained dead keys, but I do not manage to make it work. Is it supported?
For example, in the following simplified example I would like to obtain:

  • ~ + u : ú
  • ~ + ~ + u: ű

It does not work with AHK.

{
  "shiftlevels": [ "None", "Shift" ],
  "keys": [
    { "pos": "~", "letters": [ "cdk:test1" ] }
  ],
  "customDeadKeys": [
    {
      "name": "test1",
      "stringMap": [
        [ "cdk:test1", "cdk:test2" ],
        [ "u", "ú"]
      ]
    },
    {
      "name": "test2",
      "stringMap": [
        [ "u", "ű" ]
      ]
    }
  ]
}

dhall support

To me, this like a tool that could make good use of dhall instead of json as its own format.

parse from xkb fails

Parsing xkb in builds 1.4.3 and newer fails.
$ ./klfc --from-xkb "/usr/share/X11/xkb/symbols/us(basic)" --pkl PKL
klfc: parse fail in /usr/share/X11/xkb/symbols/us:2:21:
unexpected '{'
expecting '"'
Same command works just fine in builds 1.4.2 and older.

Build failures

Cloning the repo, switching to tag v1.5.6 and attempting to build cabal (by running cabal install) leads to the following error message:

Failed to build keyboard-layout-files-creator-1.5.6.
Build log (
/home/user/.cabal/logs/ghc-9.0.1/keyboard-layout-files-creator-1.5.6-7fca942ae05080a38a2c10ea78bf7257bf45d078a09aaa9ce8cad5ffb1603133.log
):
Configuring keyboard-layout-files-creator-1.5.6...
Preprocessing executable 'klfc' for keyboard-layout-files-creator-1.5.6..
Building executable 'klfc' for keyboard-layout-files-creator-1.5.6..
[ 1 of 40] Compiling JsonComments     ( src/JsonComments.hs, dist/build/klfc/klfc-tmp/JsonComments.dyn_o )
[ 2 of 40] Compiling JsonPretty       ( src/JsonPretty.hs, dist/build/klfc/klfc-tmp/JsonPretty.dyn_o )

src/JsonPretty.hs:139:91: error:
    • Couldn't match type: Data.Aeson.KeyMap.KeyMap Value
                     with: Data.HashMap.Internal.HashMap T.Text Value
      Expected: Data.HashMap.Internal.HashMap T.Text Value
        Actual: aeson-2.0.1.0:Data.Aeson.Types.Internal.Object
    • In the first argument of ‘H.toList’, namely ‘m’
      In the first argument of ‘pstSort’, namely ‘(H.toList m)’
      In the fifth argument of ‘fromCompound’, namely
        ‘(pstSort (H.toList m))’
    |
139 |     go (Object m) = fromCompound st ("{","}") delim (fromPair delims') (pstSort (H.toList m))
    |                                                                                           ^
cabal: Failed to build keyboard-layout-files-creator-1.5.6. See the build log
above for details.

The master branch also fails to compile with the following error message:

Failed to build keyboard-layout-files-creator-1.5.7.
Build log (
/home/user/.cabal/logs/ghc-9.0.1/keyboard-layout-files-creator-1.5.7-7a47f650a6a8a576b48f08b1d8a1800c1840aa8182f39eff83e99bd5ac487bd4.log
):
Warning: keyboard-layout-files-creator.cabal:75:39: version operators used. To
use version operators the package needs to specify at least 'cabal-version: >=
1.8'.
Configuring keyboard-layout-files-creator-1.5.7...
Preprocessing executable 'klfc' for keyboard-layout-files-creator-1.5.7..
Building executable 'klfc' for keyboard-layout-files-creator-1.5.7..
[ 1 of 40] Compiling JsonComments     ( src/JsonComments.hs, dist/build/klfc/klfc-tmp/JsonComments.dyn_o )
[ 2 of 40] Compiling JsonPretty       ( src/JsonPretty.hs, dist/build/klfc/klfc-tmp/JsonPretty.dyn_o )
[ 3 of 40] Compiling Paths_keyboard_layout_files_creator ( dist/build/klfc/autogen/Paths_keyboard_layout_files_creator.hs, dist/build/klfc/klfc-tmp/Paths_keyboard_layout_files_creator.dyn_o )
[ 4 of 40] Compiling Stream           ( src/Stream.hs, dist/build/klfc/klfc-tmp/Stream.dyn_o )
[ 5 of 40] Compiling Util             ( src/Util.hs, dist/build/klfc/klfc-tmp/Util.dyn_o )

src/Util.hs:83:20: error:
    • Couldn't match type ‘γ0’
                     with ‘(Maybe α -> σ0 -> σ0) -> (σ0 -> Maybe α) -> Lens' σ0 α’
      Expected: (σ0 -> α) -> γ0
        Actual: (σ0 -> α)
                -> (Maybe α -> σ0 -> σ0) -> (σ0 -> Maybe α) -> Lens' σ0 α
      Cannot instantiate unification variable ‘γ0’
      with a type involving polytypes:
        (Maybe α -> σ0 -> σ0) -> (σ0 -> Maybe α) -> Lens' σ0 α
    • In the first argument of ‘(∘)’, namely ‘lensWithDefault’
      In the expression: lensWithDefault ∘ const
      In an equation for ‘lensWithDefault'’:
          lensWithDefault' = lensWithDefault ∘ const
    • Relevant bindings include
        lensWithDefault' :: α
                            -> (Maybe α -> σ -> σ) -> (σ -> Maybe α) -> Lens' σ α
          (bound at src/Util.hs:83:1)
   |
83 | lensWithDefault' = lensWithDefault ∘ const
   |                    ^^^^^^^^^^^^^^^

src/Util.hs:83:20: error:
    • Couldn't match type ‘γ0’
                     with ‘(Maybe α -> σ -> σ) -> (σ -> Maybe α) -> Lens' σ α’
      Expected: α -> (Maybe α -> σ -> σ) -> (σ -> Maybe α) -> Lens' σ α
        Actual: α -> γ0
      Cannot instantiate unification variable ‘γ0’
      with a type involving polytypes:
        (Maybe α -> σ -> σ) -> (σ -> Maybe α) -> Lens' σ α
    • In the expression: lensWithDefault ∘ const
      In an equation for ‘lensWithDefault'’:
          lensWithDefault' = lensWithDefault ∘ const
    • Relevant bindings include
        lensWithDefault' :: α
                            -> (Maybe α -> σ -> σ) -> (σ -> Maybe α) -> Lens' σ α
          (bound at src/Util.hs:83:1)
   |
83 | lensWithDefault' = lensWithDefault ∘ const
   |                    ^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build keyboard-layout-files-creator-1.5.7. See the build log
above for details.

possible useful info:

  • ghc version: Glasgow Haskell Compiler, Version 9.0.1, stage 2 booted by GHC version 9.0.1
  • cabal version: cabal-install version 3.4.0.0 compiled using version 3.4.0.0 of the Cabal library
  • cabal configured to build link dynamically (in ~/.cobol/config)
library-vanilla: False
shared: True
executable-dynamic: True
program-default-options
  ghc-options: -dynamic

system: manjaro linux, ghc and cabal from the official repos

AUR build of the package klfc also fails:
cabal: unrecognised command: v1-sandbox (try --help)

The latest binary uploaded to github fails due to libffi.so.7 not being found (system only has version 8).

Edit: I also have the issue described in #39

Problems with rebinding modifiers

If i try to bind win to control in the singletonKeys section ([ "Win_L", "Control" ]), win doesn't do anything. The same happens if I try to bind shift to control. However, [ "Shift_L", "Control_R"] does work. Trying to bind win to any of the controls does not work though.

On a somewhat related note, if I try to bind another key to Win, I get an error that XKB does not support rebinding it. Is that correct? It seems a little strange since xmodmap supports rebinding keys to be super.

Space as modifier key without losing space functionality

I'm trying to make a layout where if you hold space, it activates the Extend layer, but if you tap space it'll just put a space. Is this possible with KLFC? I'm trying to export it as an xkb file when it's done, if that helps. Maybe I could manually edit something in the xkb files to add the functionality if it isn't supported by KLFC?

Bind a key to lock a modifier

XKB supports locking modifiers with LockMods. It would be nice if there was a way to bind a key to toggle arbitrary modifiers (besides capslock/numlock) using this.

Colemak example doesn't work on Debian GNU/Linux with X11

I tried to generate colemak layout for X11 by
../klfc colemak.json altgr_colemak.json extend.json -o blah using pre-compiled binary package version 1.5.2 on Debian stable. Despite some warnings it went well. Then I executed ./run-session.sh in blah/xkb .Below is the error message printed by xkbcomp. After that I manually edited the generated file colemak: removed XF86ScrollRight and similar fixes, see the diff below after the error message. Then I tried run-session.sh again. The 6 first messages (2 x Internal error + 4 x Error) disappeared, but X Error of failed request.... remained the same.

Any idea what I did wrong?

xtoo:/home/ilya/klfc-1.5.2/examples/blah/xkb > ./run-session.sh
Internal error: Could not resolve keysym XF86ScrollRight
Error: Button must specify default or be in the range 1..5
Illegal button value 6 ignored
Error: Illegal action definition for <AD02>
Action for group 1/level 6 ignored
Internal error: Could not resolve keysym XF86ScrollLeft
Error: Button must specify default or be in the range 1..5
Illegal button value 7 ignored
Error: Illegal action definition for <AC02>
Action for group 1/level 6 ignored
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 135 (XKEYBOARD)
Minor opcode of failed request: 9 (XkbSetMap)
Value in failed request: 0x16430005
Serial number of failed request: 132
Current serial number in output stream: 138``xtoo:/home/ilya/klfc-1.5.2/examples/blah2/xkb > ./run-session.sh

diff --git a/klfc-1.5.2/examples/blah/xkb/symbols/colemak b/colemak.changed
index cdbd263..3ae703b 100644
--- a/klfc-1.5.2/examples/blah/xkb/symbols/colemak
+++ b/colemak.changed
@@ -21,8 +21,8 @@ xkb_symbols "basic" {
key.type[Group1] = "NONE_SHIFT_ALTGR_SHIFT+ALTGR_EXTEND_ALPHABETIC";
key <AD01> { [ q, Q, adiaeresis, Adiaeresis, Escape ] };
key.type[Group1] = "NONE_SHIFT_ALTGR_SHIFT+ALTGR_EXTEND_SHIFT+EXTEND_ALPHABETIC";
- key <AD02> { [ w, W, aring, Aring, XF86ScrollUp, XF86ScrollRight ],
- actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), PtrBtn(button=4), PtrBtn(button=6) ] };
+ key <AD02> { [ w, W, aring, Aring, XF86ScrollUp ],
+ actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), PtrBtn(button=4) ] };
key.type[Group1] = "NONE_SHIFT_ALTGR_SHIFT+ALTGR_EXTEND_ALPHABETIC";
key <AD03> { [ f, F, atilde, Atilde, XF86Back ] };
key <AD04> { [ p, P, oslash, Oslash, XF86Forward ] };
@@ -44,8 +44,8 @@ xkb_symbols "basic" {
actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), SetMods(mods=Alt) ],
vmods=Alt };
key.type[Group1] = "NONE_SHIFT_ALTGR_SHIFT+ALTGR_EXTEND_SHIFT+EXTEND_ALPHABETIC";
- key <AC02> { [ r, R, dead_grave, VoidSymbol, XF86ScrollDown, XF86ScrollLeft ],
- actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), PtrBtn(button=5), PtrBtn(button=7) ] };
+ key <AC02> { [ r, R, dead_grave, VoidSymbol, XF86ScrollDown ],
+ actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), PtrBtn(button=5) ] };
key.type[Group1] = "NONE_SHIFT_ALTGR_SHIFT+ALTGR_EXTEND_ALPHABETIC";
key <AC03> { [ s, S, ssharp, VoidSymbol, Shift_L ],
actions[Group1] = [ NoAction(), NoAction(), NoAction(), NoAction(), SetMods(mods=Shift) ] };

XKB layout undetected when installed, works fine only via run-session.sh

I have a keyboard layout which when compiled into XKB and installed via install-system.sh goes undetected and is not usable (files are copied in /usr/share/X11/xkb/ correctly by the script, and Xorg is restarted just in case).
The same layout works fine via run-session.sh. Other keyboard layouts created with klfc also work fine even when installed.

I suspected the use of modifying characters to be the problem, but even when they are removed, the exact same problem persists. The json description looks fine to me, and the generated symbols file as well. So I don't know why this doesn't work. Is there something that breaks klfc in the layout description?

klfc versions tried: 1.5.1, 1.5.0, 1.4.4
OS: Fedora 27, Fedora 26


EDIT: The non-released change in commit 67198cf appears to fix my problem.

Not happy with my beautiful json.

Hi

Am trying to write your format file from KLA json.

It would be convenient to specify all 4 slots on a key at the same time, even if some are empty.

Your program does not like my input, but I can't see what the error is.

Error in $: Failed reading: Cannot decode input: Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream. Expecting object value at ',,,]},'
zxcv-fingers.en.ansi.txt

Any ideas?

Thanks, Ian

OEM_102 not present

I had to do this after generating my klc file. This is a bug I think. The left | key didn't show up first. After modifying the second OEM_5 instance to OEM_102 everything worked as planned.

diff --git a/altgr-weur.klc b/altgr-weur.klc
index a093400..431bea8 100644
--- a/altgr-weur.klc
+++ b/altgr-weur.klc
@@ -59,7 +59,7 @@ LAYOUT
34 OEM_PERIOD 0 002e 003e 0153 0152 // QWERTY .: ., >, œ, Œ
35 OEM_2 0 002f 003f 00bf 002f@ // QWERTY /: /, ?, ¿, cdk:stroke
2b OEM_5 0 005c 007c e000@ 00a6 // QWERTY : , |, cdk:greek, ¦
-56 OEM_5 0 005c 007c e001@ 00a6 // QWERTY Iso: , |, cdk:greek, ¦
+56 OEM_102 0 005c 007c e001@ 00a6 // QWERTY Iso: , |, cdk:greek, ¦

DEADKEY 0060 // grave

AUR build fails

I tried building the AUR with yay and with makepkg -si, but it fails, and I'm getting this output in the build phase:

==> Starting build()...
Warning: The update command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-update command
or the legacy v1-update alias as new-style projects will become the default in
the next version of cabal-install. Please file a bug if you cannot replicate a
working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Downloading the latest package list from hackage.haskell.org
To revert to previous state run:
    cabal update --index-state='2018-10-26T21:37:11Z'
Warning: The install command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-install
command or the legacy v1-install alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Resolving dependencies...
Starting     containers-0.5.11.0
Building     containers-0.5.11.0
Failed to install containers-0.5.11.0
Build log ( /home/albin/.cabal/logs/ghc-8.6.1/containers-0.5.11.0-JCGpMMgDKZFBabcPOY6x1w.log ):
cabal: Entering directory '/tmp/cabal-tmp-32252/containers-0.5.11.0'
Configuring containers-0.5.11.0...
Preprocessing library for containers-0.5.11.0..
Building library for containers-0.5.11.0..
[ 1 of 35] Compiling Utils.Containers.Internal.BitUtil ( Utils/Containers/Internal/BitUtil.hs, dist/build/Utils/Containers/Internal/BitUtil.o )

Utils/Containers/Internal/BitUtil.hs:33:8: error:
    Could not find module ‘Prelude’
    There are files missing in the ‘base-4.12.0.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
33 | module Utils.Containers.Internal.BitUtil
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Utils/Containers/Internal/BitUtil.hs:41:1: error:
    Could not find module ‘Data.Bits’
    There are files missing in the ‘base-4.12.0.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
41 | import Data.Bits ((.|.), xor)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Utils/Containers/Internal/BitUtil.hs:43:1: error:
    Could not find module ‘Data.Bits’
    There are files missing in the ‘base-4.12.0.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
43 | import Data.Bits (popCount, unsafeShiftL, unsafeShiftR)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Utils/Containers/Internal/BitUtil.hs:48:1: error:
    Could not find module ‘Data.Bits’
    There are files missing in the ‘base-4.12.0.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
48 | import Data.Bits (finiteBitSize)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/tmp/cabal-tmp-32252/containers-0.5.11.0'
cabal: Error: some packages failed to install:
containers-0.5.11.0-JCGpMMgDKZFBabcPOY6x1w failed during the building phase.
The exception was:
ExitFailure 1
containers-unicode-symbols-0.3.1.1-LaR6volD3qk9CSSp0HHVJX depends on
containers-unicode-symbols-0.3.1.1 which failed to install.

==> ERROR: A failure occurred in build().
    Aborting...

ghc-pkg check only lists missing html docs and the build log file is the same as the output.

Wrong chevrons when using X Keyboard Extension format.

There are 2 pairs of chevrons in Unicode: U+27E8 U+27E9 and U+2329 U+232A. The latter are deprecated and have wrong width. (Scroll down to the end of the section.)

When I put the good chevrons in my configuration, wrong chevrons are actually bound by the generated X Keyboard Extension files.

My source looks like this:

    ...
    { "pos": "8", "letters": [ "-", "8", "−", "\u27E8" ] },
    { "pos": "9", "letters": [ "/", "9", "÷", "⟩" ] },
    ...

The generated symbols file looks like this:

    ...
    key <AE08> { [        minus,            8,        U2212, leftanglebracket ] };
    key <AE09> { [        slash,            9,     division, rightanglebracket ] };
    ...

Why leftanglebracket and rightanglebracket denotations are expanded to the obsolete pair of chevrons is a question in itself, but I have no idea where to post that issue. A solution that works for now is to denote the desired symbols by their Unicode numbers, like this:

    ...
    key <AE08> { [        minus,            8,        U2212, U27E8 ] };
    key <AE09> { [        slash,            9,     division, U27E9 ] };
    ...

Every time I regenerate the files, I must patch them again, so this is not a long term solution.

How should we approach this problem?

  1. I propose that we find the upstream of the symbolic ...anglebracket denotations and ask them to put forward an update. By chance you have a suggestion who that might be? The xkbcommon people?
  2. In the meanwhile, a temporary fix could be put in place. We may emit the Unicode numbers for the chevrons instead of the symbolic denotation.
  3. Possibly we could give the user the power to decide whether to prefer symbolic or numeric denotations? Although I am not sure how that may look ideally, but as a first approximation, a switch to emit numeric denotations exclusively may be good. Actually, is there any reason to emit symbolic denotations, beside human readability?

Update/fix klfc-bin in AUR

After a system update, it looks like the run-session.sh script is no longer working, and I cannot regenerate the XKB configuration because klfc is not working either:

klfc: error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory

I wasn't able to build it manually with cabal either. It would be nice to have a new binary for 1.5.7 and an updated pkgbuild for klfc-bin.

binding Extend to Alt_R produces Error

If I use singletonKeys as follows
"singletonKeys": [ [ "Alt_R", "Extend" ] ],
It produces following error logs
Error: Key <MDSW> added to map for multiple modifiers Using Mod3, ignoring Mod5.

If I bind to CapsLock instead of Alt_R, it works fine.
I am generating XKB layout
I still want to bind Extend to Alt_R, is there anything else I can try?

Thanks

parse from xkb fails

> klfc --from-xkb "fr(bepo)" --json test
klfc: parse fail in ./fr:2:21:
unexpected '{'
expecting '"'

hello, i've got an error when i try to convert my layout (bepo) to a json (i've got this error with the version 1.5.3 and 1.5.4). I've seen that this error was resolve with 3da71c3

Thanks in advance

Contribution: Keyboard Layout Editor .json generator

I like your .json format very much, it's well documented and makes it so much easier to work with complex layouts. I'm thinking of adding a Python CLI utility ('klfc-kle', for example) which would generate a KLE .json that could be uploaded to KLE (http://www.keyboard-layout-editor.com/) for easier visualization or to KLE-Render (https://kle-render.herokuapp.com/) for exporting images and such. The syntax I'm thinking would be something like

klfc-kle [options] -f [KLFC .json file] -o [output path, default ./]

something like

klfc-kle --keyboard iso --key-color #ffffff --label-color #000000 --label-size 3 -f colemak.json -o ~/klfc/

and/or shortened to

klfc-kle -kb iso -kc #ffffff -lc #000000 -ls 3 -f colemak.json -o ~/klfc/

Would you accept such a PR?

xkb: warnings with example

examples/output/xkb/run-session.sh
Warning:          Unsupported high keycode 372 for name <I372> ignored
                  X11 cannot support keycodes above 255.
                  This warning only shows for the first high keycode.
Internal error:   Could not resolve keysym XF86ScrollRight
Error:            Button must specify default or be in the range 1..5
                  Illegal button value 6 ignored
Error:            Illegal action definition for <AD02>
                  Action for group 1/level 6 ignored
Internal error:   Could not resolve keysym XF86ScrollLeft
Error:            Button must specify default or be in the range 1..5
                  Illegal button value 7 ignored
Error:            Illegal action definition for <AC02>
                  Action for group 1/level 6 ignored

I haven't run into any real issues, but the warnings are annoying

edit: this is with the 1.5.3 release downloaded off github

Converting from KLC gives "is not supported on the shiftstate" on all shiftstate characters

I am trying to install the following weird Russian layout on linux: https://kbdlayout.info/NorKyril/download/klc

I am converting from klc to xkb

$ ./klfc/klfc --from-klc norkyril.klc -o output2/
klfc: warning: uknown line ‘["ATTRIBUTES"]’.
klfc: warning: uknown line ‘["ALTGR"]’.
klfc: warning: the letter ‘і’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘ц’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘ш’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘е’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘р’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘т’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘й’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘у’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘и’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘о’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘п’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘џ’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘cdk:ь’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘cdk:'’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘а’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘с’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘д’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘ф’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘г’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘х’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘я’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘к’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘л’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘ё’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘э’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘ж’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘з’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘ю’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘ч’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘в’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘б’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘н’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘м’ is not supported on the shiftstate ‘None’ in TMK.
klfc: warning: the letter ‘І’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘¤’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘cdk:`’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Ц’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Ш’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Е’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Р’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Т’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Й’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘У’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘И’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘О’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘П’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Џ’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘cdk:Ь’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘꙳’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘А’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘С’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Д’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Ф’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Г’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Х’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Я’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘К’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Л’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Ё’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Э’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Ж’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘З’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Ю’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Ч’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘В’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Б’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘Н’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘М’ is not supported on the shiftstate ‘Shift’ in TMK.
klfc: warning: the letter ‘ї’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:Ӏ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘£’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘€’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘₴’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѫ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ꚙ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ԛ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ԝ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:̧’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:́’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѕ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘щ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘є’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘₽’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ɯ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ү’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ў’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѵ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ө’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѱ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѡ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:̈’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:̄’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ӕ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ә’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѳ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ґ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘һ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ј’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѯ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ԓ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ꚃ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ҍ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ꙙ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ԑ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ѧ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ҽ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ꙫ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ẟ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ԩ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘ӎ’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘№’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:̇’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:̑’ is not supported on the shiftstate ‘Alt+Control’ in TMK.
klfc: warning: the letter ‘Ї’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘ӏ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:Х’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:З’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘ѣ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѣ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѫ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ꚙ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘꙯’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѕ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Щ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Є’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘₮’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘₸’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ү’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ў’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѵ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ө’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѱ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѡ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘̃’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘҃’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ӕ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ә’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘cdk:Ԁ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѳ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ґ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Һ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ј’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѯ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ԓ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ꚃ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ҍ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ꙙ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ԑ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ѧ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ҽ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ꙫ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘ꙮ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ԩ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘Ӎ’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.
klfc: warning: the letter ‘꙾’ is not supported on the shiftstate ‘Shift+Alt+Control’ in TMK.

I have made use the file is in UTF-8, and using windows line ends.
I run both the install-system.sh script and the scripts/install-xcompose.sh script, as sudo.

I cannot access any of the characters it printed in the log.

MS KLC 1.4 support?

Apologies if I've missed a setup option here, but I was looking to go from KLC -> JSON, and if i load any existing keyboard layout in KLC 1.4, save it, then attempt to parse it with klfc i get an error:

Active code page: 65001 klfc.exe: .\uk.klc: hGetContents: invalid argument (invalid byte sequence)

Having a quick look at the exported KLC examples, there appears to be a few more columns in the KLC file I created versus the example (see attached, generated by loading the existing UK keyboard layout).

uk.klc.txt

Variants and Mods not showing

Hi,

I hope this isn't a stupid question, but I can't grasp how to use modifiers and variants.

For testing I tried to get a Colemak layout with the DH-mod variant and a wide mod by running:

$klfc colemak.json mods.json --xkb xkb-out

and then installing via the provided install-system.sh script.

But when selecting Colemak layout in my GUI layout options (KDE Plasma 5.12) it doesn't show variants:

keyboard

Same result in the command line:

$localectl list-x11-keymap-variants | grep colemak
$colemak

What am I doing wrong here?

Add Yen and Ro support for klc

Yen and Ro are currently marked as unsupported for klc, however a conversion from the Japanese klc shows these keys as:

    { "pos": "VolumeUp", "shortcutPos": "Iso", "letters": [ "\\", "_", "\u001c" ], "capslock": false },
    { "pos": "Win_L", "shortcutPos": "\\", "letters": [ "\\", "|", "\u001c" ], "capslock": false },

So Ro is somehow showing as VolumeUp and Yen as Win_L.

Either there are some issues in how these are handled, or they need to be turned into aliases for klc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.