Modify sticky behavior in Onboard layout config file

Asked by Cyril C.

Hi guys !

I'm kinda stuck with a small issue when trying to write a .onboard file. I would like to modify the "sticky" behavior of my shift keys so that one cannot lock them, because it causes a running program to misbehave.

If I understood well the answer of the question #208233, that can be done using the "latch" value for some attribute. My issue is that I have no idea which attribute it's related to. I have been looking for it for some time, but have not been successful so far.

Would somebody know ?

Thanks in advance !

P.S. : To be very clear, I am looking for the #attribute# in the following code :
<key group="shifts" id="RTSH" label="⇧" label_x_align="0.0" modifier="shift" sticky="true" #attribute#="latch"/>

Question information

Language:
English Edit question
Status:
Solved
For:
Onboard Edit question
Assignee:
No assignee Edit question
Solved by:
marmuta
Solved:
Last query:
Last reply:
Revision history for this message
Francesco Fumanti (frafu) said :
#1

Hi,

Thanks for your interest in Onboard.

I don't know whether it is possible to change that behaviour by defining it in the layout files.

But there is a popup menu in the Preferences of Onboard to set the locking behaviour of the modifiers. Please, have a look at the Advanced tab of the Keyboard section in the Preferences of Onboard.

Cheers,

Francesco

Revision history for this message
Cyril C. (cosinus1989) said :
#2

Hi Francesco,

First of all, thanks for your answer.

Does that "Keyboard section" existed in the 0.97 release ? That's the only one I've installed so far, and I can't see anything like that in Onboard preferences :/

Thanks in advance !

Cyril

Revision history for this message
Francesco Fumanti (frafu) said :
#3

Hi,

I was not aware that you were still running onboard version 0.97.x. In the meantime, the Onboard Preferences dialog has been redesigned and I don't remember whether the popup to change the behaviour of the modifiers was already available in the Preferences dialog.

If you cannot find the popup in the Preferences dialog, you can also set the gsettings key corresponding to the modifier behaviour by using the gsettings command line key.

If you want to change the behaviour of the modifiers for all the users of your system, you might want to install the system-defaults.conf file for Onboard. For instructions, please have a look at the system-defaults.conf.example file that should have been installed with the onboard package on your system.

You can find the current stable version (0.99.0) of Onboard in our PPA for Ubuntu precise and upwards. But since you are still using Onboard 0.97, I suppose that you are either running an older version of Ubuntu or a different distribution.
https://launchpad.net/~onboard/+archive/stable

Cheers,

Francesco

Revision history for this message
Cyril C. (cosinus1989) said :
#4

Hi !

Well, I'm actually running under Ubuntu 12.04 LTS, and it seems the latest version you can get from apt-get is the 0.97.

I've actually tried 3 ways of doing it, and I'm quite saddened to say none of them has worked so far :'(

First I've tried to edit and configure the file called "onboard-defaults.conf" in /usr/share/onboard, by replacing the line
       sticky-key-behavior={"all" : "cycle"}
by
        sticky-key-behavior={"all" : "cycle", "modifiers" : "latch"}

As it didn't give any result, I tried and use the command I found on another thread :
        gsettings set org.onboard.keyboard sticky-key-behavior "{'all': 'cycle', 'modifiers': 'latch', 'NMLK': 'cycle'}"
I just tried and run it in a terminal window, and as I'm not really a Linux expert, I'm not quite sure I did it right. Should it be run in a particular folder or something ? At the moment it just prompts me this error :
        No such schema 'org.onboard.keyboard'

Finally I tried and install the latest version of Onboard (0.99.0) on my 12.04, but my snake doesn't like it. It requires at least Python 3.x, right ? That was released after Ubuntu 12.04, and it causes my terminal to display :
       bash: /home/user/supplycube/trunk/install/Config_clavier_virtuel/onboard-0.99.0/setup.py: /usr/bin/python3: bad interpreter: No such file or directory

Feel free to tell if I've done anything wrong ! As I said I'm not a Linux expert, so I might have just done a stupid mistake...

Revision history for this message
Best marmuta (marmuta) said :
#5

Hi Cyril,
Onboard 0.97 had its settings in a different gsettings path at apps.onboard, this is why the command from question #208233 failed. I think what you are looking for is
$ gsettings set apps.onboard.keyboard sticky-key-behavior "{'all':
'cycle', 'RTSH': 'latch', 'LFSH': 'latch'}"

RTSH and LFSH are the key ids of right and left shift keys. Key ids are the same ones used in the Onboard's layout files, e.g. in 'Full Keyboard.onboard'. 'modifiers':'latch' would remove locking from the whole group of modifiers, i.e. all shift, ctrl, alt and super keys.

You can set the key in onboard-defaults.conf like above, but it is applied only when Onboard never ran before or after
$ gsettings reset apps.onboard use-system-defaults

Onboard 0.99 should mostly work on Precise. You're probably just missing some dependencies. I think you tried to install from source, this is fine, but getting it from our PPA is easier.
https://launchpad.net/%7Eonboard/+archive/stable
If you still want to install from source let me know and I'll walk you through it.

Remember, for 0.99 you'll have to change the gsettings path of the above commands from apps.onboard to org.onboard.

Revision history for this message
Francesco Fumanti (frafu) said :
#6

Hi,

Marmuta, thanks for your help.

@ Cyril

Marmuta is right: it will be easier if you install Onboard 0.99.0 from our PPA.
https://launchpad.net/~onboard/+archive/stable
You might however have to also enable the "Recommended updates" for precise to get the necessary dependencies. You can do it from the Settings->Repositories menu in the Synaptic Package Manager.

There is also a GUI for looking and setting the gsettings keys. It is called dconf-editor and gets installed by the dconf-tools package available in the Universe repository, that you can also enable by using the Synaptic Package Manager.

Finally, one additional remark: the popup setting for the behaviour of the modifiers in the Preferences of Onboard 0.99.0 applies to all the modifiers. This probably is not fine grained enough. Thus, marmuta's gsettings command from message 5 might be more appropriate for your needs.

Cheers

Revision history for this message
Cyril C. (cosinus1989) said :
#8

Hi guys !

Well, thanks marmuta, that command line did work !

For the moment I'm not gonna switch to 0.99 since everything work quite perfect, but it might be done at some point.

Anyway thanks a lot for the help guys, that's really nice to get answers that quickly and that helpful !

Just want to finish saying this little tool you're developing is awesome, keep on with the good work :) !

Cyril

Revision history for this message
Francesco Fumanti (frafu) said :
#9

We are glad that you like Onboard.

The Onboard team.