Tutorials/ComposeKey/ca: Difference between revisions

From KDE UserBase Wiki
(Created page with "* Es torna a configurar la consola per utilitzar el teclat, i la codificació de caràcters. Feu-ho des d'un terminal de text o a la consola. {{Input|1= $ sudo dpkg-reconfigure ...")
(Created page with "* Seguiu aquests passos en la configuració: ** Trieu el vostre teclat (en aquest cas per omissió «104 US keyboard»). ** Si voleu la substitució de la tecla AltGr, escolliu...")
Line 21: Line 21:
{{Input|1= $ sudo dpkg-reconfigure console-setup}}
{{Input|1= $ sudo dpkg-reconfigure console-setup}}


* Follow these steps in the configuration:
* Seguiu aquests passos en la configuració:
** Choose your keyboard (here a default 104 US keyboard)
** Trieu el vostre teclat (en aquest cas per omissió «104 US keyboard»).
** If you want the !AltGr key replacement, choose one
** Si voleu la substitució de la tecla AltGr, escolliu-ne una.
** Choose which key you would like your ''compose key'' to be mapped to. I use the ''right logo key.''<p>I'd much rather like to use the ''left logo key,'' but that's not available in the console setting. But in the graphical window environment (KDE Plasma) that is possible.</p>
** Seleccioneu la tecla que us agradaria assignar com a ''tecla compose''. Puc utilitzar la ''tecla dreta amb el logotip''. <p>Més aviat caldria utilitzar la ''tecla esquerra amb el logotip'','' però que no està disponible a la configuració de la consola. Però en l'entorn de finestres gràfiques (KDE Plasma) sí és possible.</p>
** Choose the console's encoding, set it to ''UTF-8''
** Trieu la codificació de caràcters per a la consola, s'estableix a ''UTF-8''.
** Choose what character set should be available on the console. I use ''Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic''<p>I guess that selection should give me the wanted characters.</p>
** Trieu quin conjunt de caràcters han d'estar disponibles a la consola. Jo uso ''Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic''.<p> Suposo que la selecció hauria de donar-me els caràcters que vull.</p>
** Choose what type of console output you'd like (do whatever you like, to be safe you can go with the given current defaults)
** Trieu el tipus de sortida per a la consola que us agradaria (feu el que vulgueu, per estar segurs podeu anar amb els actuals valors per omissió).
** A new ''initial RAM disk'' for the next boot will be created now.
** Ara es crearà un nou ''disc RAM inicial'' per a la propera arrencada.


=== Configuració del KDE 3.x ===
=== Configuració del KDE 3.x ===

Revision as of 17:33, 12 April 2011

Usar/Configuració de la tecla compose

Introducció

La tecla compose s'utilitza per introduir caràcters en el teclat que no solen estar disponibles a les tecles. Aquestes poden ser una «inflexió», un "macrós" o accents sobre les lletres:

Aquestes descripcions van ser provades en diversos sistemes Kubuntu Hardy Heron 8.04.1. Més informació podeu trobar-la en els enllaços a la secció Enllaços i informació addicional a sota.

Les modificacions funcionaran amb (gairebé) totes les aplicacions, incloent l'entorn d'escriptori, els navegadors, l'OpenOffice.org, així com moltes aplicacions de només text a la consola.

Les següents instruccions configuraran una tecla compose, la qual s'assignarà a la tecla amb el logotip (en la majoria de teclats aquest logotip és el de Windows).

Configuració de la consola

Per a fer-ho anar estic intentant anar al «mode holístic» a partir de la consola:

  • Es torna a configurar la consola per utilitzar el teclat, i la codificació de caràcters. Feu-ho des d'un terminal de text o a la consola.
$ sudo dpkg-reconfigure console-setup
  • Seguiu aquests passos en la configuració:
    • Trieu el vostre teclat (en aquest cas per omissió «104 US keyboard»).
    • Si voleu la substitució de la tecla AltGr, escolliu-ne una.
    • Seleccioneu la tecla que us agradaria assignar com a tecla compose. Puc utilitzar la tecla dreta amb el logotip.

      Més aviat caldria utilitzar la tecla esquerra amb el logotip, però que no està disponible a la configuració de la consola. Però en l'entorn de finestres gràfiques (KDE Plasma) sí és possible.

    • Trieu la codificació de caràcters per a la consola, s'estableix a UTF-8.
    • Trieu quin conjunt de caràcters han d'estar disponibles a la consola. Jo uso Combined - Latin; Slavic Cyrillic; Hebrew; basic Arabic.

      Suposo que la selecció hauria de donar-me els caràcters que vull.

    • Trieu el tipus de sortida per a la consola que us agradaria (feu el que vulgueu, per estar segurs podeu anar amb els actuals valors per omissió).
    • Ara es crearà un nou disc RAM inicial per a la propera arrencada.

Configuració del KDE 3.x

Now we can go on and configure our windowing environment. This description uses either Kcontrol or the Kubuntu configuration tool, which exposes the same option dialogue.

  • Start the System Settings or the KDE Control Center
  • Regional & Language (for System Settings) or Regional & Accessibility (for Control Centre) -> Keyboard Layout
  • Choose your keyboard layout
  • Modify the <menuchioce>Xkb Options</menuchioce> to select/enable the compose key



Configuració del KDE SC 4.x

Now we can go on and configure our windowing environment (Plasma). This description uses the System Settings as they're available in the K-Menu of the Kubuntu install:

  • Start the System Settings
  • Regional & Language
  • Select the Keyboard Layout configuration
  • Under the Layout tab, select Enable keyboard layouts
  • Modify Advanced options to select/enable the compose key

KDE 4.5 Configuration

These instructions apply at least to Kubuntu Maverick (KDE 4.5.1):

  • Start System Settings
  • Input Devices
  • Keyboard tab at left (should be initially selected)
  • Advanced tab at top right
  • Expand Compose key position.
  • Choose the key you prefer

Configuració per a aplicacions GTK (Gnome, Firefox, etc.)

Gtk (such as also FireFox) and Gnome applications use (on an Ubuntu system) usually SCIM as the input method, not XIM (X Input Method) that relies on the configurations from (X)Compose. Therefore, you will often find that the "a" and "o" macron characters can yield the female/male ordinals "ª" and "º". To still make it work, Gtk applications need to be "told" to use XIM instead.

"One Off" Configuration

For a single application you can do it by just setting the environment variable GTK_IM_MODULE for the application to be launched to xim:

$ GTK_IM_MODULE=xim firefox

More permanently that can be done for a single shell session like this:

$ export GTK_IM_MODULE=xim

This can, of course, also be persisted for a single user in your ~/.bash_profile, or for all users in /etc/environment. This is, however, the less elegant way, the more elegant way follows below.

Persistent Configuration

  • Copy the setup file /etc/X11/xinit/xinput.d/default to /etc/X11/xinit/xinput.d/xim
$ sudo cp /etc/X11/xinit/xinput.d/default /etc/X11/xinit/xinput.d/xim
  • Edit the file /etc/X11/xinit/xinput.d/xim and set the input method for GNOME and KDE to xim
...
 GTK_IM_MODULE=xim
 QT_IM_MODULE=xim
 ...
  • Create a link for the locale all_ALL (or the desired locale only):
$ sudo ln -sf /etc/X11/xinit/xinput.d/xim /etc/X11/xinit/xinput.d/all_ALL

If you are using a Debian-derived distribution use following instead

$ sudo update-alternatives --verbose --install /etc/X11/xinit/xinput.d/all_ALL xinput-all_ALL /etc/X11/xinit/xinput.d/xim 20
  • After a restart of the X server everything should work.

Optional Tweaking of XCompose Map

Now that you're using XIM, you can further tweak the XCompose input map for further characters, or for characters in more convenient locations, etc.

To do that follow these steps:

  • Create a ~/.XCompose file, and put the following lines into it:
# ~/.XCompose
 # This file defines custom Compose sequences for Unicode characters
# Import default rules from the system Compose file: include "/usr/share/X11/locale/en_US.UTF-8/Compose"
# To put some stuff onto compose key strokes: <Multi_key> <minus> <greater> : "→" U2192 # Compose - > <Multi_key> <colon> <parenright> : "☺" U263A # Compose : ) <Multi_key> <h> <n> <k> : "hugs and kisses" # Compose h n k <Multi_key> <less> < p> : "< p>

" # Compose < p
  • Just log out and in again (no restart necessary), and you can use your new "multi key short strokes" using the compose key to your desire. As you see this even works for creating longer character sequences.

Escriure macrós, dièresis, accents...

The compose key will be now whatever you have configured it to be, e. g. right logo.

  • Macrons
compose + shift + hyphen then <vowel >

or

compose + underscore then <vowel >

-->

āēīōū ĀĒĪŌŪ


  • Umlauts
compose + shift + <single quote> then <vowel >

or

compose + <double quotes> then <vowel >

-->

äëïöü ÄËÏÖÜ


  • The German Ess-Zet ligature
compose then s and s (twice the "s")

-->

ß


  • More bindings can be found in /usr/share/X11/locale/en_US.UTF-8/Compose

Enllaços i informació addicional