Tutorials/ComposeKey/ca: Difference between revisions

From KDE UserBase Wiki
(Created page with "=== Configuració de la consola ===")
(Updating to match new version of source page)
 
(77 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages />
<languages />
== Using/Configuring the Compose Key ==


=== Introducció ===
<span id="Introduction"></span>
== Introducció ==


The ''compose key'' is used to enter characters on the keyboard that are usually not available on the key caps. Such letters could be an "umlaut", a "macron" or accents on letters:
<div class="mw-translate-fuzzy">
* http://en.wikipedia.org/wiki/Umlaut_(diacritic)
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ó» o accents sobre les lletres:
* http://en.wikipedia.org/wiki/Macron
* http://ca.wikipedia.org/wiki/Dièresi
* http://ca.wikipedia.org/wiki/Macró
</div>


These descriptions were tested on several ''Kubuntu Hardy Heron 8.04.1'' systems. Further information may be found in the ''[[#Links and Further Information|Links and Further Information]]'' section below.
<div class="mw-translate-fuzzy">
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ó ''[[#Links and Further Information|Enllaços i informació addicional]]'' a sota.
</div>


The modifications will work with (almost) all applications, including the desktop environment, browsers, OpenOffice.org, as well as many console/text only applications.
Les modificacions funcionaran amb (gairebé) totes les aplicacions, incloent l'entorn d'escriptori, els navegadors, el LibreOffice, així com moltes aplicacions de només text o a la consola.


The following instructions will configure a ''compose'' key, which will be mapped to the ''right logo key'' (on most keyboards this logo is the ''Windows'' logo).
Les següents instruccions configuraran una tecla ''compose'', la qual s'assignarà a la ''tecla dreta amb el logotip'' (en la majoria de teclats aquest logotip és el de ''Windows'').


=== Configuració de la consola ===
<span id="Plasma_Workspace"></span>
== Espai de treball Plasma ==


To do this properly I'm trying to go the "holistic way" starting with the console:
<div class="mw-translate-fuzzy">
[[Image:system-settings-compose.png]]
</div>


* Reconfigure the console for the used keyboard, and the character encoding. Do this in a text terminal or the console.
* Start [[Special:myLanguage/System Settings|System Settings]]
{{Input|1= $ sudo dpkg-reconfigure console-setup}}
 
* Select <menuchoice>Input Devices</menuchoice> then <menuchoice>Keyboard</menuchoice>


* Follow these steps in the configuration:
* Click the <menuchoice>Advanced</menuchoice> tab
** Choose your keyboard (here a default 104 US keyboard)
** If you want the !AltGr key replacement, choose one
** 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>
** Choose the console's encoding, set it to ''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>
** Choose what type of console output you'd like (do whatever you like, to be safe you can go with the given current defaults)
** A new ''initial RAM disk'' for the next boot will be created now.


=== KDE 3.x Configuration ===
* Click the box next to <menuchoice>Configure Keyboard Options</menuchoice> to enable changing keyboard options


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.
* Click the {{Icon|breeze-go-next}} icon next to '''Position of Compose key'''


* Start the '''System Settings''' or the '''KDE Control Center'''
* Feu clic en la casella al costat de la tecla desitjada per a activar-la
* <menuchoice>Regional & Language</menuchoice> (for System Settings) or <menuchoice>Regional & Accessibility</menuchoice> (for Control Centre) -> <menuchoice>Keyboard Layout</menuchoice>
* Choose your keyboard layout
* Modify the <menuchioce>Xkb Options</menuchioce> to select/enable the ''compose key''


<span id="Console_Configuration"></span>
== Configuració de la consola ==


[[Image:ControlKeyKDE3.png|500px|center]]
̣{{Note|This instruction are old and only works in Debian based system. If you know a better way, feel free to edit this wiki page.}}


Per fer-ho correctament, estic intentant seguir el «camí holístic» començant per la consola:


=== KDE SC 4.x configuration ===
* 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 console-setup}}


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:
* Seguiu aquests passos en la configuració:
 
** Trieu el vostre teclat (en aquest cas per omissió «104 US keyboard»).
* Start the '''System Settings'''
** Si voleu la substitució de la tecla AltGr, escolliu-ne una.
* <menuchoice>Regional & Language</menuchoice>
** 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>
* Select the <menuchoice>Keyboard Layout</menuchoice> configuration
** Trieu la codificació de caràcters per a la consola, s'estableix a ''UTF-8''.
* Under the ''Layout'' tab, select <menuchoice>Enable keyboard layouts</menuchoice>
** Trieu quin joc 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>
* Modify ''Advanced'' options to select/enable the ''compose key''
** 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.


[[Image:ControlKeyKDE4.png|500px|center]]
<span id="Configuration_for_GTK_Applications_(Gnome,_Firefox,_etc.)"></span>
=== KDE 4.5 Configuration ===
== Configuració per a aplicacions GTK (Gnome, Firefox, etc.) ==
These instructions apply at least to Kubuntu Maverick (KDE 4.5.1):
* Start '''System Settings'''
* <menuchoice>Input Devices</menuchoice>
* Keyboard tab at left (should be initially selected)
* <menuchoice>Advanced</menuchoice> tab at top right
* Expand <menuchoice>Compose key position</menuchoice>.
* Choose the key you prefer


=== Configuration for Gtk Applications (Gnome, FireFox, etc.) ===
{{Note|This instruction are probably obsolete. If GTK applications don't work ''out-of-the-box'', please go to the [[Special:myLanguage/Tutorials/ComposeKey#Troubleshooting|Troubleshooting section]].}}


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.
Les aplicacions GTK (com també Firefox) i Gnome utilitzen (en un sistema Ubuntu) normalment ''SCIM'' com a mètode d'entrada, no ''XIM'' (mètode d'entrada a X) que es basa en les configuracions de (X)Compose. Per tant, sovint trobareu que les macrons de «a» i «o» poden resultar en ordinals en castellà femení/masculí «ª» i «º». Per que encara funcioni, les aplicacions GTK precisen ser «informades» per a utilitzar XIM.


==== "One Off" Configuration ====
<span id="&quot;One_Off&quot;_Configuration"></span>
===Configuració «Una i prou»===


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''':
Per a només una aplicació podeu fer-ho definint la variable d'entorn ''GTK_IM_MODULE'' per a l'aplicació que es llançarà a '''Xim''':


{{Input|1= $ GTK_IM_MODULE=xim firefox}}
{{Input|1= $ GTK_IM_MODULE=xim firefox}}


More permanently that can be done for a single shell session like this:
Per a resoldre-ho de manera més permanent per a una única sessió de l'intèrpret d'ordres es pot fer:


{{Input|1= $ export GTK_IM_MODULE=xim}}
{{Input|1= $ 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.
Això pot, per descomptat, també fer-se persistent per només un usuari en el seu ''~/.bash_profile'', o per a tots els usuaris a ''/etc/environment''. Aquesta és, però, la manera menys elegant, la més elegant segueix a continuació.


==== Persistent Configuration ====
<span id="Persistent_Configuration"></span>
=== Configuració persistent ===


* Copy the setup file ''/etc/X11/xinit/xinput.d/default'' to ''/etc/X11/xinit/xinput.d/xim''
* Copieu el fitxer de configuració ''/etc/X11/xinit/xinput.d/default'' a ''/etc/X11/xinit/xinput.d/xim''.


{{Input|1= $ sudo cp /etc/X11/xinit/xinput.d/default /etc/X11/xinit/xinput.d/xim}}
{{Input|1= $ 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''
* Editeu el fitxer ''/etc/X11/xinit/xinput.d/xim'' i establiu-hi el mètode d'entrada per a ''GNOME'' i ''KDE'' a ''xim''.


{{Input|1=
{{Input|1=
Line 94: Line 92:
}}
}}


* Create a link for the locale ''all_ALL'' (or the desired locale only):
* Creeu un enllaç per a la configuració «locale» ''all_ALL'' (o només el «locale» que necessiteu):


{{Input|1= $ sudo ln -sf /etc/X11/xinit/xinput.d/xim /etc/X11/xinit/xinput.d/all_ALL}}
{{Input|1= $ 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
Si utilitzeu una distribució derivada de Debian simplement feu el següent
{{Input|1= $ sudo update-alternatives --verbose --install /etc/X11/xinit/xinput.d/all_ALL xinput-all_ALL /etc/X11/xinit/xinput.d/xim 20}}
{{Input|1= $ 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.
* Després de reiniciar el servidor X tot hauria de funcionar.


==== Optional Tweaking of XCompose Map ====
<span id="Optional_Tweaking_of_XCompose_Map"></span>
=== Ajust opcional del mapa de XCompose ===


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.
Ara que esteu utilitzant XIM, a més podeu modificar el mapa d'entrada per als caràcters XCompose, o per a posar-los en llocs més adequats, etc.


To do that follow these steps:
Per a fer-ho seguiu aquests passos:
* Create a ''~/.XCompose'' file, and put the following lines into it:
* Creeu un fitxer ''~/.XCompose'', i poseu-hi les següents línies:


{{Input|1=
{{Input|1=
  # ~/.XCompose
  # ~/.XCompose
  # This file defines custom Compose sequences for Unicode characters<br />
  # Aquest fitxer defineix seqüències personalitzades de Compose per a caràcters Unicode.<br />
# Import default rules from the system Compose file:
# Importa les regles per omissió des del fitxer Compose del sistema:
  include "/usr/share/X11/locale/en_US.UTF-8/Compose"<br />
  include "/usr/share/X11/locale/en_US.UTF-8/Compose"<br />
# To put some stuff onto compose key strokes:
# Per a posar algunes coses en les combinacions de tecles compose:
  <Multi_key> <minus> <greater> : "→" U2192 # Compose - >
  <Multi_key> <minus> <greater> : "→" U2192 # Compose - >
  <Multi_key> <colon> <parenright> : "☺" U263A   # Compose : )
  <Multi_key> <colon> <parenright> : "☺" U263A # Compose una emoticona somrient
  <Multi_key> <h> <n> <k> : "hugs and kisses" # Compose h n k
  <Multi_key> <h> <n> <k> : "hugs and kisses" # Compose h n k
  <Multi_key> <less> < p> : "< p></p>" # Compose < p
  <Multi_key> <less> < p> : "< 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.
* Només heu de sortir de la sessió i accedir de nou (sense reiniciar), i podreu utilitzar les vostres «tecles múltiples» usant la tecla compose triada. Com es veu, fins i tot funciona per a crear seqüències de caràcters més llargues.


=== Typing Macrons, Umlauts, Accents, ... ===
<span id="Typing_Macrons,_Umlauts,_Accents,_..."></span>
== Escriure macrons, dièresis, accents... ==


The <keycap>compose</keycap> key will be now whatever you have configured it to be, e. g. <keycap>right logo</keycap>.
La tecla <keycap>compose</keycap> ara serà la que heu configurat, per exemple, <keycap>logotip de la dreta</keycap>.


* Macrons
* Macrons
{{Input|1=<keycap>compose + shift + hyphen</keycap> then ''<vowel >''}}or {{Input|1=<keycap>compose + underscore</keycap> then ''<vowel >''}}
{{Input|1=<keycap>compose + Majús. + guionet</keycap> llavors ''<vocal >''}}o {{Input|1=<keycap>compose + guionet baix</keycap> llavors ''<vocal >''}}


<div class="mw-translate-fuzzy">
--> {{Output|1=āēīōū ĀĒĪŌŪ}}
--> {{Output|1=āēīōū ĀĒĪŌŪ}}
</div>




* Umlauts
* Dièresis
{{Input|1=<keycap>compose + shift + <single quote></keycap> then ''<vowel >''}}or {{Input|1=<keycap>compose + <double quotes></keycap> then ''<vowel >''}}  
{{Input|1=<keycap>compose + Majús. + <cometa simple></keycap> llavors ''<vocal >''}}o {{Input|1=<keycap>compose + <cometes dobles></keycap> llavors ''<vocal >''}}  


<div class="mw-translate-fuzzy">
--> {{Output|1=äëïöü ÄËÏÖÜ}}
--> {{Output|1=äëïöü ÄËÏÖÜ}}
</div>




* The German ''Ess-Zet'' ligature
* La lletra ''Ess-Zet'' de l'alemany
{{Input|1=<keycap>compose</keycap> then <keycap>s</keycap> and <keycap>s</keycap> (twice the "s")}}
{{Input|1=<keycap>compose</keycap> llavors <keycap>s</keycap> i <keycap>s</keycap> (dues vegades la «s»)}}


<div class="mw-translate-fuzzy">
--> {{Output|1=ß }}
--> {{Output|1=ß }}
</div>




* More bindings can be found in ''/usr/share/X11/locale/en_US.UTF-8/Compose''
* Es poden trobar més enllaços a ''/usr/share/X11/locale/en_US.UTF-8/Compose''.
<span id="Links and Further Information"></span>
<span id="Links and Further Information"></span>
=== Links and Further Information ===
<span id="Troubleshooting"></span>
== Solució de problemes ==
 
<span id="Compose_key_does_not_work_in_GTK_applications"></span>
=== La tecla compose no funciona en les aplicacions GTK ===
 
In {{Path|.xinputrc}}, delete the line with the following content: <code>run_im ibus</code>. Then reboot your computer, or restart the X server.
 
<span id="More_Information"></span>
== Més informació ==


* http://cyberborean.wordpress.com/2008/01/06/compose-key-magic/
* http://cyberborean.wordpress.com/2008/01/06/compose-key-magic/
Line 157: Line 172:
* http://hdante.blogspot.com/2007/05/kiel-oni-skribas-typing-esperanto.html
* http://hdante.blogspot.com/2007/05/kiel-oni-skribas-typing-esperanto.html


[[Category:Tutorials]]
[[Category:Guies d'aprenentatge/ca]]
[[Category:Advanced Users]]
[[Category:Usuaris avançats/ca]]

Latest revision as of 08:31, 25 May 2024

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ó» 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, el LibreOffice, així com moltes aplicacions de només text o a la consola.

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

Espai de treball Plasma

  • Select Input Devices then Keyboard
  • Click the Advanced tab
  • Click the box next to Configure Keyboard Options to enable changing keyboard options
  • Click the icon next to Position of Compose key
  • Feu clic en la casella al costat de la tecla desitjada per a activar-la

Configuració de la consola

̣

Note

This instruction are old and only works in Debian based system. If you know a better way, feel free to edit this wiki page.


Per fer-ho correctament, estic intentant seguir el «camí holístic» començant per 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 joc 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ó per a aplicacions GTK (Gnome, Firefox, etc.)

Note

This instruction are probably obsolete. If GTK applications don't work out-of-the-box, please go to the Troubleshooting section.


Les aplicacions GTK (com també Firefox) i Gnome utilitzen (en un sistema Ubuntu) normalment SCIM com a mètode d'entrada, no XIM (mètode d'entrada a X) que es basa en les configuracions de (X)Compose. Per tant, sovint trobareu que les macrons de «a» i «o» poden resultar en ordinals en castellà femení/masculí «ª» i «º». Per que encara funcioni, les aplicacions GTK precisen ser «informades» per a utilitzar XIM.

Configuració «Una i prou»

Per a només una aplicació podeu fer-ho definint la variable d'entorn GTK_IM_MODULE per a l'aplicació que es llançarà a Xim:

$ GTK_IM_MODULE=xim firefox

Per a resoldre-ho de manera més permanent per a una única sessió de l'intèrpret d'ordres es pot fer:

$ export GTK_IM_MODULE=xim

Això pot, per descomptat, també fer-se persistent per només un usuari en el seu ~/.bash_profile, o per a tots els usuaris a /etc/environment. Aquesta és, però, la manera menys elegant, la més elegant segueix a continuació.

Configuració persistent

  • Copieu el fitxer de configuració /etc/X11/xinit/xinput.d/default a /etc/X11/xinit/xinput.d/xim.
$ sudo cp /etc/X11/xinit/xinput.d/default /etc/X11/xinit/xinput.d/xim
  • Editeu el fitxer /etc/X11/xinit/xinput.d/xim i establiu-hi el mètode d'entrada per a GNOME i KDE a xim.
...
 GTK_IM_MODULE=xim
 QT_IM_MODULE=xim
 ...
  • Creeu un enllaç per a la configuració «locale» all_ALL (o només el «locale» que necessiteu):
$ sudo ln -sf /etc/X11/xinit/xinput.d/xim /etc/X11/xinit/xinput.d/all_ALL

Si utilitzeu una distribució derivada de Debian simplement feu el següent

$ sudo update-alternatives --verbose --install /etc/X11/xinit/xinput.d/all_ALL xinput-all_ALL /etc/X11/xinit/xinput.d/xim 20
  • Després de reiniciar el servidor X tot hauria de funcionar.

Ajust opcional del mapa de XCompose

Ara que esteu utilitzant XIM, a més podeu modificar el mapa d'entrada per als caràcters XCompose, o per a posar-los en llocs més adequats, etc.

Per a fer-ho seguiu aquests passos:

  • Creeu un fitxer ~/.XCompose, i poseu-hi les següents línies:
# ~/.XCompose
 # Aquest fitxer defineix seqüències personalitzades de Compose per a caràcters Unicode.
# Importa les regles per omissió des del fitxer Compose del sistema: include "/usr/share/X11/locale/en_US.UTF-8/Compose"
# Per a posar algunes coses en les combinacions de tecles compose: <Multi_key> <minus> <greater> : "→" U2192 # Compose - > <Multi_key> <colon> <parenright> : "☺" U263A # Compose una emoticona somrient <Multi_key> <h> <n> <k> : "hugs and kisses" # Compose h n k <Multi_key> <less> < p> : "< p>

" # Compose < p
  • Només heu de sortir de la sessió i accedir de nou (sense reiniciar), i podreu utilitzar les vostres «tecles múltiples» usant la tecla compose triada. Com es veu, fins i tot funciona per a crear seqüències de caràcters més llargues.

Escriure macrons, dièresis, accents...

La tecla compose ara serà la que heu configurat, per exemple, logotip de la dreta.

  • Macrons
compose + Majús. + guionet llavors <vocal >

o

compose + guionet baix llavors <vocal >
-->
āēīōū ĀĒĪŌŪ


  • Dièresis
compose + Majús. + <cometa simple> llavors <vocal >

o

compose + <cometes dobles> llavors <vocal >
-->
äëïöü ÄËÏÖÜ


  • La lletra Ess-Zet de l'alemany
compose llavors s i s (dues vegades la «s»)
-->
ß


  • Es poden trobar més enllaços a /usr/share/X11/locale/en_US.UTF-8/Compose.

Solució de problemes

La tecla compose no funciona en les aplicacions GTK

In .xinputrc, delete the line with the following content: run_im ibus. Then reboot your computer, or restart the X server.

Més informació