[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Occasional texts in languages other than English

On Sun, Feb 15, 2004 at 02:32:01PM -0500, Bruce Miller wrote:
> I have many friends whose first language is not English. Most are quite 
> relaxed about polglotism: they write to me in their first language, and 
> I reply in mine (English). Sometimes, however, I need to write in their 
> language. I have been too busy learning the other mechanics of Linux to 
> worry about non-English characters.
> Changing national keyboard layouts is a surprising hassle, not in 
> software terms but from the user perspective. It is many years since I 
> lived outside Canada and I no longer recall how layouts differ from 
> language to language and from country to country. I spent fruitless 
> hours last year hunting for examples on the Web before I swallowed my 
> pride and hauled out an old Microsoft manual <grin> which I already 
> knew had all the layouts I needed neatly laid out in an appendix. Nor 
> am I willing to give up my ancient but treasured Nothgate keyboards 
> which, being from the USA, have stolidly unilingual keycaps.
> My locale is en_CA_UTF8.
> I am looking for the simplest way to enter non-English characters from 
> an English keyboard (e.g.å é û ). In Windows, it was never hard; there 
> are few enough that I usually remembered the Alt+nnn keycode for the 
> 437 and 850 codepages. For longer texts, the WordPerfect (Ctrl-w) 
> function was also dead easy. Rarely, I switched to another keyboard 
> layout and kept the layout diagram propped open in front of me.
> What I am looking for is something comparable to the old ALt+nnn (where 
> n is the numerical keypad) method. If there is nothing, I will switch 
> keyboard layouts. I now keep that old Microsoft manual close to my, 
> ouch, Linux computer.

Adding to what Adeodato Simó said:

(This someone told me a few days ago)
In emacs, 
M-x iso-accents-mode 
and then /a will give you å, ~c will give you ç, etcétera.
See http://www.cs.tut.fi/~jkorpela/emacs-iso.html

To enable what you want for anything, not only emacs, you have to
create your own «xmodmap», here is where you incorporate what Adeodato said.
man xkeycaps, man xmodmap
Use xkeycaps to see your keyboard layout, as initial approach. Save it
(see the man pages) to some file. Modifye then the saved file to your
For example, I am copying next my xmodmap:

! This is an `xmodmap' input file for
!   PC 104 key, wide Delete, short Enter (XFree86; US) keyboards.
! Automatically generated on Wed Oct 29 19:35:53 2003 by tony with
! XKeyCaps 2.46; Copyright (c) 1999 Jamie Zawinski <jwz@jwz.org>.
! http://www.jwz.org/xkeycaps/
! This file makes the following changes:
! The "Print Screen" key generates Print and Sys_Req
! The "=/+/" key generates Super_L
! The "Alt" key generates Alt_L and Meta_L
! The "Alt" key generates Alt_R and Meta_R
! The "=/+/" key generates Super_R
keycode 0x09 =  Escape
keycode 0x43 =  F1
keycode 0x44 =  F2
keycode 0x45 =  F3
keycode 0x46 =  F4
keycode 0x47 =  F5
keycode 0x48 =  F6
keycode 0x49 =  F7
keycode 0x4A =  F8
keycode 0x4B =  F9
keycode 0x4C =  F10
keycode 0x5F =  F11
keycode 0x60 =  F12
keycode 0x6F =  dead_tilde      dead_cedilla
keycode 0x4E =  guillemotleft   guillemotright
keycode 0x6E =  Pause           Break
keycode 0x31 =  grave           asciitilde
keycode 0x0A =  1               exclam
keycode 0x0B =  2               at
keycode 0x0C =  3               numbersign
keycode 0x0D =  4               dollar
keycode 0x0E =  5               percent
keycode 0x0F =  6               asciicircum
keycode 0x10 =  7               ampersand
keycode 0x11 =  8               asterisk
keycode 0x12 =  9               parenleft
keycode 0x13 =  0               parenright
keycode 0x14 =  minus           underscore
keycode 0x15 =  equal           plus
keycode 0x16 =  BackSpace
keycode 0x6A =  Insert
keycode 0x61 =  Home
keycode 0x63 =  Prior
keycode 0x4D =  Num_Lock        Pointer_EnableKeys
keycode 0x70 =  KP_Divide
keycode 0x3F =  KP_Multiply
keycode 0x52 =  KP_Subtract
keycode 0x17 =  Tab             ISO_Left_Tab
keycode 0x18 =  q               Q
keycode 0x19 =  w               W
keycode 0x1A =  e               E
keycode 0x1B =  r               R
keycode 0x1C =  t               T
keycode 0x1D =  y               Y
keycode 0x1E =  u               U
keycode 0x1F =  i               I
keycode 0x20 =  o               O
keycode 0x21 =  p               P
keycode 0x22 =  bracketleft     braceleft
keycode 0x23 =  bracketright    braceright
keycode 0x33 =  backslash       bar
keycode 0x6B =  Delete
keycode 0x67 =  End
keycode 0x69 =  Next
keycode 0x4F =  KP_Home         KP_7
keycode 0x50 =  KP_Up           KP_8
keycode 0x51 =  KP_Prior        KP_9
keycode 0x56 =  KP_Add
keycode 0x42 =  Caps_Lock
keycode 0x26 =  a               A
keycode 0x27 =  s               S
keycode 0x28 =  d               D
keycode 0x29 =  f               F
keycode 0x2A =  g               G
keycode 0x2B =  h               H
keycode 0x2C =  j               J
keycode 0x2D =  k               K
keycode 0x2E =  l               L
keycode 0x2F =  semicolon       colon
keycode 0x30 =  apostrophe      quotedbl
keycode 0x24 =  Return
keycode 0x53 =  KP_Left         KP_4
keycode 0x54 =  KP_Begin        KP_5
keycode 0x55 =  KP_Right        KP_6
keycode 0x32 =  Shift_L
keycode 0x34 =  z               Z
keycode 0x35 =  x               X
keycode 0x36 =  c               C
keycode 0x37 =  v               V
keycode 0x38 =  b               B
keycode 0x39 =  n               N
keycode 0x3A =  m               M
keycode 0x3B =  comma           less
keycode 0x3C =  period          greater
keycode 0x3D =  slash           question
keycode 0x3E =  Shift_R
keycode 0x62 =  Up
keycode 0x57 =  KP_End          KP_1
keycode 0x58 =  KP_Down         KP_2
keycode 0x59 =  KP_Next         KP_3
keycode 0x6C =  KP_Enter
keycode 0x25 =  Control_L
keycode 0x73 =  Super_L
keycode 0x40 =  Alt_L           Meta_L
keycode 0x41 =  space
keycode 0x71 =  Alt_R           Meta_R
keycode 0x74 =  dead_acute      dead_diaeresis
keycode 0x75 =  exclamdown      questiondown
keycode 0x6D =  Control_R
keycode 0x64 =  Left
keycode 0x68 =  Down
keycode 0x66 =  Right
keycode 0x5A =  KP_Insert       KP_0
keycode 0x5B =  KP_Delete       KP_Decimal
clear Shift
clear Lock
clear Control
clear Mod1
clear Mod2
clear Mod3
clear Mod4
clear Mod5
add    Shift   = Shift_L Shift_R
add    Lock    = Caps_Lock
add    Control = Control_L Control_R
add    Mod1    = Alt_L Alt_R
add    Mod2    = Num_Lock
add    Mod4    = Super_L Super_R
add    Mod5    = Scroll_Lock


Reply to: