ergoemacs / ergoemacs-mode

ergoemacs-mode
ergoemacs.github.io/
GNU General Public License v3.0
293 stars 35 forks source link

Can't customize kdb start with <menu> under windows 8.1 #323

Closed magichowl closed 9 years ago

magichowl commented 9 years ago

Hi,

I met a problem that the following setences fail to work under Windows 8.1, even if I re-eval them.

(global-set-key (kbd "<menu>") nil)
(global-set-key (kbd "<menu> <C-prior>") 'previous-buffer)
(global-set-key (kbd "<menu> <C-next>") 'next-buffer)

But the default kbds start with

is working correctly, in stable ergoemacs version 5.14.7.3.

Strange enough, above configs works well in Ubuntu 14.04.

Do you know what's going on?

mattfidler commented 9 years ago

Yes. This is an emacs windows issue. The <menu> key does not exist in windows emacs. The <apps> key is the windows equivalent. I've never understood why emacs makes this distinction.

In an ergoemacs-mode theme, the keys are equivalent. Outside, in normal emacs, they are not.

mattfidler commented 9 years ago

Actually the fact they work for Windows is a bug in the stable version...

magichowl commented 9 years ago

I only translated the following key in cygwin, after your suggestion, this problem can be solved.

(defconst *windows* (or (eq system-type 'cygwin) (eq system-type 'windows-nt)))
(when *windows*
(define-key key-translation-map (kbd "<apps>") (kbd "<menu>")))

Thanks.

mattfidler commented 9 years ago

True. You don't even need a check for windows, since it doesn't affect Ubuntu if you add the translation. I still don't know why emacs doesn't include this translation by default.