all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Keystroke inconsistencies between GUI and -nw emacs?
@ 2013-08-21 14:49 Marko Vojinovic
  2013-08-21 15:47 ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Marko Vojinovic @ 2013-08-21 14:49 UTC (permalink / raw
  To: help-gnu-emacs


Hi folks! :-)

As a regular user of "emacs -nw" (I use it pretty exclusively), today I
accidentally opened the regular GUI version of emacs and decided to give
it a try. But to my surprise, I found out that some keystroke sequences
are different between the GUI version and the console version.

For example, I am used to activate the ordinary string replacing in the
-nw version by typing

  F10 e r r stringtosearch RET stringtoreplace RET

and then go on with the replacing. But in the GUI version, after F10
opens the menu, the other keystrokes ("e r r" in particular) are not
recognized, and I need to use arrow-keys (or other keyboard shortcuts)
to drive the menu to the desired function.

So I have two questions:

(1) Was this done by design? In terms of muscle memory, it can be very
inconvenient to switch between GUI and console versions. At least for
me. :-)

(2) Can the GUI version be reconfigured to have the response to
keystrokes which is *identical* to the console version? If yes, please
point me to some docs about how to do it.

Btw, if it matters:

$ emacs --version
GNU Emacs 24.2.1

TIA, :-)
Marko




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Keystroke inconsistencies between GUI and -nw emacs?
  2013-08-21 14:49 Keystroke inconsistencies between GUI and -nw emacs? Marko Vojinovic
@ 2013-08-21 15:47 ` Stefan Monnier
  2013-08-21 17:38   ` Marko Vojinovic
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2013-08-21 15:47 UTC (permalink / raw
  To: help-gnu-emacs

> (1) Was this done by design?

Yes, F10 is supposed to show you the menu-bar "the GUI way".  In a tty
this is not implemented (yet?), so it fallsback on tmm-menubar.

> (2) Can the GUI version be reconfigured to have the response to
> keystrokes which is *identical* to the console version? If yes, please
> point me to some docs about how to do it.

If you use M-` instead of F10, it will work consistently.
Of course, you can remap f10 to run tmm-menubar if you prefer using F10.


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Keystroke inconsistencies between GUI and -nw emacs?
  2013-08-21 15:47 ` Stefan Monnier
@ 2013-08-21 17:38   ` Marko Vojinovic
  2013-08-21 18:01     ` Eli Zaretskii
  2013-08-26  7:37     ` Richard Riley
  0 siblings, 2 replies; 7+ messages in thread
From: Marko Vojinovic @ 2013-08-21 17:38 UTC (permalink / raw
  To: help-gnu-emacs

On Wed, 21 Aug 2013 11:47:24 -0400
Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> > (1) Was this done by design?
> 
> Yes, F10 is supposed to show you the menu-bar "the GUI way".  In a tty
> this is not implemented (yet?), so it fallsback on tmm-menubar.

I see, thanks. I am actually looking these days into the code that
should implement that MSDOS-like menu look&feel into the tty, but it
should still keep the keystroke-compatibility with the tmm-menubar,
only the visual appearance of the menus should be different.

In the GUI the F10 opens the GUI menu, which is ok. The only thing I
was surprised about is that the GUI menu is not keystroke-equivalent to
the tmm-menubar.

> > (2) Can the GUI version be reconfigured to have the response to
> > keystrokes which is *identical* to the console version? If yes,
> > please point me to some docs about how to do it.
> 
> If you use M-` instead of F10, it will work consistently.
> Of course, you can remap f10 to run tmm-menubar if you prefer using
> F10.

The remap to tmm-menubar sounds like the thing I've been looking for,
I'll try it out. Thanks!

Best, :-)
Marko




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Keystroke inconsistencies between GUI and -nw emacs?
  2013-08-21 17:38   ` Marko Vojinovic
@ 2013-08-21 18:01     ` Eli Zaretskii
  2013-08-21 18:51       ` Marko Vojinovic
  2013-08-26  7:37     ` Richard Riley
  1 sibling, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2013-08-21 18:01 UTC (permalink / raw
  To: help-gnu-emacs

> Date: Wed, 21 Aug 2013 18:38:36 +0100
> From: Marko Vojinovic <vvmarko@gmail.com>
> 
> In the GUI the F10 opens the GUI menu, which is ok. The only thing I
> was surprised about is that the GUI menu is not keystroke-equivalent to
> the tmm-menubar.

The GUI menu is in most cases implemented in the toolkit used by
Emacs, not in Emacs itself.  So the shortcut keys that control the GUI
menu are the keys defined by the toolkit.  Emacs cannot redefine them,
at least not easily (and if it did, users might complain, since they
are used to what the toolkit does).



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Keystroke inconsistencies between GUI and -nw emacs?
  2013-08-21 18:01     ` Eli Zaretskii
@ 2013-08-21 18:51       ` Marko Vojinovic
  2013-08-22 14:33         ` Suvayu Ali
  0 siblings, 1 reply; 7+ messages in thread
From: Marko Vojinovic @ 2013-08-21 18:51 UTC (permalink / raw
  To: help-gnu-emacs

On Wed, 21 Aug 2013 21:01:10 +0300
Eli Zaretskii <eliz@gnu.org> wrote:
> > Date: Wed, 21 Aug 2013 18:38:36 +0100
> > From: Marko Vojinovic <vvmarko@gmail.com>
> > In the GUI the F10 opens the GUI menu, which is ok. The only thing I
> > was surprised about is that the GUI menu is not
> > keystroke-equivalent to the tmm-menubar.
> 
> The GUI menu is in most cases implemented in the toolkit used by
> Emacs, not in Emacs itself.  So the shortcut keys that control the GUI
> menu are the keys defined by the toolkit.  Emacs cannot redefine them,
> at least not easily (and if it did, users might complain, since they
> are used to what the toolkit does).

Oh, I see --- so you are saying that if I run Emacs under, say KDE,
then the Qt toolkit would be responsible for the menus, and the
corresponding keybindings would be defined and controlled by Qt rather
than Emacs itself. Or something along those lines.

Ok, it does make sense. Thanks for the clarification! :-)

Best, :-)
Marko




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Keystroke inconsistencies between GUI and -nw emacs?
  2013-08-21 18:51       ` Marko Vojinovic
@ 2013-08-22 14:33         ` Suvayu Ali
  0 siblings, 0 replies; 7+ messages in thread
From: Suvayu Ali @ 2013-08-22 14:33 UTC (permalink / raw
  To: help-gnu-emacs

On Wed, Aug 21, 2013 at 07:51:43PM +0100, Marko Vojinovic wrote:
> On Wed, 21 Aug 2013 21:01:10 +0300
> Eli Zaretskii <eliz@gnu.org> wrote:
> > > Date: Wed, 21 Aug 2013 18:38:36 +0100
> > > From: Marko Vojinovic <vvmarko@gmail.com>
> > > In the GUI the F10 opens the GUI menu, which is ok. The only thing I
> > > was surprised about is that the GUI menu is not
> > > keystroke-equivalent to the tmm-menubar.
> > 
> > The GUI menu is in most cases implemented in the toolkit used by
> > Emacs, not in Emacs itself.  So the shortcut keys that control the GUI
> > menu are the keys defined by the toolkit.  Emacs cannot redefine them,
> > at least not easily (and if it did, users might complain, since they
> > are used to what the toolkit does).
> 
> Oh, I see --- so you are saying that if I run Emacs under, say KDE,
> then the Qt toolkit would be responsible for the menus, and the
> corresponding keybindings would be defined and controlled by Qt rather
> than Emacs itself. Or something along those lines.

Actually not run but compile with.  AFAIK, toolkit is used at the source
level, not runtime.  If it were possible to compile Emacs with Qt (is
it?  I don't know), you could have emacs-gtk and emacs-qt: the emacs-gtk
binary using the gtk toolkit, and the emacs-qt binary using Qt.

-- 
Suvayu

Open source is the future. It sets us free.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Keystroke inconsistencies between GUI and -nw emacs?
  2013-08-21 17:38   ` Marko Vojinovic
  2013-08-21 18:01     ` Eli Zaretskii
@ 2013-08-26  7:37     ` Richard Riley
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Riley @ 2013-08-26  7:37 UTC (permalink / raw
  To: help-gnu-emacs

Marko Vojinovic <vvmarko@gmail.com> writes:

> On Wed, 21 Aug 2013 11:47:24 -0400
> Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> > (1) Was this done by design?
>> 
>> Yes, F10 is supposed to show you the menu-bar "the GUI way".  In a tty
>> this is not implemented (yet?), so it fallsback on tmm-menubar.
>
> I see, thanks. I am actually looking these days into the code that
> should implement that MSDOS-like menu look&feel into the tty, but it
> should still keep the keystroke-compatibility with the tmm-menubar,
> only the visual appearance of the menus should be different.


Depends on the terminal you're using. It's confusing and inconsistent
between different terminal types. I ended up pretty much ignoring
function keys when using terminal emacs after struggling with
termcap/tty info etc etc. But then again I didnt stick at it!





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-26  7:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21 14:49 Keystroke inconsistencies between GUI and -nw emacs? Marko Vojinovic
2013-08-21 15:47 ` Stefan Monnier
2013-08-21 17:38   ` Marko Vojinovic
2013-08-21 18:01     ` Eli Zaretskii
2013-08-21 18:51       ` Marko Vojinovic
2013-08-22 14:33         ` Suvayu Ali
2013-08-26  7:37     ` Richard Riley

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.