WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] Swedish keyboard layout  (Read 5987 times)

Offline meo

  • Hero Member
  • *****
  • Posts: 651
[Solved] Swedish keyboard layout
« on: July 22, 2023, 03:26:34 PM »
Yesterday a managed to overwrite my old TC sd card. Naturally I had a lot of backups on it to. Like photos etc. Well enough about that mishap (the story of my life). How can I change my keyboard layout to the swedish one and make it permanent so I don't have to load it all the time. Sorry I can't find the question mark. Will be very grateful for any help. Actually I found how to do it but I don't remember what it's called.
« Last Edit: July 29, 2023, 04:39:43 PM by Rich »
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline CardealRusso

  • Full Member
  • ***
  • Posts: 179
Re: Swedish keyboard layout
« Reply #1 on: July 22, 2023, 07:00:12 PM »
If you are using Xorg you can just add
[ -e /usr/local/bin/setxkbmap ] && setxkbmap -layout se -option ctrl:nocaps
in .xsession

For Xvesa:
https://www.youtube.com/watch?v=dOpHMqNeA6I
For Xorg:
https://www.youtube.com/watch?v=YwCs-Huoax4
« Last Edit: July 22, 2023, 07:07:08 PM by CardealRusso »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Swedish keyboard layout
« Reply #2 on: July 23, 2023, 02:48:25 AM »
Hej
Här har du en länk som jag skrev inte så länge sedan hur man ändrar till engelsk tangentbord, som du säkert enkelt kan ändra på till svenskt. Bara att ersätta uk till se. osv...


Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Swedish keyboard layout
« Reply #3 on: July 23, 2023, 03:32:32 AM »

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Swedish keyboard layout
« Reply #4 on: July 23, 2023, 05:47:35 AM »
Hej Patrik!

Have some problems resolving this keymap issue. Haven't used TC with a GUI for years. I use this command to set up the GUI

$tce-load -i TC
$startx

Which graphic interface does that give me? xvesa or Xorg? Thanks for your effort to help me out. I haven't used TC regularly for many years. I was there from the beginning after DSL but now I've forgotten a lot. So what would be the appropriate way to solve this? Thanks beforehand!

Greetings,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Swedish keyboard layout
« Reply #5 on: July 23, 2023, 07:00:55 AM »
Hej patrikg!

I changed your script and tried to run it but it didn't solve the problem. Perhaps I made a mistake when running it. I renamed it se_keymap.sh and ran it (at least I think I did). Any thoughts about it? How should I run the script? Maybe I did it the wrong way.

Kind greetings,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Swedish keyboard layout
« Reply #6 on: July 23, 2023, 10:15:14 AM »
Hi meo
... Which graphic interface does that give me? xvesa or Xorg? ...
It gives you Xorg. Xvesa is only for x86 (32 bit). TC.tcz is
a piCore extension.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Swedish keyboard layout
« Reply #7 on: July 23, 2023, 01:25:52 PM »
Yes you have to change the file content to your specific language.
Not just the file name.
If you can see this line you have to change it from uk to se.
Code: (bash) [Select]
\"XkbLayout\" \"uk\""
And another lines with uk you can also change it to se.



Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Swedish keyboard layout
« Reply #8 on: July 23, 2023, 01:55:47 PM »
I have changed all the instances of uk to se but I still can't make it t]o work. I've been away from TC so long that I feel like a noob again. So how do I run the script? That's what I'm unsure of. Sorry for making such a fuzz about this but yesterday was the first day I could make GUI work on the piCore. Several things have changed in those years that I've been gone so to speak. So, how do I run the script? Thanks for putting up with me!

Kind Greetings,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Swedish keyboard layout
« Reply #9 on: July 23, 2023, 02:37:26 PM »
The only kmap I can find is in /usr/share/kmap and it is us.kmap. Am I missing the kmaps or are they located elsewhere?
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Swedish keyboard layout
« Reply #10 on: July 23, 2023, 03:24:44 PM »
kmaps is only for console like framebuffer.

So just past this lines into some terminal I think it will be fine.. And of course restart the system so x11 will read your new created file. This lines create the file se_keyboard.conf in the directory /etc/X11/xorg.conf.d/ you can check after you paste the lines with just the cat command that the file exist.

Code: (bash) [Select]
cat /etc/X11/xorg.conf.d/se_keyboard.conf


Code: (bash) [Select]
sudo su
mkdir -p /etc/X11/xorg.conf.d/
echo -e "Section \"InputClass\"" > /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "\tIdentifier \"keyboard defaults\"" >> /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "\tMatchIsKeyboard \"on\"" >> /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "\tOption \"XkbModel\" \"pc105\"" >> /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "\tOption \"XkbLayout\" \"se\"" >> /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "\tOption \"XkbVariant\" \"nodeadkeys\"" >> /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "\tOption \"XkbOptions\" \"terminate:ctrl_alt_bksp\"" >> /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "EndSection" >> /etc/X11/xorg.conf.d/se_keyboard.conf
echo -e "etc/X11/xorg.conf.d/se_keyboard.conf" >> /opt/.filetool.lst
filetool.sh -b -v
« Last Edit: July 23, 2023, 03:30:33 PM by patrikg »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Swedish keyboard layout
« Reply #11 on: July 23, 2023, 03:37:54 PM »
If your wish to get working åäö chars in console.. you have to install extension kmaps and change the command line argument to the linux kernel, don't know if you using picore or x86 of tinycore ?

But the syntax of change to the correct kmap and some another this like timezone and correct locale for console will be like this.

Extra commandline args:
Set correct timezone Europe/Stockholm and keymapping and language to Swedish.
Code: (bash) [Select]
showapps tz=CET-1CEST,M3.5.0,M10.5.0/3 kmap=qwerty/sv-latin1 lang=sv_SE
You can also read little more about this in this thread:
https://forum.tinycorelinux.net/index.php/topic,24893.msg164210.html#msg164210
« Last Edit: July 23, 2023, 03:45:32 PM by patrikg »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Swedish keyboard layout
« Reply #12 on: July 23, 2023, 06:53:11 PM »
Hi meo
... So how do I run the script? ...
The commands patrikg lists in reply #10 create a configuration file called
/etc/X11/xorg.conf.d/se_keyboard.conf , not a script. The last 2 commands
he lists back up that file.

When Xorg starts, it reads the /etc/X11/xorg.conf.d/se_keyboard.conf file
and uses it to set up the keyboard.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 713
Re: Swedish keyboard layout
« Reply #13 on: July 24, 2023, 02:27:44 AM »
Thank you Rich
For more informative explanation what I want to archive.
« Last Edit: July 24, 2023, 02:30:09 AM by patrikg »

Offline meo

  • Hero Member
  • *****
  • Posts: 651
Re: Swedish keyboard layout
« Reply #14 on: July 24, 2023, 06:02:15 AM »
Thanks a lot for for your help patrikg and Rich! I truly appreciate it. Now I’ve messed up the micro sd card so I have to start over again. I remember manually changing the characters on the keyboard using DSL. The “Very small Linux” on a business card sized cd rom. I think (not accepting though) that the age is taking it’s toll on me. Thanks again for your time and effort to help me! I think I have to take the mission of getting piCore to run smoothly on my Raspberry Pi 4 B with 8 GB of RAM in a little slower pace but I’ll get there with the help of the eminent TC forums enthusiastic members.

Yours truly,
meo
"All that is very well," answered Candide, "but let us cultivate our garden." - Francois-Marie Arouet Voltaire