ergoemacs / ergoemacs-mode

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

Problem with arrow keys on OS X and emacs 25.2.1 #458

Closed samdmarshall closed 5 years ago

samdmarshall commented 7 years ago

Hi, i love the sets of single-key shortcuts that this package provides; but i'm having a problem with usage of the arrow keys. This seems to be a recurring issue with the arrow keys inserting A, B, C, and D for the [(up)], [(down)], [(right)], and [(left)] keys respectively. This is on a fresh install of ergoemacs off of the master branch, and using emacs 25.2.1 on OS X. I've attempted remapping the arrow keys after the ergoemacs package gets loaded and that seems to make no difference. I don't have this problem when not loading the ergoemacs package though. Unlike some other cases of this problem i am running emacs locally (not over putty).

mattfidler commented 7 years ago

However, you are likely running this is iTerm. These are typically terminal issues. Am I correct?

On Fri, May 19, 2017, 1:56 PM Samantha Marshall notifications@github.com wrote:

Hi, i love the sets of single-key shortcuts that this package provides; but i'm having a problem with usage of the arrow keys. This seems to be a recurring issue with the arrow keys inserting A, B, C, and D for the [(up)], [(down)], [(right)], and [(left)] keys respectively. This is on a fresh install of ergoemacs off of the master branch, and using emacs 25.2.1 on OS X. I've attempted remapping the arrow keys after the ergoemacs package gets loaded and that seems to make no difference. I don't have this problem when not loading the ergoemacs package though. Unlike some other cases of this problem i am running emacs locally (not over putty).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/458, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfa2kdKOxRKcGy3YHliv9fV_TH5eIF_ks5r7eXVgaJpZM4Ng5Id .

samdmarshall commented 7 years ago

No, I am running this in Terminal.app, not iTerm.

mattfidler commented 7 years ago

This happens no matter the terminal emulator, Putty iTerm etc. I will have to look into it later.

On Fri, May 19, 2017, 5:04 PM Samantha Marshall notifications@github.com wrote:

No, I am running this in Terminal.app, not iTerm.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/458#issuecomment-302822010, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfa2gZwoVEvWD03xsdmKYjNkOMAOVeOks5r7hIIgaJpZM4Ng5Id .

samdmarshall commented 7 years ago

In the interim could you tell me how to disable the remapping of the arrow keys by ergoemacs please?

mattfidler commented 7 years ago

You need to disable the Alt O key

On Sat, May 20, 2017, 5:56 AM Samantha Marshall notifications@github.com wrote:

In the interim could you tell me how to disable the remapping of the arrow keys by ergoemacs please?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ergoemacs/ergoemacs-mode/issues/458#issuecomment-302865998, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfa2o7RI3xyKzHMtgs06Qf2Y_olN4QNks5r7sbVgaJpZM4Ng5Id .

samdmarshall commented 7 years ago

that worked perfectly, thanks so much.

calliecameron commented 7 years ago

I have the same problem (on Linux, in Gnome Terminal), but unbinding Alt O didn't work; after (global-unset-key (kbd "M-o")) I get 'Alt+O does not do anything!', as expected, but the arrow keys still insert A, B, C, and D.

This looks like escape sequences being handled incorrectly. The letters inserted are the last character of the escape sequences for the arrow keys: ^[0A, ^[0B, ^[0C and ^[0D. The same thing happens with Home and End, which in Gnome Terminal have escape sequences ^[0H and ^[0F. However, on the Linux virtual console where the escape sequences are ^[[1~ and ^[[4~, Home and End work, but the arrow keys (which are the same as in Gnome Terminal) still don't.

Edit: slight correction - the arrow keys work on the Linux virtual console, but not inside tmux, which translates some of the console's escape sequences to the same as Gnome Terminal's.