• You are not logged in.
  • Index
  • Technical
  • Some technical questions for Dreymar (and anybody )

    Some technical questions for Dreymar (and anybody )

    • Started by pieter
    • 6 Replies:
    • Reputation: 2
    • Registered: 25-Oct-2013
    • Posts: 136

    Hi Dreymar and others! If this is somewhere, please point me to it! I've reasd and searched for a long time, now would like to ask some questions....

    - how put multiple characters in xkb ? I edit the symbols file,  I would like , to print ,[space] in other words, have the space already in it. Can this be done in xkb?

    - similarly: I'd like the same effect as my Android smartphone: a period will give period [space][sticky shift]

    - layers: are layers sticky? in the sense that I hit the layer button once and I get into the layer, until I hit it again? OR.... do I have to keep the layer modifier pressed ?

    That's it for now! Thank you!

    Offline
    • 0
    • Reputation: 0
    • Registered: 04-Apr-2013
    • Posts: 538
    pieter said:

    - layers: are layers sticky? in the sense that I hit the layer button once and I get into the layer, until I hit it again? OR.... do I have to keep the layer modifier pressed ?

    Depending on your window manager desktop environment, there should be an option for "sticky keys" and, in xfce's case, "lock sticky keys" (edit: doesn't seem to work for me, gah!). 

    For xfce, though, it seems to be "all modifiers or nothing"; I'd like to find a way to make only shift sticky.

    Last edited by lalop (23-Jul-2014 12:10:11)
    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361

    Layers aren't sticky in XKB, but modifiers can be. If you check out the symbols file for a modifier you'll find variants for 'switch', 'latch' and 'lock' behavior; the 'latch' option makes the modifier "sticky" while 'switch' is like a normal shift key. You can make your own variants in the modifier files, or just include the desired behavior with your layout description (which is practical for your own purposes but not the right way to go if you want to publish your stuff).

    As for "ligatures" as it's sometimes called, hmmm, I don't quite remember. My problem has been that I want ligatures from dead keys and neither MSKLC nor PKL support it. Both support them on main mappings (in theory) though. Why don't you just try it?

    There's an interesting forum post about the various platforms and possibilities here:
    https://forum.colemak.com/viewtopic.php … 988#p11988

    Last edited by DreymaR (23-Jul-2014 10:31:20)

    *** 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

    @lalop xkb& Dreymar, thank you both. I would prefer to have the window manager ...eh .... manage windows and implement general keyboard layouts in xkb. Actually, my preference would be:
    1. In the firmware (only possible with programmable firmware in a keyboard, not doable in a laptop. Too bad!).
    2. In the operating system, so that it works whether I am in X or not
    3. In X (xkb in this case)
    4. In the Window manager. Problem is I switch from time to time, my favorites are openbox, xfce and herbstluftwm. So I would have to implement it several times, and watch out for conflicts with other hotkeys....
    5. In background running applications, such as autokey or (in windows) autohotkey. This is OK but it feels like a hack
    6. In individual applications (firefox, vim etc.). I don't want to go here....

    Time for study I guess :-)

    Offline
    • 0
    • Reputation: 7
    • Registered: 21-Apr-2010
    • Posts: 818

    @pieter, you should specify your current environment/setup/layout.

    I think @lalop meant to say Desktop Environment rather than Window Manager. 

    This arch link about keyboard configuration is quite a good overview:
    https://wiki.archlinux.org/index.php/Ke … on_in_Xorg

    --
    Physicians deafen our ears with the Honorificabilitudinitatibus of their heavenly Panacaea, their sovereign Guiacum.

    Offline
    • 0
    • Reputation: 0
    • From: Malmö, Sweden
    • Registered: 10-Sep-2012
    • Posts: 122

    What you seem to be for requires a certain degree of logic. How would XKB know that you are trying to enter ... and not ending a sentance, in which case it would be . . . , or heck how would it know you are not trying to execute a file in bash like: ./run , well it won't so you can't expect something as low level as XKB to do this for you.

    You shouldn't expect any window manager to provide functions like these even though many are capable of remaping a single key to enter a couple of characters (or words, email adresses, whatever), but then again this is not a job for a WM or a DE if you are using one.

    Autokey was designed exactly for this purpose. It would indeed feel like a hack if you are using autokey or autohotkey to remap capslock to backspace, because they are inteded to do complex expansions/replacements. I haven't messed with autokey too much, but I think it can do exactly what you want it to do and is quite easy to understand (that is, compared to all other keyboard remapping software).

    Last edited by vaskozl (03-Aug-2014 20:29:57)

    Posted without the aid of a rodent.

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

    Thanks Pinkyache and Vaskozl. My Linux setup is Archlinux with Openbox and Herbstluft as windowmanagers. The point vaskozl raises is real: if you have many keybindings (on different levels), you may run into conflicts ......

    I did look into Autokey, it is indeed interesting ! I do wish it was more like the (Windows) Autohotkey though ...... btw, I typed this post using my own custom layout, which has a whopping ONE letter in common with qwerty: the A..... the typing took me only 10 minutes or so .....     :-(    ;-)

    Offline
    • 0
      • Index
      • Technical
      • Some technical questions for Dreymar (and anybody )