all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Mastro <john.b.mastro@gmail.com>
To: help-emacs <help-gnu-emacs@gnu.org>
Cc: Sharon Kimble <boudiccas@skimble.plus.com>
Subject: Re: How to change the keyboard mapping?
Date: Fri, 12 Aug 2016 17:02:00 -0700	[thread overview]
Message-ID: <CAOj2CQRST1MYBChXfmmUW7ZF0PdNNrc_0vTyPZDKLSPJ3pa=4g@mail.gmail.com> (raw)
In-Reply-To: <87r39t3afa.fsf@skimble.plus.com>

Sharon Kimble <boudiccas@skimble.plus.com> wrote:
> How can I map my alpha-ENTER to be the same as my numerical-ENTER please?
>
> I'm using a 'standard usb keyboard' (that's what it says on the
> underside anyway) and I'm finding that when using emacs as normal I can
> only accept entries on my dropdown word-prompt (I type in 3-4 letters
> and it pops up a list of possible solutions) using the numerical-ENTER.
> Also if it shows a possible one-word solution for auto-complete by the
> grey letters to finish the word, I can only accept using the
> numerical-ENTER key again.

What package are you using for completion (i.e. the thing offering
candidates via the dropdown)? I suspect the best solution will involve
adding something to that package's mode map rather than remapping the
key at a lower level in Emacs.

If it's auto-complete, try this:

(with-eval-after-load 'auto-complete
  (define-key ac-completing-map [return] #'ac-complete))

I don't have a keyboard with that key handy to test it, so I'm not sure
it will help. The reason for the suggestion is that I noticed that
auto-complete only binds `ac-complete' to "\r" (aka RET), whereas
company binds both that and [return]. [return] is normally translated to
RET, but it's possible for them to have different bindings.

Out of curiosity I tried something like the below (which was my first
thought for how to translate the "normal" enter key to the one on the
numeric keypad) but the result is not good.

(define-key key-translation-map (kbd "RET") [kp-enter])

        John



  reply	other threads:[~2016-08-13  0:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 22:11 How to change the keyboard mapping? Sharon Kimble
2016-08-13  0:02 ` John Mastro [this message]
2016-08-13  0:35   ` Sharon Kimble
2016-08-13  2:10     ` John Mastro
2016-08-14 12:28       ` Robert Thorpe
2016-08-15 12:59         ` Sharon Kimble
2016-08-15 12:59       ` Sharon Kimble
2016-08-15 17:37         ` John Mastro
2016-08-13 14:16 ` B.V. Raghav
2016-08-15 13:01   ` Sharon Kimble

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOj2CQRST1MYBChXfmmUW7ZF0PdNNrc_0vTyPZDKLSPJ3pa=4g@mail.gmail.com' \
    --to=john.b.mastro@gmail.com \
    --cc=boudiccas@skimble.plus.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.