Solved keymap file creation for Turkish F layout

Dear experts,

I am using a keyboard with Turkish F layout. In the attached file you can see one of the example which I have. When I check /usr/share/syscons/keymaps/ folder only tr.iso9.q.kbd exist.

My aim is use this new kbd(like tr.iso9.f.kbd) on console connections. Currently for X sessions(Lumina) I able to choose and use Turkish F.

How can I create a kbd file for this layout.

Thanks in advance for your guidance.

Web Link :
https://en.wikibooks.org/wiki/Turkish/Computing_in_Turkish
 

Attachments

  • Turkish_f_layout.jpg
    Turkish_f_layout.jpg
    55 KB · Views: 965
Hi, i'm not a user of Turkish F keyboard, but i believe you can try building a custom keymap file using the current keymap settings.

kbdcontrol -d > my.kbd

When you issue the above command at the console, it should dump your current keymap settings to "my.kbd" file. In order to see your current keymap settings, can you post the contents of "my.kbd" please ?
 
For Xorg, edit your user's ~/.xinitrc which gets read after Xorg login
Code:
setxkbmap -layout tr

For tty (consoles) edit /etc/rc.conf and add:
Code:
keymap="tr"
 
Hi, i'm not a user of Turkish F keyboard, but i believe you can try building a custom keymap file using the current keymap settings.

kbdcontrol -d > my.kbd

When you issue the above command at the console, it should dump your current keymap settings to "my.kbd" file. In order to see your current keymap settings, can you post the contents of "my.kbd" please ?
Hi,
I issued command and generated file. Changed extension as upload tool doesn't accept .kbd format. Thanks.
 

Attachments

For Xorg, edit your user's ~/.xinitrc which gets read after Xorg login
Code:
setxkbmap -layout tr

For tty (consoles) edit /etc/rc.conf and add:
Code:
keymap="tr"
Hi,
This( keymap="tr") works if i want to load Turkish Q layout. Unfortunately Q is very different than F so not useful for me. Thanks.
 
Hi, I read your post too quickly and overlooked the details.

First off, syscons is the old console, vt(4)() (newcons) is the new one. You can switch to vt by setting in /boot/loader.conf
Code:
kern.vty=vt

That said, the kbd files are just text. See for yourself:
$ cat /usr/share/vt/keymaps/tr.kbd
Code:
# scan                       cntrl          alt    alt   cntrl lock
# code  base   shift  cntrl  shift  alt    shift  cntrl  shift state
# ------------------------------------------------------------------
  000   nop    nop    nop    nop    nop    nop    nop    nop     O
  001   esc    esc    esc    esc    esc    esc    debug  esc     O
  002   '1'    '!'    nop    nop    '>'    nop    nop    nop     O
  003   '2'    '''    nul    nul    0xa3   nop    nul    nul     O
  004   '3'    '^'    nop    nop    '#'    nop    nop    nop     O
etc.. So If you can find a generic keymap for tr-f, you can just copy it and place it in above folder as whatever.kbd & call it from /etc/rc.conf
 
Hi, I read your post too quickly and overlooked the details.

First off, syscons is the old console, vt(4)() (newcons) is the new one. You can switch to vt by setting in /boot/loader.conf
Code:
kern.vty=vt

That said, the kbd files are just text. See for yourself:
$ cat /usr/share/vt/keymaps/tr.kbd
Code:
# scan                       cntrl          alt    alt   cntrl lock
# code  base   shift  cntrl  shift  alt    shift  cntrl  shift state
# ------------------------------------------------------------------
  000   nop    nop    nop    nop    nop    nop    nop    nop     O
  001   esc    esc    esc    esc    esc    esc    debug  esc     O
  002   '1'    '!'    nop    nop    '>'    nop    nop    nop     O
  003   '2'    '''    nul    nul    0xa3   nop    nul    nul     O
  004   '3'    '^'    nop    nop    '#'    nop    nop    nop     O
etc.. So If you can find a generic keymap for tr-f, you can just copy it and place it in above folder as whatever.kbd & call it from /etc/rc.conf

Hi,

I create a custom tr.iso9.f.kbd file and follow your instructions. It works :). Currently on console Turkish characters(ş,ğ,ü,ç,ö etc)and alt combinations are not working properly. I am pretty sure there needs to do correction on the file. Mainly it is useful right now. I also share kbd file for any kind of suggestion. Thanks in advance for your help.
 

Attachments

Hi again.

For instance; this is line "33" in "tr.iso9.f.txt" file that you shared:

Code:
018 240 208 nop nop 168 208 nop nop C

I assume Turkish character "ğ" (i.e. Latin small letter g with breve) is defined on this line. So, what happens when you change this line to:
Code:
018 ğ Ğ nop nop ğ Ğ nop nop C

I'm not entirely sure if Turkish unicode characters can be used in keyboard definiton files as in above. But if that does not work, you can try UTF-8 representation for the Turkish character "ğ":

Code:
0xC4 0x9E

As a last resort; you can try "C octal escaped UTF-8" representation for the Turkish character "ğ":

Code:
\304\236

If any of that works as intended, i guess we can apply the "correct representations" for other Turkish character definitions as well.
 
I would have imagined that certain Linux distros would already have the f keymap lying around somewhere in their source repos, and especially Pardus?
 
Finally I completed the custom tr.f.kbd for vt console.

Thanks to Beeblebrox and gfx. With your help I solved one of the important case for me. :)

Steps which I follow are ;

1 - Created a custom keymap called tr.f.kbd under /usr/share/vt/keymaps/
2 - keymap="tr.f" added to /etc/rc.conf
3 - kern.vty=vt added inside /boot/loader.conf

Links used during keymap creation.
http://www.unicodemap.org/
http://lwp.interglacial.com/appf_01.htm
 

Attachments

Good to know you resolved this issue. :) I believe it might be useful for other *BSD users too - if you could share the custom keyboard definition file via github maybe. There are f keyboard definition files in both Pardus and Debian repositories as Beeblebrox said, but they have a totally different structure than the keyboard definitions used in *BSD.
 
Well, you may want to create a bug report (title including [PATCH]) on bugzilla with your kbd file attached to your report (as a patch).

However, I am not quote sure which email list is the right one to address this issue, as it is always good to send an email to the appropriate list to get some attention from developers. I would say i18n list is worth giving a shot!

Good luck! And thanks for the effort!
 
Finally I completed the custom tr.f.kbd for vt console.

Thanks to Beeblebrox and gfx. With your help I solved one of the important case for me. :)

Steps which I follow are ;

1 - Created a custom keymap called tr.f.kbd under /usr/share/vt/keymaps/
2 - keymap="tr.f" added to /etc/rc.conf
3 - kern.vty=vt added inside /boot/loader.conf

Links used during keymap creation.
http://www.unicodemap.org/
http://lwp.interglacial.com/appf_01.htm

I did a small updates for legibility and added line 4.

Steps which I follow are ;

1 - Created a custom keymap called tr.f.kbd under /usr/share/vt/keymaps/
2 - Added below line inside /etc/rc.conf
Code:
keymap="tr.f"
3 - Added below line inside /boot/loader.conf
Code:
kern.vty=vt
4 - Added below lines inside ~/.login_conf
Code:
me:\
   :charset=UTF-8:\
   :lang=tr_TR.UTF-8:
 
I'm willing to commit the new keymap file to -CURRENT and MFC to 10 and 11 within the next 2 weeks.

Could you please verify that the attached changes to INDEX.keymaps are correct?

The relevant lines added for tr.f.kbd are:

tr.f.kbd:en:Turkish-F
tr.f.kbd:de:Türkisch (F Stil)
tr.f.kbd:fr:Turc (F)
tr.f.kbd:uk:Турецька (F)
tr.f.kbd:tr:Türk (F)
 

Attachments

I'm willing to commit the new keymap file to -CURRENT and MFC to 10 and 11 within the next 2 weeks.

Could you please verify that the attached changes to INDEX.keymaps are correct?

The relevant lines added for tr.f.kbd are:

tr.f.kbd:en:Turkish-F
tr.f.kbd:de:Türkisch (F Stil)
tr.f.kbd:fr:Turc (F)
tr.f.kbd:uk:Турецька (F)
tr.f.kbd:tr:Türk (F)

Hi se@

I did small updates on some of lines.

tr.f.kbd:en:Turkish-F -> tr.f.kbd:en:Turkish (F)
tr.f.kbd:de:Türkisch (F Stil) -> tr.f.kbd:de:Türkisch (F)
tr.f.kbd:tr:Türk -> tr.f.kbd:tr:Türkçe (F)

de.kbd:tr:Alman -> de.kbd:tr:Almanca
tr.kbd:tr:Türk -> tr.kbd:tr:Türkçe (Q)

MENU:tr:Klavye düzeninizi seçin -> MENU:tr:Klavye düzeninizi seçiniz

Also attach latest keymap file.

Thanks.
 

Attachments

Committed with minor changes as r321858. MFC will follow within the next 10 days.
Thank you for the keymap file and the menu line translations!
 
Back
Top