LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-03-2012, 08:45 AM   #1
Shammyhealz
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Rep: Reputation: Disabled
Custom Keyboard Layout?


Hello all, I have a question that I think should have a fairly simple answer, but I can't be sure, and I can't seem to find the answer on Google (all my results are about how to change to another default keyboard layout, which I already know how to do). Anyhow, I am running Debian with XFCE4 (also have Fluxbox, but haven't had the time to set it up how I like it, so XFCE4 for now) and I want to try to set up a custom keyboard layout (I am also not opposed to using a default layout if there is one that is similar enough to what I need that one of you know of) that allows me to use alternate characters (the accented characters, and the N with a tilde over it) by simply pressing Ctrl+X where X is the normal version of the key. I have tried using the Spanish keyboard, as I am going to use this to type in Spanish, but having all my punctuation and non alphanumeric keys all over the place drives me nuts. Does anyone know where the key map files are and in what way I would edit them, or an easier way to do what I want? Many thanks!
 
Old 10-03-2012, 10:15 AM   #2
segmentation_fault
Member
 
Registered: Sep 2008
Location: Ioannina, Greece
Distribution: Gentoo
Posts: 332

Rep: Reputation: 55
Take a look at /usr/share/X11/locale/ at the compose files. I think there are some files for the keyboard layout but I can't remember now. I will repost if I find them.

Edit: Found some more. Look at /usr/share/keymaps/

Last edited by segmentation_fault; 10-03-2012 at 10:17 AM.
 
1 members found this post helpful.
Old 10-03-2012, 11:49 AM   #3
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,162

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
There are four ways of getting accented letters:

1. Devote a whole key to the accented letter, as happens on many keyboard layouts at the expense of things like []{}.

2. Devote a key to a accent, so that if it generates a dead acute you can type that key, followed by "e", and get "". This has the same problem of eating up your keys.

3. Use a third level shift key (often called by Microsoft's odd term, "alternative graphics"); European keyboards label the right Alt as AltGR. In a Polish keyboard, TLS+s will give "ś". This is like your idea, but the problem with your idea is that the Control key is used by programs.

4. Use a compose key (the Windows menu key is a popular key to use), then Comp+^+e will produce "". The official compose sequences can be customised with a file ~/-XCompose.

There is a page in the wiki on this site that explains all this in more detail. Most distros will allow you to select keys for TLS and Comp with their keyboard configuration tool. Options 1-3 obviously require you to edit your language's keyboard definition file. So mine is /usr/share/X11/xkb/symbols/gb; an American would have /usr/.../us. In the latter, you'd have a line like
key <AB06> { [ n, N ] };
Replacing it with
key <AB06> { [ n, N, , ] };
would give you "" with TLS+n and "" with TLS+Sh+n. Always make a backup of the file before altering it: if it's broken you may find yourself dumped in the command line!

Last edited by DavidMcCann; 10-03-2012 at 11:50 AM.
 
1 members found this post helpful.
Old 10-05-2012, 09:50 AM   #4
Shammyhealz
LQ Newbie
 
Registered: Oct 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Ah, thank you guys so much, I apologize for the long wait for response, I stupidly left my laptop charger at work, which made it difficult to work on, haha, I'm going to try the comp key method, I'll let you know how it goes!
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a custom keyboard layout in Kubuntu dotancohen Linux - General 2 03-01-2011 03:20 PM
Change character in custom keyboard layout jdtiede Linux - Software 1 03-10-2010 05:48 AM
[SOLVED] Help with custom keyboard layout lucmove Linux - Hardware 7 09-07-2009 04:01 PM
Switching keyboard layout - Mandriva2006 - K.D.E. Windows Layout! itz2000 Mandriva 3 08-13-2006 07:43 PM
KDE Keyboard Shortcuts with different Keyboard Layout hellblade Linux - Software 5 04-18-2006 01:40 AM


All times are GMT -5. The time now is 10:29 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration