From owner-freebsd-questions@FreeBSD.ORG Sat Mar 12 21:43:39 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAF9E106566C for ; Sat, 12 Mar 2011 21:43:39 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id AAED88FC13 for ; Sat, 12 Mar 2011 21:43:39 +0000 (UTC) Received: from r55.edvax.de (port-92-195-114-16.dynamic.qsc.de [92.195.114.16]) by mx02.qsc.de (Postfix) with ESMTP id 2C6A91E297; Sat, 12 Mar 2011 22:43:37 +0100 (CET) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p2CLhbYp002140; Sat, 12 Mar 2011 22:43:37 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sat, 12 Mar 2011 22:43:36 +0100 From: Polytropon To: Antonio Olivares Message-Id: <20110312224336.ade79718.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: FreeBSD Questions Subject: Re: Character shortcuts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Mar 2011 21:43:40 -0000 On Sat, 12 Mar 2011 14:07:59 -0600, Antonio Olivares wrote: > Dear FreeBSD experts, > > There has been something that I find hard to do, I would like to find > a CTRL + KEY combination, or ALT + KEY combination to input special > characters like (ñ) [ALT + 164 or ALT + 0241 in Mr. Gates OS]. > > http://www.forlang.wsu.edu/help/keyboards.asp > > accents other symbols like copyright, euro, etc. I would like to do > the same(have a special key combination) to get the characters in > FreeBSD too, but googling have not found something that works. I even > tried to run a litte program in the shell to generate the characters > to use for cutting + pasting to no avial. Depending on your keyboard and language settings, many characters can be generated by Alt+Letter. There is also a COMPOSE key on some keyboards - and those that don't have it can be told to do so by xmodmap. Using the COMPOSE approach, you combine a letter with an accent or any other symbol, and if there is a matching result in your character set (or font), it will be displayed. Here are some examples: Compose a a -> å (svedish a-circle) Compose s s -> ß (german Eszett ligature) Compose U " -> Ü (german U Umlaut, capital) Compose L / -> Ł (polish L-stroke, capital) Compose a , -> ą (polish a-comma) Compose o / -> ø (danish o-stroke) Compose k k -> ĸ (greek kappa) Compose n ' -> ń (n with accent grave) And of course: Compose n ~ -> ñ. Depending on how characters like `, ´, ^ or ~ are handled (single character immediately output, or combination character that waits for the next letter to automatically construct a new one), Compose may be needed or not. On the default german keyboard setting, 'e gives é, ~n gives ñ and ^a gives â immediately without using Compose. My ~/.xmodmaprc contains (along with other lines): add mod4 = Multi_key keycode 117 = Multi_key You can find out the keycodes using the "xev" program. Your keyboard settings maybe sets other characters than can be created with Alt+letter or AltGr+letter (the german keyboard's right Alt key is labeled AltGr, or Alt Graph on my Sun keyboard), e. g. ¬¹²³¼½¬{[]}\ @ł€¶ŧ←↓→øþþ¨ æßðđŋħjĸł˝^ «»¢“”nµ·, and with Shift ¬¡⅛£¤⅜⅝⅞™±°¿¿˛ ΩŁ€®Ŧ¥↑ıØÞ˚ ƧЪŊĦJ&Ł˝ˇ ¦<>©‘’Nº×÷. So instead of memorizing arbitrary numbers as in MICROS~1 land, you can see a relation between the letter and the key you need to press in order to generate it. You can also rearrange them if you feel a need for that. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...