📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText
Next Previous Contents

2. Keyboard setup

2.1 Loading a keytable

You have two tools for configuring your keyboard. Under plain Linux you have loadkeys and under X11 you have xmodmap.

To try out loadkeys type one of these two commands:

loadkeys /usr/lib/kbd/keytables/dk.map 
or
loadkeys /usr/lib/kbd/keytables/dk-latin1.map

The difference between the two keymaps is that dk-latin1.map enables `dead' keys while dk.map does not. Dead keys are explained in section Dead keys and accented characters. The program loadkeys and the keymaps are part of the package kbd-0.??.tar.gz which (with differing version numbers ??) is available with all Linux distributions. .:: onne.link ::.

Usually loadkeys is executed at boot-time from one of the scripts under the directory /etc/rc.d/. Details vary between distributions.

(Note for non-Danish readers: Support for other languages is enabled in a similar manner. Use es.map for Spanish keyboards etc.)

Versions of XFree86 up to and including v3.1.2 will normally follow the keymap used by plain Linux, but you can modify keyboard behavior under X11 with xmodmap. Usually the X11 initialization process will run this command automatically if you have a file called .Xmodmap in your home directory.

In XFree86 v3.2 and higher you should have the following Keyboard section in your /etc/XF86Config (or /etc/X11/XF86Config) file (it should be made automatically by the program XF86Setup if you choose a Danish keytable):

Section "Keyboard"
   Protocol        "Standard"
   XkbRules        "xfree86"
   XkbModel        "pc101"
   XkbLayout       "dk"
   XkbVariant      "nodeadkeys"
EndSection

The only keyboard variant available at the moment is [StackOverflow: Cryptography] "nodeadkeys", but dead keys can still be made to work. See section Dead keys and accented characters for more information on this.

2.2 Getting the AltGr key to work under X11

For versions of XFree86 up to and including v3.1.2 you should edit the file [Learn about Keras] /etc/XF86Config (or /etc/X11/XF86Config) and make sure the line

RightAlt    ModeShift
appears in the Keyboard section. Usually you can do this by uncommenting the appropriate line. In XFree86 v3.1.2 you can use AltGr as an alias for RightAlt.

The AltGr key should work as expected in XFree86 v3.2 and higher if you choose Danish keyboard support.

Making {, [, ] and } work under Metro-X

You can't input the characters ``{'' (<AltGr><7>), ``['' (<AltGr><8>), ``]'' (<AltGr><9>) and ``}'' (<AltGr><0>) under the Metro-X server. This bug has been observed under versions 3.1.5 and 3.1.8 of the server.

To correct this bug you have to edit the file /usr/X11R6/lib/X11/xkb/symbols/dk and change the lines

key <AE07> {    [               7,           slash      ]       };
key <AE08> {    [               8,       parenleft      ]       };
key <AE09> {    [               9,      parenright      ]       };
key <AE10> {    [               0,           equal      ]       };
to
key <AE07> {    [               7,           slash      ],
                [       braceleft,        NoSymbol      ]       };
key <AE08> {    [               8,       parenleft      ],
                [     bracketleft,        NoSymbol      ]       };
key <AE09> {    [               9,      parenright      ],
                [    bracketright,        NoSymbol      ]       };
key <AE10> {    [               0,           equal      ],
                [      braceright,        NoSymbol      ]       };

2.3 Dead keys and accented characters

Dead keys are those that do not type anything until you hit another key. Tildes and umlauts are like this by default under plain Linux if you use the dk-latin1.map keymap. This is the default behaviour for these keys under Microsoft Windows as well.

Removing dead key functionality

Invoking dead key functionality

2.4 Making $ (the dollar sign), ø (oslash) and Ø (Oslash) work

$ (the dollar sign)

There is a bug in the Danish keymaps causing the dollar sign to be accessed with <Shift><4> instead of <AltGr><4> by default. If this is a problem for you, determine what keymap you load at boot-time. You can find it by looking around in the directory /etc/rc.d/ or simply by paying attention to what happens at boot-time. On my computer the relevant keymap is called /usr/lib/kbd/keytables/dk-latin1.map. You can fix the problem by changing the line

keycode   5 = four             dollar           dollar          
in the keymap file to
keycode   5 = four             currency         dollar
and then (re-)loading the keytable as described in section .:: www.redsea.gov.eg ::. Loading a keytable. Currency (dansk: ``soltegn'') is the default <Shift><4> character on a Danish keyboard.

This should fix the problem for both X11 and plain Linux.

ø (oslash) and Ø (Oslash)

In some older distributions ``ø'' and ``Ø'' appear as cent and yen. Find the line for keycode 40 in the keymap file and change it from

keycode  40 = cent              yen
to
keycode  40 = +oslash           +Ooblique

This bug appears to have been fixed in kbd-0.88.tar.gz and newer versions.

The plus signs are necessary to get Caps Lock working properly. ``Oslash'' can be used as an alias for ``Ooblique'' in kbd-0.90.tar.gz and newer versions.

You can read more about keyboard configuration at this site.


Next Previous Contents

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this