From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Switching non-English keyboard layouts and using Emacs shortcuts Date: Wed, 13 May 2015 15:02:43 +0600 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1431507801 14244 80.91.229.3 (13 May 2015 09:03:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 May 2015 09:03:21 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Shakthi Kannan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 13 11:03:20 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YsSZT-0000n3-Ns for geh-help-gnu-emacs@m.gmane.org; Wed, 13 May 2015 11:03:19 +0200 Original-Received: from localhost ([::1]:47328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsSZS-0004ni-Pn for geh-help-gnu-emacs@m.gmane.org; Wed, 13 May 2015 05:03:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsSZG-0004nF-V2 for help-gnu-emacs@gnu.org; Wed, 13 May 2015 05:03:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsSZF-0000pI-KP for help-gnu-emacs@gnu.org; Wed, 13 May 2015 05:03:06 -0400 Original-Received: from mail-la0-x231.google.com ([2a00:1450:4010:c03::231]:34666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsSZF-0000pD-Bb for help-gnu-emacs@gnu.org; Wed, 13 May 2015 05:03:05 -0400 Original-Received: by laat2 with SMTP id t2so24509427laa.1 for ; Wed, 13 May 2015 02:03:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=ELw7BBkDjWmn2coxSFuEE3FpMQweztUeBLQDAQRVuig=; b=Y+6t9xgpVXObHAvLMZYXu0usTWDx0juJ3VeynZUDuM0EC2KmyKa28wMmADRMdRgL4E DEfbSUrBXWggXJxSv/flBOLGdxbFByWRZGI1YGLK1wS9K60XLULEkUKcKvYwvfqNWnzD qaPelKA0dsuzkvhSph87VL7N/hcJ8U7rvGtxd4qL1EEpNJaxVXCOhKRHBikSaf69ULci CQqVSLiOkXJGp+f/fJnHY1ZhvO7i/TwdlKJgRNJpW4Ver09Pjt784E6LddOIECDAn4RX cAuh56UU50c05iAVHQY1mN8tFkaeFSf/RZs9uc7iq0ykyQrodY0uYTikdTwj8mS1Vtm1 lqYQ== X-Received: by 10.152.9.66 with SMTP id x2mr15200691laa.36.1431507783842; Wed, 13 May 2015 02:03:03 -0700 (PDT) Original-Received: by 10.25.43.65 with HTTP; Wed, 13 May 2015 02:02:43 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: 6cS1OzG0PONXdggSNX9Uz_3pdx0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104437 Archived-At: On Wed, May 13, 2015 at 10:35 AM, Shakthi Kannan wr= ote: > I am using GNU Emacs 24.3.1 on Ubuntu 14.10. I use the following to > switch between Dvorak and Tamil (native language) keyboard layouts > respectively: > > $ setxkbmap us -variant dvorak > $ setxkbmap -layout in -variant tam_unicode You might prefer e.g. this: $ setxkbmap us,in dvorak,tam_unicode grp:caps_toggle This way, you will be able to switch layouts instantly by pressing Caps Lock. See your /usr/share/X11/xkb/rules/evdev file for other ways of switching groups if Caps Lock is precious to you. > #2 How do other people who use non-English layouts use Emacs shortcuts > with their native language input method? I use this snippet which I lifted I don=E2=80=99t remember where: =3D=3D=3D (require 'cl) (loop for from across "\=D1=8D=D1=83=D0=B5=D0=B8=D1=86=D1=87=D0=BA=D1=81=D0=B4=D0=B7=D1=88=D1=89= =D1=8C=D1=8F=D0=B0=D0=BE=D0=B6=D0=B3=D1=82=D0=BD=D0=B2=D0=BC=D1=8E=D0=B9=D1= =8B=D1=91=D1=84=D1=85=D0=BF=D1=80=D0=BB=D0=B1\=D0=AD=D0=A3=D0=95=D0=98=D0= =A6=D0=A7=D0=9A=D0=A1=D0=94=D0=97=D0=A8=D0=A9=D0=AC=D0=AF=D0=90=D0=9E=D0=96= =D0=93=D0=A2=D0=9D=D0=92=D0=9C=D0=AE=D0=99=D0=AB=D0=81=D0=A4=D0=A5=D0=9F=D0= =A0=D0=9B=D0=91" for to across "\\wfpgjluy;[]arstdhneiozxcvbkm,./\\WFPGJLUY;[]ARSTDHNEIOZXCVBKM,./" do (eval `(define-key key-translation-map (kbd ,(concat "C-" (string from))) (kbd ,(concat "C-" (string to))))) (eval `(define-key key-translation-map (kbd ,(concat "M-" (string from))) (kbd ,(concat "M-" (string to))))) (eval `(define-key key-translation-map (kbd ,(concat "C-M-" (string from)= )) (kbd ,(concat "C-M-" (string to)))= ))) =3D=3D=3D It is inelegant but makes life halfway bearable. (Non-C-M-modified keys such as those in dired stay untranslated.)