Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dcore:keyboard_layout_in_console [2015/07/28 05:17] sm8psdcore:keyboard_layout_in_console [2015/07/28 05:44] (current) – [Keyboard Layout - Tinycore way] + Link to keyboard codes sm8ps
Line 1: Line 1:
 ======Layout-switching in the Console====== ======Layout-switching in the Console======
  
-The command ''loadkeys'' can be used to set a new layout. The following outline explains how to implement such a mechanism in dCore. Due to the size of the needed packages, some optimisation is desirable (cf. [[#note|note]] below). +The command ''loadkeys'' can be used to set a new layout. The following outline explains how to implement such a mechanism in dCore, specifically how to make the necessary files available.
- +
- +
-=====Warning about log-in prompt===== +
- +
-The man-page of ''loadkeys'' explains a possible side-effect of changing the keyboard-layout in the console. "Note that because the changes affect all the virtual consoles, they also outlive your session. This means that even at the login prompt the key bindings may not be what the user expects.+
  
 =====Installing===== =====Installing=====
Line 13: Line 7:
   *Import and load the //console-data// package. This extension is only used in an ephemeral way and can be removed afterwards.   *Import and load the //console-data// package. This extension is only used in an ephemeral way and can be removed afterwards.
  
-====Note==== +====Storing the key-map-files====
- +
-The package //kbd// has a almost one hundred dependencies going back to, e.g. //passwd// and //mount//. Thus it is desirable to include it into a base extension rather than used it as an isolated extension as here presented. That may be done at a later time without need for repeating the whole procedure. +
- +
- +
-=====Storing the key-map-files=====+
 The necessary key-map files are stored away and made persistent. The necessary key-map files are stored away and made persistent.
   *Create a directory to store the key-map files in, e.g. '/opt/sys/keymaps/', and make it the working directory.   *Create a directory to store the key-map files in, e.g. '/opt/sys/keymaps/', and make it the working directory.
Line 25: Line 14:
 Hint: if you should have loaded a non-functional keyboard layout, use the arrow-up key to get back to the line loading the US-layout. Hint: if you should have loaded a non-functional keyboard layout, use the arrow-up key to get back to the line loading the US-layout.
  
-====Notes====+===Notes===
   *The naming scheme remains a bit hazy. The Swiss-German layout, for instance, may well be loaded by 'loadkeys ch' but the command does not produce any output. Indeed, there is no file 'ch*' at all but instead one for 'sg_latin1'. YMMV. In the end, the file names do not matter as a new key-map file for local use is generated anyways.   *The naming scheme remains a bit hazy. The Swiss-German layout, for instance, may well be loaded by 'loadkeys ch' but the command does not produce any output. Indeed, there is no file 'ch*' at all but instead one for 'sg_latin1'. YMMV. In the end, the file names do not matter as a new key-map file for local use is generated anyways.
  
Line 31: Line 20:
 Loading any such key-map with ''loadkeys'' should switch keyboard layout, e.g. ''sudo loadkeys /opt/sys/keymaps/us.kmap''. Loading any such key-map with ''loadkeys'' should switch keyboard layout, e.g. ''sudo loadkeys /opt/sys/keymaps/us.kmap''.
  
-=====Persistence=====+===Warning about log-in prompt=== 
 + 
 +The man-page of ''loadkeys'' explains a possible side-effect of changing the keyboard-layout in the console. "Note that because the changes affect all the virtual consoles, they also outlive your session. This means that even at the login prompt the key bindings may not be what the user expects." 
 + 
 + 
 +====Persistence====
 Add the name of the directory, e.g. "opt/sys/keymaps"  to '.filetool.lst' and issue ''backup''. Add the name of the directory, e.g. "opt/sys/keymaps"  to '.filetool.lst' and issue ''backup''.
  
Line 60: Line 54:
   - Add kmaps to sceboot.lst   - Add kmaps to sceboot.lst
   - Add your layout to the boot options on your bootloader, for example kmap=qwerty/it   - Add your layout to the boot options on your bootloader, for example kmap=qwerty/it
 +
 +A list of available keyboard codes can be seen in the [[http://tinycorelinux.net/6.x/x86/tcz/kmaps.tcz.list|content list]] of kmaps.tcz.
Print/export
QR Code
QR Code dcore:keyboard_layout_in_console (generated for current page)