LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-03-2008, 10:27 AM   #1
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Fedora 13 (Gnome user), Debian (on older second computer)
Posts: 46

Rep: Reputation: 15
Type en-dash


Tired of typing Ctrl+Shift+U followed by 2013, I'd like to set Alt plus a hyphen to give an en-dash from my keyboard. Can anyone explain the easiest way to do this? Will it be with Xmodmap? If so what is the keycode for Alt plus a hyphen?

Last edited by r-t; 04-03-2008 at 10:39 AM.
 
Old 04-03-2008, 10:38 AM   #2
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Fedora 13 (Gnome user), Debian (on older second computer)
Posts: 46

Original Poster
Rep: Reputation: 15
I've just found I can set the left Windows key to "Compose" and hit it and type two hyphens plus a full stop. Perhaps I should be content with that.

Last edited by r-t; 04-03-2008 at 10:42 AM.
 
Old 04-03-2008, 07:45 PM   #3
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Rep: Reputation: 15
You may edit your keymapping if you like.
fire up your favourite editor and choose your map from under /usr/share/X11/xkb/keymap/ somewhere.
I don't know the details but there is probably a man page or something on google for it.
 
Old 04-04-2008, 02:45 AM   #4
r-t
Member
 
Registered: Oct 2004
Location: Manchester UK
Distribution: Fedora 13 (Gnome user), Debian (on older second computer)
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by wilsonsamm View Post
You may edit your keymapping if you like.
fire up your favourite editor and choose your map from under /usr/share/X11/xkb/keymap/ somewhere.
I don't know the details but there is probably a man page or something on google for it.
Well, I know that I can go to /usr/share/X11/xkb/symbols/gb and find:

Code:
partial default alphanumeric_keys
xkb_symbols "basic" {

    // Describes the differences between a very simple en_US
    // keyboard and a very simple U.K. keyboard layout defined by
    // the SVR4 European Language Supplement and sometimes also
    // known as the IBM 166 layout.

    include "latin"

    name[Group1]="United Kingdom";

    key <AE02>	{ [         2,   quotedbl,  twosuperior,    oneeighth ]	};
    key <AE03>	{ [         3,   sterling, threesuperior,    sterling ]	};
    key <AE04>	{ [         4,     dollar,     EuroSign,   onequarter ]	};

    key <AC11>	{ [apostrophe,         at, dead_circumflex, dead_caron]	};
    key <TLDE>	{ [     grave,    notsign,          bar,          bar ]	};

    key <BKSL>	{ [numbersign, asciitilde,   dead_grave,   dead_breve ]	};
    key <LSGT>	{ [ backslash,        bar,          bar,    brokenbar ]	};

    include "level3(ralt_switch_multikey)"
};
which means for example that key AE02, the key with the number 2 on most keyboards gives the number 2 when pressed normally, gives the double quote " when pressed with shift, gives a superscript 2 when pressed with the right alt key and gives one-eight ⅛ when pressed with the right alt key plus shift. How one goes about making things change with the left alt key I'm not so sure. It's something to do with the "level" setting like it says here include "level3(ralt_switch_multikey)".

The keyboard files are so interrelated it's very difficult to work out what does what without a clear, up-to-date howto.
 
Old 04-04-2008, 11:34 AM   #5
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 105

Rep: Reputation: 15
Yes it really is. I'm thinking I'm going to also make a HOWTO for this. But why not sacrifice some other glyph you hardly ever use to map en-dash onto your keyboard?
Also, let us know how you get on.
 
Old 04-04-2008, 01:57 PM   #6
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by r-t View Post
I've just found I can set the left Windows key to "Compose" and hit it and type two hyphens plus a full stop.
Thatís what I do. If you donít want to mess with keymaps, you can customize your Compose key combinations as well. Just have a file in your home directory named .XCompose, and put it the line:
Code:
<Multi_key> <key1> <key2> : "Ė"   U2013 # EN DASH
Note that this will get rid of all the default key combos, so you will want to copy those over as well (making sure to grep for any conflicts).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dash ignoring PATH? BuilderQ Linux - Software 3 12-18-2007 06:00 PM
dash logout script? Coviti Debian 2 09-24-2007 01:40 PM
howto change $PS1 when using su (without dash) remcovr Red Hat 2 09-07-2006 12:20 PM
What are those double-dash (--) options in man? Utah Linux - Newbie 4 06-04-2004 10:53 PM
Red Hat 8 Dash Character meshcurrent Linux - General 3 02-20-2003 12:51 AM


All times are GMT -5. The time now is 11:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration