You are not logged in.

#1 2011-03-09 18:36:56

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Emacs: C-x is to be C-x regardless of the keyboard layout

Hi,

Is there a way to tell Emacs to honor shortcuts as English regardless of the current keyboard layout?

Offline

#2 2011-03-09 18:53:14

vanvalium
Member
From: Austria
Registered: 2010-10-09
Posts: 86

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

Could you elaborate on that? I don't really get what you mean...

Offline

#3 2011-03-09 19:14:27

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

vanvalium wrote:

Could you elaborate on that? I don't really get what you mean...

I mean that as soon I switch into a non-English keyboard layout, all the standard shortcuts won't cut.

Emacs says something like

C-ч is undefined.

Russian ч sits on the same key as x.

Offline

#4 2011-03-09 19:55:47

escondida
Package Maintainer (PM)
Registered: 2008-04-03
Posts: 157

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

I think you'll find the info you need in the International section of the Emacs manual (most easily accessed from the builtin info browser: C-h i)

Offline

#5 2011-03-10 04:04:46

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

joyfulgirl wrote:

I think you'll find the info you need in the International section of the Emacs manual (most easily accessed from the builtin info browser: C-h i)

http://www.gnu.org/software/emacs/manual/

Is there really the International section there?

Offline

#6 2011-03-10 04:21:21

upsidaisium
Member
From: Vietnam
Registered: 2006-09-16
Posts: 263
Website

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

Llama wrote:
joyfulgirl wrote:

I think you'll find the info you need in the International section of the Emacs manual (most easily accessed from the builtin info browser: C-h i)

http://www.gnu.org/software/emacs/manual/

Is there really the International section there?

Sure is - you just didn't look hard enough wink http://www.gnu.org/software/emacs/manua … ernational

(You had to click the "GNU Emacs Manual" link at the top of the list of links to get into the manual that joyfulgirl was referring to)


I've seen young people waste their time reading books about sensitive vampires. It's kinda sad. But you say it's not the end of the world... Well, maybe it is!

Offline

#7 2011-03-11 04:18:53

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

Thanks, upsidaisium! There's a lot of useful info there. Nothing about the subject matter, unfortunately.

Offline

#8 2011-03-14 18:56:22

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

bump

Offline

#9 2011-03-14 19:56:46

canolucas
Member
Registered: 2010-05-23
Posts: 59

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

why would you use a layout for a language that doesn't fit your keyboad ?
i'm afraid that what you want is not possible.. emacs will always try to fit your keyboard.. if you want to use X, you need the english layout, if you want to use ч, you'll need russian's.. makes sense, doesn't it?

Offline

#10 2011-03-15 02:52:59

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

canolucas wrote:

why would you use a layout for a language that doesn't fit your keyboad ?
i'm afraid that what you want is not possible.. emacs will always try to fit your keyboard.. if you want to use X, you need the english layout, if you want to use ч, you'll need russian's.. makes sense, doesn't it?

Eh? I want the standard shortcuts to work regardless of the language I type in. What's wrong with that?

Offline

#11 2011-03-15 08:59:58

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

Then bind C-ч ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#12 2011-03-15 12:45:00

grizzeledtop
Member
From: Zurich, Switzerland
Registered: 2006-03-08
Posts: 30

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

I use the following in my .emacs in order to have C-s produce C-s and C-d C-c:

(keyboard-translate ?\C-s ?\C-x)
(keyboard-translate ?\C-x ?\C-s)
(keyboard-translate ?\C-d ?\C-c)
(keyboard-translate ?\C-c ?\C-d)


You scratch my back, I'll ride on yours

Offline

#13 2011-03-16 05:07:23

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

That is, I have to dig up and bind everything once again manually? No other way? How sad.

Offline

#14 2011-03-16 08:29:49

grizzeledtop
Member
From: Zurich, Switzerland
Registered: 2006-03-08
Posts: 30

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

To the best of my knowledge: yes
set the us keyboardard and run `xev'; pressing x will tell you its keycode 53 and its KeySymbol 'x'.
`setxkbd ru' and pressing the same key will still get you keycode 53 but the russian symbol.
Emacs sees KeySyms only, not keycodes; there's no way to change that (I think).


You scratch my back, I'll ride on yours

Offline

#15 2014-03-07 19:41:52

rolling.robot
Member
Registered: 2013-02-14
Posts: 9

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

Llama, have you managed to solve your problem with keybindings?

Offline

#16 2014-03-08 18:41:41

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Emacs: C-x is to be C-x regardless of the keyboard layout

The thread is three years old; please don't necrobump: https://wiki.archlinux.org/index.php/Fo … Bumping.27



Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB