View previous topic :: View next topic |
Author |
Message |
scott_karana n00b
Joined: 06 Mar 2004 Posts: 28 Location: GNU's Not Linux
|
Posted: Thu Dec 30, 2004 3:49 am Post subject: Windows Unicode Keychords in Linux |
|
|
When I use(d) Windows, I'm always finding myself using the ALT+ Number keystrokes (Like Alt + 0233) that Windows has implemented. Even DOS had this functionality, actually, for Extended ASCII. For me to get something like this working (Or better yet, things lke the C-` + e for a grave-accented e, like in MS Word) would I need a WM that keytrapped that sort of key combination, and then bind that combo to output a character? Or is there a better way? Or one already in place? I'd like some help here, beyond getting recommendations for making or scripting keymaps :S |
|
Back to top |
|
|
/dev/random l33t
Joined: 26 Nov 2004 Posts: 704 Location: Austin, Texas, USA
|
Posted: Thu Dec 30, 2004 4:30 am Post subject: |
|
|
xorg supports that just fine you just have to do things a little bit differently. It was in the Gentoo Weekly Newsletter a while back but I'll just tell you how to do it again since I don't feel like finding that.
Code: |
Add this into the keyboard section of your /etc/X11/xorg.conf
Option "XkbOptions" "compose:rwin"
|
That line sets my "compose" key as the right windows key (change rwin with any other key if you want to)
NOTE: It should be a key you don't want to use anymore because from now on it will only function as your compose key and nothing else.
Then look in /usr/X11R6/lib/X11/locale/<your locale>/Compose for a list of the key combos and where it says <Multi_key> use the key you set as your "compose key."
For example, my locale is iso8859-15 (well technically for the US its iso8859-1 but I changed it to that). So I look in /usr/X11R6/lib/X11/locale/iso8859-15/Compose to see all the various key combos.
For me é is right windows key+ ' + e ü is right windows key+ " + u (seems slightly more logical than alt+number combo if you ask me). |
|
Back to top |
|
|
reup Guru
Joined: 13 May 2005 Posts: 419 Location: Nederland
|
Posted: Mon Aug 28, 2006 8:59 pm Post subject: insert ASCII code in text |
|
|
hello all,
a simple question I am sure :
how can I insert an ascii code in a text I am typing (like in this window)
I use to simply press the ALT key then type the number of the code, but now, I have a lot of differents behavious
in firefox, as soon as I type ALT-1, I am move to the tab 1, so I cannot use it in emails,
any clues ? _________________ reup
"Don't wiggle the tail of the frog in the oil of the frying peanuts" |
|
Back to top |
|
|
claw n00b
Joined: 26 Jan 2004 Posts: 32 Location: Campbell, CA
|
Posted: Tue Aug 29, 2006 7:08 am Post subject: |
|
|
I use the Gnome Character Palette applet. To get yours, right-click on a Gnome panel and select Add...
Using it: Click on a character in the palette. Then paste where you want it. |
|
Back to top |
|
|
reup Guru
Joined: 13 May 2005 Posts: 419 Location: Nederland
|
Posted: Tue Aug 29, 2006 9:33 am Post subject: |
|
|
oops, I use kde, any tip for kde ?
but what if I use only the console ? it might be as well a bash difference as on the console, if I typpe ALT130, I end up with some (arg0). so ALT is a shortcut on bash, it is a switch screen on firefox, it return some strange things on kate, kwrite and kword, and does nothing on openoffice
maybe I need to find all seperatly ?
thanks claw for the tip for gnome _________________ reup
"Don't wiggle the tail of the frog in the oil of the frying peanuts" |
|
Back to top |
|
|
dleverton Guru
Joined: 28 Aug 2006 Posts: 517
|
Posted: Tue Aug 29, 2006 10:57 am Post subject: |
|
|
reup wrote: | oops, I use kde, any tip for kde ? |
For KDE, use kcharselect - there's an applet as well, but it makes you predefine the characters you want to use. That may or may not be enough for what you need.
reup wrote: | but what if I use only the console ? |
For the console, it works by default on my machine, but
1. you need to use AltGr instead of plain Alt
2. you need to enter the code on the number pad, not the normal numbers
3. you need to enter the code in hex, not decimal. For the letters, use NumLock, /, *, - and + for A, B, C, D and E, again all on the number pad. I expect Enter would be F, but I can't test it because I have a laptop and the "number pad" overlayed on the normal keys doesn't seem to have an Enter. |
|
Back to top |
|
|
reup Guru
Joined: 13 May 2005 Posts: 419 Location: Nederland
|
Posted: Wed Aug 30, 2006 11:23 am Post subject: |
|
|
dleverton,
as soon as I type any alt or control key followd by a number I get this :
this is for konsole
on gnome-terminal, the control key or alt key does not change the behaviour of the pad keys, ALT-1 and ALTGR-1will type 1
maybe I am mistaken in the way to use hex number.
I just tried to add a code for e with ' on top in this window. as soon as I press altgr-number, it flips between the different tabs of firefox
it seems that the behaviour of my altgr key is different than yours
this was done with kcharselect but it seems a bit primitif to copy-past caracters while I already know the ASCII codes for them and could enter it on the keyboard.
thanks for your help, I am very gratefull for your time _________________ reup
"Don't wiggle the tail of the frog in the oil of the frying peanuts" |
|
Back to top |
|
|
desultory Bodhisattva
Joined: 04 Nov 2005 Posts: 9410
|
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1894 Location: Switzerland (Romandie)
|
Posted: Sun May 04, 2008 1:15 pm Post subject: |
|
|
If that can help someone, here is what I done in order to get the compose key to work in FVWM with the console, KDE and Gnome applications. I am using fr_CH.UTF-8 for my user's locales.
/etc/X11/xorg.conf
Code: | Section "InputDevice"
Driver "keyboard"
Identifier "Keyboard[0]"
Option "Protocol" "Standard"
Option "XkbLayout" "ch"
Option "XkbRules" "xorg"
Option "XkbVariant" "fr"
Option "XkbModel" "pc105"
Option "XkbOptions" "compose:rwin"
EndSection
|
The most important here is the XkbOptions line. It use the right windows key on my keyboard. To find a valid key for your keyboard, look for "Compose key" in /usr/share/X11/xkb/rules/xorg.lst. It is one of ralt, lwin, rwin, menu, rctrl or caps at that time of writing.
I also copied over /usr/share/X11/locale/en_US.UTF-8/Compose to ~/.XCompose
That way, it is easy to add custom key combinations. It is just to add them at the beginning of ~/.XCompose. As example :
Code: | <Multi_key> <minus> <o> : "Θ" |
After that, the compose key must work in the console.
For KDE and GTK+ (Gnome) application, create or edit ~/.xprofile and add :
Code: | export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim |
_________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|