Choose style:

Author Topic: Multiple Keyboard Layout Switcher  (Read 1390 times)

0 Members and 1 Guest are viewing this topic.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 19091
  • Karma: 2199
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin (64bit)
Multiple Keyboard Layout Switcher
« on: December 17, 2016, 09:10:42 pm »
Multiple Keyboard Layout Switcher - For Peppermint 7

Open a terminal and run this command:
Code: [Select]
sudo apt-get install xfce4-xkb-plugin
once finished, close the terminal.

Next download ONE of these 2 packages depending on your architecture

For 64bit Peppermint 7
https://launchpad.net/~peppermintos/+archive/ubuntu/p7-dev/+files/xfce4-settings_4.12.0-2ubuntu1+peppermint1_amd64.deb

For 32bit Peppermint 7
https://launchpad.net/~peppermintos/+archive/ubuntu/p7-dev/+files/xfce4-settings_4.12.0-2ubuntu1+peppermint1_i386.deb

and double-click it to install .. and when it warns you there's an older version in the repos, just accept this version and click the "Install" button

Once installed, right-click on a blank part of the bottom panel (aka. taskbar), and select:-

Panel > Panel Preferences > Items (tab)

Click the Add button (+) .. highlight the "Keyboard Layouts" item, and click the "Add" button.
(You'll see a flag appear by your clock)
click the "Close button.

At this point you can use the arrow buttons to move the flag to wherever you want on the panel .. once you have it where you want it, close the panel preferences.

Now right-click the flag by your clock and select "Keyboard Settings"

Choose the "Layout" tab

Untick "Use system defaults"

You can now add keyboard layouts with the "Add button"

When you have more than one layouts added, go to the "Layout" tab, and make sure you have a keyboard shortcut defined under "Change layout option" (I use Alt+Shift but choose whatever you like)

Now test that keyboard shortcut works.

If it does, from now on clicking on the flag in the system tray (by the clock) should also cycle you through your chosen keyboard layouts.
« Last Edit: April 09, 2017, 07:18:03 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline pehoko

  • Jr. Member
  • **
  • Posts: 33
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 7
Re: Multiple Keyboard Layout Switcher
« Reply #1 on: January 03, 2017, 09:13:04 am »
Thanks for good explanation.
« Last Edit: January 03, 2017, 09:18:09 am by pehoko »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 19091
  • Karma: 2199
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #2 on: January 03, 2017, 09:34:20 am »
You're most welcome pehoko :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 36
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #3 on: January 24, 2018, 03:51:45 am »
Hi,

how do I add a keyboard layout the Switcher doesn't have in it's list? For example adnw (a layout for german and english) is in /usr/share/X11/xkb/symbols/de by default, but the Switcher doesn't show it.

Obviously it would be nice if the switcher could automatically read the content of /usr/share/X11/xkb/symbols when I want to add a new layout.




Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 19091
  • Karma: 2199
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #4 on: January 24, 2018, 06:56:24 am »
So you're trying to add the 'de' keyboard layout ?

Right-click the flag by your clock and select "Keyboard Settings"

Choose the "Layout" tab

Make sure there's NO tick in "Use system defaults"

Click the "Add" button.

Highlight the line that reads:

> German

(not any of the sub items)

Click the "OK" button.

Click the "Close" button.

Now clicking on the flag in the system tray (or hitting Left Alt+Left Shift) should switch between layouts
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 36
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #5 on: January 24, 2018, 07:36:31 am »
I want the layout that's called "German (Aus der Neo-Welt)" (it's the last one in /usr/share/X11/xkb/symbols/de)

However the Switcher doesn't show it. It shows a few of the layouts in the "de" file, but not all of them. For example German (Neo2) appears in the Switcher, but German (Aus der Neo-Welt) doesn't appear.
The issue is getting the sub layouts that the Switcher doesn't show.

Maybe the layout got added after you made the Switcher?  :-\

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 19091
  • Karma: 2199
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #6 on: January 24, 2018, 12:58:23 pm »
No the switcher is basically the Xfce layout switcher .. I notice adnw is in the "Extras" section of /usr/share/X11/xkb/symbols/de, I'm trying to figure out what that means at the moment.

Is adnw available on ANY Xfce distro ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 36
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #7 on: January 25, 2018, 05:03:31 pm »
Sorry for the late reply, the adnw HP says it's included in most distros, but often not shown in the menu (to unpopular). They link to this site for help: http://marcinwolinski.pl/keyboard/ maybe that helps you.

"setxkbmap de adnw" works, but it would be nice if it would work with the Switcher. Not sure why it's not showing everything in the first place, seems like an odd design decision. I mean does it really matter if there are 15 or 20 german keyboard layouts in the menu :-\


I only wanted to try out a few keyboard layouts and finally learn 10 Finger typing without always thinking about how stupid the keyboard layout is and the Switcher is awesome for that, but turns out keyboard layouts are a highly complicated thing ::)

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 36
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #8 on: January 25, 2018, 05:32:33 pm »
Ok, on the adnw HP is a download with a replacement for the /usr/share/X11/xkb folder, now everything shows up in the Switcher. Issue solved.

In case your interested, that's the download: 509.ch/AdNW-xkc.tar.xz
« Last Edit: January 25, 2018, 05:34:11 pm by Timo »

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1387
  • Karma: 363
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 6, 7 & 8.5 - 64bit
Re: Multiple Keyboard Layout Switcher
« Reply #9 on: January 26, 2018, 02:55:12 am »
Nice job, Timo !! Thanks for posting the solution and links.  8)

Although this might not be an issue for very many users, I'm sure that you are not the only person out there (or out here  ;D ) who will need to solve it.

Don't forget to go back to your first message and add [SOLVED] to the end of the Subject: line.  ;)

Regards,

-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, awesome, Openbox, i3, JWM

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 19091
  • Karma: 2199
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #10 on: January 26, 2018, 08:59:41 am »
Cheers Timo, I'll take a look at that and try figure out what they've changed in case it'd make sense for us to do the same.

[EDIT]

Can you post a link too where you found those instructions please .. TIA.
« Last Edit: January 26, 2018, 09:12:21 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Timo

  • Member
  • ***
  • Posts: 163
  • Karma: 36
  • Open Source is more than the sum of its bytes
    • View Profile
  • Peppermint version(s): PM7 Respin (64bit) & PM8 (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #11 on: January 26, 2018, 02:34:33 pm »
Yes, would be nice to know how to add new keyboard layouts.

That's the site: http://www.adnw.de/index.php?n=Main.Downloads
It's german only and it adds a few other layouts as well, but I there isn't much text anyways.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 19091
  • Karma: 2199
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 Respin (64bit)
Re: Multiple Keyboard Layout Switcher
« Reply #12 on: January 26, 2018, 03:34:29 pm »
It would seem that 'adnw' is already included in the default keymaps, but Xfce has no way of showing 'exotic' keyboards besides manually setting it with:
Code: [Select]
setxkbmap de adnw

but this would only last a single session .. so would need to be run as an autostart item.

You can then switch back to standar German with
Code: [Select]
setxkbmap de
should yoou choose.



Another option to make it appear in the panel keyboard switcher would be to edit
gksudo xed /usr/share/X11/xkb/rules/evdev.xml
find the section that reads:-
Code: [Select]
        <variant>
          <configItem>
            <name>neo</name>
            <description>German (Neo 2)</description>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>mac</name>
            <description>German (Macintosh)</description>
          </configItem>
        </variant>
        <variant>
and replace it with:-
Code: [Select]
        <variant>
          <configItem>
            <name>neo</name>
            <description>German (Neo 2)</description>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>adnw</name>
            <description>German (Aus der Neo-Welt)</description>
          </configItem>
        </variant>
        <variant>
          <configItem>
            <name>mac</name>
            <description>German (Macintosh)</description>
          </configItem>
        </variant>
        <variant>
SAVE the file and exit the text editor.

Now you should be able to choose it in the panel keyboard switcher under:-

German > German (Aus der Neo-Welt)
« Last Edit: January 26, 2018, 03:37:44 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec