Giter VIP home page Giter VIP logo

Comments (9)

39aldo39 avatar 39aldo39 commented on June 15, 2024

The error message says that there is a type error in $.customDeadKeys[0].stringMap[0]. The first element of "customDeadKeys" is the dead key "cedlhaFix" and the first element of "stringMap" is "c". It expects a tuple, but the "c" is a string. This is because "stringMap" contains a list of tuples, not just one tuple. You just need to add one more pair of square brackets. (See altgr_colemak.json for example.) You also need to reference to the custom dead key, so you probably want to replace acute with cdk:cedilhaFix.

from klfc.

ninrod avatar ninrod commented on June 15, 2024

Ah! yes I forget the tuples.

Ok, so instead of writing "baseChar": "'",, as I configured ' to be my deadkey acute, I need to really write baseChar: "acute". Is that what you are saying?

from klfc.

39aldo39 avatar 39aldo39 commented on June 15, 2024

No, your file should look like

{
  "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": [ "cdk:cedilhaFix", "\"" ] }
  ]
}

from klfc.

ninrod avatar ninrod commented on June 15, 2024

Ah, yes! Perfect. Will test that.

from klfc.

ninrod avatar ninrod commented on June 15, 2024

@39aldo39, this configuration actually breaks composing ' + c. With the above configuration you posted, if I run the generated dist/run-session.sh and then fireup google-chrome, the acute ' char does not behave as a deadkey: ' + c = 'c. If I change the cdk:cedilhaFix to acute, then it starts working again. But it generates a ć and not a ç as I wanted.

Also, the configuration portrayed in altgr_colemak does not use a baseChar field in the customDeadKeys entry. How does klfc knows what deadkey will produce the designed combinations?

Hum, am I wonder what am I doing wrong.

from klfc.

39aldo39 avatar 39aldo39 commented on June 15, 2024

The custom dead key does not work in Chrome because it uses GTK. It should work in xterm. By default, GTK uses a hard-coded Compose file and ignores custom ones. You need to add export GTK_IM_MODULE=xim to ~/.profile or ~/.bash_profile to make it work. See this KDE page.

Furthermore, a custom dead key creates a completely new dead key. It basically makes the baseChar a new dead key. So, in your case it will make acute a new dead key, which is different from the existing dead key dead_acute. Currently, it cannot based of an existing dead key, although I may add as a possibility. It is also possible to omit baseChar, in that case a Unicode character from the private use area is used.

from klfc.

ninrod avatar ninrod commented on June 15, 2024

hum, no success with the GTK_IM_MODULE hack. I tried the profile, bash_profile and even the /etc/environment aproach. my st terminal is behaving nicely though: ' + c produces ç.
EDIT: update, adding these lines to /etc/environment solves the problem:

GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla

EDIT2: I was wrong: do not use the cedilla module hack above as it breaks programs like thunar, darktable and inkscape. See the comments below.

Just to be sure: when klfc generates the dist folder, I have to execute both the install_system.sh script and the install_xcompose.sh script, right?

from klfc.

39aldo39 avatar 39aldo39 commented on June 15, 2024

It's weird that setting GTK_IM_MODULE to xim doesn't work. Setting it to cedilla does solve this case, but it doesn't if you want to add more bindings.

And yes, you have to execute both install-system.sh (as root) and install-xcompose.sh (as user). When you run install-system.sh as root, it will tell you to also execute install-xcompose.sh as user.

from klfc.

ninrod avatar ninrod commented on June 15, 2024

@39aldo39, actually I was plain wrong: the GTK_IM_MODULE=xim does fix the problem perfectly: I thought that restarting the x server was sufficient, but I had to actually reboot my machine for the new environment settings to kick in. Sorry for the confusion.

I believe the issue is settled, then. Thanks so much for all your help and for the program.

from klfc.

Related Issues (20)

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.