Ticket #2343 (new enhancement)

Opened 14 years ago

Last modified 10 years ago

hotkey on any language

Reported by: x905 Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc: zaytsev
Blocked By: Blocking: #2994
Branch state: no branch Votes for changeset:

Description

is it possible what hotkeys works on any language ?
for example i want search file dialog on "M-?" and on "M-," (on russian)
hotkeys must be "keys of keyboard" combination, not of chars

Change History

comment:1 Changed 14 years ago by andrew_b

mc doesn't know about "keys of keyboard". mc uses sequences (escape or not) sent by terminal emulator or console. mc works with keyboard indirectly via screen library (s-lang or ncurses) layer.

comment:2 Changed 14 years ago by x905

its very sad for me (i think it wrong by design)
ok, can i add another (alternative) key sequences to standard "hotkeys" ?

comment:3 Changed 14 years ago by zaytsev

  • Cc zaytsev added

It is not wrong by design, it's just that mc works at a higher level and doesn't know anything about keyboard. This is a sad fact of life. If you have better ideas go ahead and implement them.

I am also interested in this feature, but I don't know how to implement this in any other way then creating a huge list of layouts. Maybe querying X is an option?

Yes, you can add alternatives for select key bindings. Have a look at keymap files and read the man page.

comment:4 Changed 14 years ago by x905

understood
will use alternatives

comment:5 Changed 14 years ago by x905

hmm, howto add alternative to history in command lines ?
CmdHistory? = alt-h; alt-р(russian letter рэ) - not work

comment:6 Changed 14 years ago by andrew_b

Unforunately, it doesn't work in non-ascii locales (see #1634).

comment:7 follow-up: ↓ 10 Changed 14 years ago by x905

can it be fixed ?

comment:8 Changed 14 years ago by zaytsev

Everything can be fixed. The question is: when?

comment:9 Changed 14 years ago by wayfarer

I'd agree with reporter that it's wrong by design, if not in mc then in underlying libraries. After all, who in the world needs layout-specific chars with modifiers like Ctrl and Alt, whereas such combinations are commonly used as shortcuts?

Unfortunately, this problem is not specific to mc, it appears also in some other progs under Linux. But in other ones (eg Firefox) shortcuts work as desired (ie layout-independent), which should mean, that solution or at least workaround exists.

IMO the right way to go from the library side would be to give an application a possibility to choose, whether it wants to receive localized chars or not (via separate function, parameter etc). I'll try to investigate this problem further, cause it's one of really annoying bugs, which make a life more painful just for nothing.

comment:10 in reply to: ↑ 7 Changed 14 years ago by angel_il

Replying to x905:

can it be fixed ?

in progress...

comment:11 follow-up: ↓ 12 Changed 14 years ago by zaytsev

Did you notice that Firefox is not an application which runs from inside a terminal emulator by the way? That's why I mentioned, that maybe grabbing from X might be an option, especially because I am not really aware of anyone using national alphabets for input in physical console anymore.

comment:12 in reply to: ↑ 11 Changed 14 years ago by wayfarer

Replying to zaytsev:

Did you notice that Firefox is not an application which runs from inside a terminal emulator by the way?

Sure I did :)
But since the same issue appears in X programs as well (eg Eclipse), I just thought, that problem and solution could be also the same.

comment:13 Changed 14 years ago by zaytsev

  • Version changed from 4.7.3 to master

The problem is that the solution that they use might be hardy applicable to mc. This is what I intended to express.

comment:14 Changed 13 years ago by andrew_b

  • Branch state set to no branch
  • Milestone changed from 4.7 to Future Releases

comment:15 Changed 12 years ago by andrew_b

  • Blocking 2994 added

comment:16 Changed 10 years ago by tezir

Hotkeys of ncurses-based program newsbeuter works with non-ascii locales (if add hotkeys to config as alternative).
Need to implement similar for mc.keymap config.

comment:17 Changed 10 years ago by seyko2

Hotkeys of ncurses-based program newsbeuter works with non-ascii locales

How this is done? As I understand, we need to map any non ASCII char to ASCII one using a keyboard mapping (US, German, Russian, etc).

Note: See TracTickets for help on using tickets.