Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.