# Keyboard layout problem



## Psypro (Jan 11, 2015)

I use Microsoft wireless USB keyboard and mouse.
I am typing now from inside Xfce4. It works for the most part. But..

Norwegian keys only show a number sequence when I push them in tty1, so problem both inside and outside of Xfce4.
I selected Norwegian iso keyboard layout in bsdconfig(8).


----------



## Psypro (Jan 11, 2015)

I have joined at thread in desktop forum area, for the Xfce/Xorg question. But thanks for the fast reply.

Do you or anybody else, have any idea and willingness to share the knowledge for how to setting Norwegian for keyboard layout, so I can use Norwegian letters (that are not a part of English alphabet) I am fine with the system interface being in English.

My rc.conf uses norwegian.iso so keys like @, ? are in their correct place in tty1. But Norwegian letters does only show as a number sequence.


----------



## petrek (Jan 11, 2015)

I'm not sure if I understand what you're trying to do. If you're trying to get one char Norwegian letters in console (Ctrl + Alt + F2 from X), you must do this:

in /etc/rc.conf you must have `keymap="no"`

In /etc/login.conf you must have something like this (look for russian there):


```
norwegian|Norwegian Users Accounts:\
:charset=UTF-8:\
:lang=no_NO.UTF-8:\
:setenv=LC_COLLATE=C:
```

After you write it, do this in terminal: `#cap_mkdb /etc/login.conf`

Now the most difficult part, run `#vipw` (or `pw user mod root -L norwegian` you can change root for your username if you want norwegian letters for it too, and ignore the rest of my post)
Are you familiar with vi?  You can move around with arrows, when you're at the place when you want to write something push i, then write what you have to write, press Esc key, and then Shift + z + z. At the beginning you should see a line starting with root: in this line you should see something like this: (probably, numbers may be different, important it's the empty place between them :: ) :0:0::0:0:Charlie The whole line should be something like this: root:someUninterestingCharsBefore:0:0:norwegian:0:0:CharlieSomeCharsAfter (if you have different numbers, keep them, do not replace them with zeros!) do this for every user that should have norwegian letters, and that's it. At least it worked for me


----------



## wblock@ (Jan 11, 2015)

We might be seeing a lot of people wanting to know why they can't log in any more.

Can't this be done with pw(8) or something less fragile?


----------



## petrek (Jan 11, 2015)

I thought vipw is the less fragile  It's the advice from FreeBSD Handbook anyway  With pw it will be `pw user mod root -L norwegian` probably


----------



## Kiiski (Jan 12, 2015)

Hi

Have you already studied the Handbook section about localization?
https://www.freebsd.org/doc/handbook/using-localization.html


----------

