GNU bug report logs - #53202
27.2; Shift + function key not recognized

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 12 Jan 2022 05:41:02 UTC

Severity: minor

Tags: notabug

Found in version 27.2

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53202 in the body.
You can then email your comments to 53202 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Wed, 12 Jan 2022 05:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 12 Jan 2022 05:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 27.2; Shift + function key not recognized
Date: Wed, 12 Jan 2022 05:40:26 +0000
Feel free to rename this bug report as appropriate.

And I'm not sure if it should be a report about missing doc (or doc I
didn't fine) or a report about bugged behavior.  I'm hoping that what I
don't understand is in fact documented, and I just didn't find that
doc.

emacs -Q

(global-set-key (kbd "S-<f10>") 'forward-char)

C-h w forward-char  ; Says it's bound to <S-f10>

But Emacs doesn't recognize that key at all.  E.g. `C-h k' followed by
Shift with function-key <f10>: the key isn't recognized.

I looked in the Emacs and Elisp manuals, checking index entries that
have "shift" or "function key" in them, but I didn't notice anything
that explained why that key isn't recognized.

But if I do the same thing with (kbd "S-<f3>") there's no such problem.

Is this a product bug?  A doc bug?  Neither?  Is it perhaps
platform-dependent?  I see this behavior also in older Emacs releases,
so it's not new.

In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)
 of 2021-03-26 built on CIRROCUMULUS
Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.19042
System Description: Microsoft Windows 10 Pro (v10.0.2009.19042.1348)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Wed, 12 Jan 2022 07:16:02 GMT) Full text and rfc822 format available.

Message #8 received at 53202 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 53202 <at> debbugs.gnu.org
Subject: Re: bug#53202: 27.2; Shift + function key not recognized
Date: Wed, 12 Jan 2022 15:15:13 +0800
Drew Adams <drew.adams <at> oracle.com> writes:

> C-h w forward-char  ; Says it's bound to <S-f10>
>
> But Emacs doesn't recognize that key at all.  E.g. `C-h k' followed by
> Shift with function-key <f10>: the key isn't recognized.

Works here on X, with and without XI2.

> In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)
>  of 2021-03-26 built on CIRROCUMULUS
> Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
> Repository branch: HEAD
> Windowing system distributor 'Microsoft Corp.', version 10.0.19042
> System Description: Microsoft Windows 10 Pro (v10.0.2009.19042.1348)

Perhaps MS-Windows treats F10 as a menu bar accelerator and eats that
key, like the PGTK build does.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Wed, 12 Jan 2022 13:09:02 GMT) Full text and rfc822 format available.

Message #11 received at 53202 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 53202 <at> debbugs.gnu.org
Subject: Re: bug#53202: 27.2; Shift + function key not recognized
Date: Wed, 12 Jan 2022 15:08:24 +0200
> From: Drew Adams <drew.adams <at> oracle.com>
> Date: Wed, 12 Jan 2022 05:40:26 +0000
> 
> emacs -Q
> 
> (global-set-key (kbd "S-<f10>") 'forward-char)
> 
> C-h w forward-char  ; Says it's bound to <S-f10>
> 
> But Emacs doesn't recognize that key at all.  E.g. `C-h k' followed by
> Shift with function-key <f10>: the key isn't recognized.

I cannot reproduce this.  I tried on 2 different Windows systems, both
with Emacs 27 and Emacs 28, and they both recognize S-F10 fine; with
the provided recipe, S-F10 moves point one character forward, as
expected.

I suspect that your system has some system-wide customizations that
steal this key.  Maybe try to use w32-register-hot-key to work around
that.

> Is this a product bug?  A doc bug?  Neither?  Is it perhaps
> platform-dependent?  I see this behavior also in older Emacs releases,
> so it's not new.

If it's something specific to your Windows installation, it will most
probably happen with any Emacs version.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Wed, 12 Jan 2022 15:29:16 GMT) Full text and rfc822 format available.

Message #14 received at 53202 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Po Lu <luangruo <at> yahoo.com>
Cc: "53202 <at> debbugs.gnu.org" <53202 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#53202: 27.2; Shift + function key not
 recognized
Date: Wed, 12 Jan 2022 15:29:00 +0000
> Perhaps MS-Windows treats F10 as a menu bar accelerator 
> and eats that key, like the PGTK build does.

Shift + F10 is special for MS Windows, it seems,
so it's plausible that it can't be available to
Emacs.  Confirmation would be good.

Note that <f10> itself can be bound in Emacs.
Likewise <M-f10> and <C-f10>.  It seems to be only
<S-f10> that's unavailable.

If that's the case, maybe some mention in the doc
would be good.  E.g., if some Shift combinations,
in particular, are sometimes not available on some
platforms, maybe mention that fact.

Or if this isn't particularly true of Shift, then
maybe just some mention somewhere that some key
sequences might not be available for Emacs on some
platforms.

And maybe tell users how to tell if a key isn't
available (e.g. if `C-h k' doesn't recognize the
key at all, that might well mean that there's no
way for Emacs to use it).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Wed, 12 Jan 2022 15:47:02 GMT) Full text and rfc822 format available.

Message #17 received at 53202 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "53202 <at> debbugs.gnu.org" <53202 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#53202: 27.2; Shift + function key not
 recognized
Date: Wed, 12 Jan 2022 15:46:23 +0000
> > emacs -Q
> >
> > (global-set-key (kbd "S-<f10>") 'forward-char)
> >
> > C-h w forward-char  ; Says it's bound to <S-f10>
> >
> > But Emacs doesn't recognize that key at all.  E.g. `C-h k' followed by
> > Shift with function-key <f10>: the key isn't recognized.
> 
> I cannot reproduce this.  I tried on 2 different Windows systems, both
> with Emacs 27 and Emacs 28, and they both recognize S-F10 fine; with
> the provided recipe, S-F10 moves point one character forward, as
> expected.

Good to know/hear.

> I suspect that your system has some system-wide customizations that
> steal this key.  Maybe try to use w32-register-hot-key to work around
> that.

I'm not aware of any such thing for my system, but
that doesn't mean there's no such thing going on.

I tried `w32-register-hot-key', but it had no effect
for S-F10.

I'm on Windows 10.  Were some of your tests on 10 also?

> > Is this a product bug?  A doc bug?  Neither?  Is it perhaps
> > platform-dependent?  I see this behavior also in older Emacs releases,
> > so it's not new.
> 
> If it's something specific to your Windows installation, it will most
> probably happen with any Emacs version.

Right.  It would be good to know whether this is
more general than just my Windows installation.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Wed, 12 Jan 2022 16:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 53202 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "53202 <at> debbugs.gnu.org" <53202 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#53202: 27.2; Shift + function key not
 recognized
Date: Wed, 12 Jan 2022 16:00:18 +0000
> I'm not aware of any such thing for my system, but
> that doesn't mean there's no such thing going on.
> 
> I tried `w32-register-hot-key', but it had no effect
> for S-F10.

I was wrong.  I have a program, Snag-It (which I've
never used), which was grabbing F10.  I turned that
off, and the problem disappeared.

Feel free to close this bug.  But maybe the Emacs
manual could mention somewhere that if `C-h k'
followed by pressing some key doesn't seem to do
anything - doesn't recognize that the key was
pressed, then perhaps some other app is grabbing
that key, so that Emacs can't use it.

The manual has node `Windows Keyboard', but that's
just for MS Windows (and it doesn't prevent some
other app from preventing Emacs from using a key).
Maybe some more general indication of this "problem"
would be helpful.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Wed, 12 Jan 2022 16:51:02 GMT) Full text and rfc822 format available.

Message #23 received at 53202 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 53202 <at> debbugs.gnu.org
Subject: Re: [External] : Re: bug#53202: 27.2; Shift + function key not
 recognized
Date: Wed, 12 Jan 2022 18:50:16 +0200
> From: Drew Adams <drew.adams <at> oracle.com>
> CC: "53202 <at> debbugs.gnu.org" <53202 <at> debbugs.gnu.org>
> Date: Wed, 12 Jan 2022 15:46:23 +0000
> 
> I'm on Windows 10.  Were some of your tests on 10 also?

Yes.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53202; Package emacs. (Thu, 13 Jan 2022 07:02:02 GMT) Full text and rfc822 format available.

Message #26 received at 53202 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>,
 "53202 <at> debbugs.gnu.org" <53202 <at> debbugs.gnu.org>
Subject: Re: bug#53202: 27.2; Shift + function key not recognized
Date: Thu, 13 Jan 2022 08:00:49 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> I was wrong.  I have a program, Snag-It (which I've
> never used), which was grabbing F10.  I turned that
> off, and the problem disappeared.
>
> Feel free to close this bug. 

OK; done.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Jan 2022 07:02:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 53202 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Jan 2022 07:02:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Feb 2022 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.