all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* S-TAB, <S-tab>, and <backtab>
@ 2021-09-14 10:16 Hongyi Zhao
  2021-09-14 10:54 ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Hongyi Zhao @ 2021-09-14 10:16 UTC (permalink / raw)
  To: help-gnu-emacs

On Ubuntu 20.04.2 LTS, I use the latest git master version of Emacs
compiled by myself. According to the note here [1], I want to bind the
`company-select-previous' command of company package to `Shift Tab',
and tried the following configuration:

;;;
(use-package company
  :demand t
  :bind
  ( :map company-active-map
   [...]

   ("S-TAB" . company-select-previous)
   ;or
   ("<S-tab>" . company-select-previous)
   ;or
   ("<backtab>" . company-select-previous)
   [...]
;;;

But based on my tries, only the following binding is valid:

("<backtab>" . company-select-previous)

[1] https://www.emacswiki.org/emacs/EmacsKeyNotation

Any hints for this problem will be highly appreciated.

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



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

* Re: S-TAB, <S-tab>, and <backtab>
  2021-09-14 10:16 S-TAB, <S-tab>, and <backtab> Hongyi Zhao
@ 2021-09-14 10:54 ` Eric S Fraga
  2021-09-15  0:13   ` Hongyi Zhao
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2021-09-14 10:54 UTC (permalink / raw)
  To: help-gnu-emacs

On Tuesday, 14 Sep 2021 at 18:16, Hongyi Zhao wrote:
>    ("<S-tab>" . company-select-previous)

Untested by this would normally be "S-<tab>" as the S is the modifier
and <tab> the key.

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.6 on Debian 11.0




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

* Re: S-TAB, <S-tab>, and <backtab>
  2021-09-14 10:54 ` Eric S Fraga
@ 2021-09-15  0:13   ` Hongyi Zhao
  2021-09-15 10:14     ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Hongyi Zhao @ 2021-09-15  0:13 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: help-gnu-emacs

On Tue, Sep 14, 2021 at 6:54 PM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> On Tuesday, 14 Sep 2021 at 18:16, Hongyi Zhao wrote:
> >    ("<S-tab>" . company-select-previous)
>
> Untested by this would normally be "S-<tab>" as the S is the modifier
> and <tab> the key.

Based on my tries, both "<S-tab>" and "S-<tab>" don't work. Both of
these forms have been mentioned in the "Angle-Bracket Notation" of the
emacswiki [1]:

Modifier keys that are part of a key sequence that contains a pseudo
key are sometimes written inside the angle brackets: `<S-tab>’,
`<C-insert>’. And sometimes they are written outside: `S-<tab>’,
`C-<insert>’.

[1] https://www.emacswiki.org/emacs/EmacsKeyNotation

Best Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



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

* Re: S-TAB, <S-tab>, and <backtab>
  2021-09-15  0:13   ` Hongyi Zhao
@ 2021-09-15 10:14     ` Eric S Fraga
  2021-09-15 12:38       ` Hongyi Zhao
  0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2021-09-15 10:14 UTC (permalink / raw)
  To: help-gnu-emacs

Okay, I didn't know that.  Sorry for the noise.
-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.6 on Debian 11.0




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

* Re: S-TAB, <S-tab>, and <backtab>
  2021-09-15 10:14     ` Eric S Fraga
@ 2021-09-15 12:38       ` Hongyi Zhao
  2021-09-15 16:17         ` Yuri Khan
  0 siblings, 1 reply; 7+ messages in thread
From: Hongyi Zhao @ 2021-09-15 12:38 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: help-gnu-emacs

On Wed, Sep 15, 2021 at 6:27 PM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
> Okay, I didn't know that.

But I still don't understand why my observed behavior is inconsistent
with Emacswiki's description.

> Sorry for the noise.

You're welcome.

Best Regards, Hongyi



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

* Re: S-TAB, <S-tab>, and <backtab>
  2021-09-15 12:38       ` Hongyi Zhao
@ 2021-09-15 16:17         ` Yuri Khan
  2021-09-16  0:09           ` Hongyi Zhao
  0 siblings, 1 reply; 7+ messages in thread
From: Yuri Khan @ 2021-09-15 16:17 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs, Eric S Fraga

On Wed, 15 Sept 2021 at 19:39, Hongyi Zhao <hongyi.zhao@gmail.com> wrote:

> But I still don't understand why my observed behavior is inconsistent
> with Emacswiki's description.

Because Emacs does not receive key combinations directly from the
keyboard. It gets them from a platform-specific lower-level input
subsystem. For example, on X11, XKB translates Shift+Tab to Shift + a
special ISO_Left_Tab pseudo-keysym (see
/usr/share/X11/xkb/symbols/pc). Emacs then translates that to a
<backtab> event.



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

* Re: S-TAB, <S-tab>, and <backtab>
  2021-09-15 16:17         ` Yuri Khan
@ 2021-09-16  0:09           ` Hongyi Zhao
  0 siblings, 0 replies; 7+ messages in thread
From: Hongyi Zhao @ 2021-09-16  0:09 UTC (permalink / raw)
  To: Yuri Khan; +Cc: help-gnu-emacs, Eric S Fraga

On Thu, Sep 16, 2021 at 12:17 AM Yuri Khan <yuri.v.khan@gmail.com> wrote:
>
> On Wed, 15 Sept 2021 at 19:39, Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> > But I still don't understand why my observed behavior is inconsistent
> > with Emacswiki's description.
>
> Because Emacs does not receive key combinations directly from the
> keyboard. It gets them from a platform-specific lower-level input
> subsystem. For example, on X11, XKB translates Shift+Tab to Shift + a
> special ISO_Left_Tab pseudo-keysym (see
> /usr/share/X11/xkb/symbols/pc). Emacs then translates that to a
> <backtab> event.

Thank you for your explanation, and I confirmed your above comment:

$ egrep -i Tab /usr/share/X11/xkb/symbols/pc
    key  <TAB> {    [ Tab,    ISO_Left_Tab    ]    };

Best, HZ



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

end of thread, other threads:[~2021-09-16  0:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-14 10:16 S-TAB, <S-tab>, and <backtab> Hongyi Zhao
2021-09-14 10:54 ` Eric S Fraga
2021-09-15  0:13   ` Hongyi Zhao
2021-09-15 10:14     ` Eric S Fraga
2021-09-15 12:38       ` Hongyi Zhao
2021-09-15 16:17         ` Yuri Khan
2021-09-16  0:09           ` Hongyi Zhao

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.