Giter Site home page Giter Site logo

Comments (10)

grwlf avatar grwlf commented on August 28, 2024

Hi! Just to be clear.. do you mean 'layouts' when talking about keyboards? Or you really has several keyboards attached to one computer (never tested this case).. Could you please provide me with the output of xkb-switch -x ? It should print your layout string as reported by X.

from xkb-switch.

BUGgs avatar BUGgs commented on August 28, 2024

Yes, because my users can have different keyboard connected to the device (of course, not at the same time)... So they just have to change the active layout to the one that is connected on the device.... In general 3 differents keyboard are enough... But it's the same with 4... Here in my example, I've put French, German, US-Intl, Spanish with Spanish by default... Same issue... French and US-Intl are mixed... Here is xkb-switch -x output:
pc+es+fr(winkeys):3+us(intl):2+de:4+inet(evdev)+group(ctrl_shift_toggle)
My target is to find the active one with xkb-switch (not to change them)

from xkb-switch.

grwlf avatar grwlf commented on August 28, 2024

Ok, how do you change the active keyboards? Physically unplug the old one (say, French) and plug another (say, German)?

from xkb-switch.

BUGgs avatar BUGgs commented on August 28, 2024

I will explain better... I have around 1.000 Linux devices... Some of them are with French Keyboard, some of them are with a German Keyboard, etc... And sometimes, user can swap physically the keyboard themselves...
So, to have an easy way to handle the multiple keyboards, all different keyboard are configured in Ubuntu/XFCE, with one by default... Like German...
When a user is coming on a device, if the active keyboard isn't the same that the physical, he is using the keyboard shortcut CTRL+SHIFT to change the active keyboard to the one a want...
And this is were the issue is... Sometime, the result of xkb-switch is wrong...

from xkb-switch.

grwlf avatar grwlf commented on August 28, 2024

Ok, I have an idea. Here is your XKB string.

pc+es+fr(winkeys):3+us(intl):2+de:4+inet(evdev)+group(ctrl_shift_toggle)

pc , es , fr , us are actually filenames somewhere in xkb config database. The meaning of :2 :3 :4 parts were unclear to me so xkb-switch currently ignores them. All examples I saw so far had those numbers strictly increasing. But in your case they are mixed ( 3-2-4). May be they are index hints in the layout array.. Could you remove us(intl), readd it, then post the output of xkb-switch -x once again to see what has changed?

from xkb-switch.

grwlf avatar grwlf commented on August 28, 2024

The questions are: 1) Are those numbers reflects the order in which user adds their layouts to the system 2) Does xkb-switch work correctly in your situation if the numbers are increasing..

from xkb-switch.

BUGgs avatar BUGgs commented on August 28, 2024

Hi, I removed us(intl) and put German as default and here is xkb-switch -x output:
pc+de+fr(winkeys):2+es:3+inet(evdev)+group(ctrl_shift_toggle)
In this case, xkb-switch is detecting correctly the active keyboard for all layout...

from xkb-switch.

grwlf avatar grwlf commented on August 28, 2024

Well. Probably, numbers are hints indeed so, as a workaround, you can try to setup your layouts so that the numbers increase. I'll try to find out how they really work and make xkb-switch to take them into account.

from xkb-switch.

ierton avatar ierton commented on August 28, 2024

Hi, @BUGgs ! Could you please re-test the application? We have redesigned the X11-driver code, it may fix your issue.

from xkb-switch.

grwlf avatar grwlf commented on August 28, 2024

I am closing this one due to timeout.. Please, reopen if the problem is still here.

from xkb-switch.

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.