unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53202: 27.2; Shift + function key not recognized
@ 2022-01-12  5:40 Drew Adams
  2022-01-12  7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-12 13:08 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Drew Adams @ 2022-01-12  5:40 UTC (permalink / raw)
  To: 53202

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)






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

* bug#53202: 27.2; Shift + function key not recognized
  2022-01-12  5:40 bug#53202: 27.2; Shift + function key not recognized Drew Adams
@ 2022-01-12  7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-01-12 15:29   ` bug#53202: [External] : " Drew Adams
  2022-01-12 13:08 ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-01-12  7:15 UTC (permalink / raw)
  To: Drew Adams; +Cc: 53202

Drew Adams <drew.adams@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.





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

* bug#53202: 27.2; Shift + function key not recognized
  2022-01-12  5:40 bug#53202: 27.2; Shift + function key not recognized Drew Adams
  2022-01-12  7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-12 13:08 ` Eli Zaretskii
  2022-01-12 15:46   ` bug#53202: [External] : " Drew Adams
  2022-01-12 16:00   ` Drew Adams
  1 sibling, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-01-12 13:08 UTC (permalink / raw)
  To: Drew Adams; +Cc: 53202

> From: Drew Adams <drew.adams@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.





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

* bug#53202: [External] : Re: bug#53202: 27.2; Shift + function key not recognized
  2022-01-12  7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-01-12 15:29   ` Drew Adams
  0 siblings, 0 replies; 8+ messages in thread
From: Drew Adams @ 2022-01-12 15:29 UTC (permalink / raw)
  To: Po Lu; +Cc: 53202

> 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).





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

* bug#53202: [External] : Re: bug#53202: 27.2; Shift + function key not recognized
  2022-01-12 13:08 ` Eli Zaretskii
@ 2022-01-12 15:46   ` Drew Adams
  2022-01-12 16:50     ` Eli Zaretskii
  2022-01-12 16:00   ` Drew Adams
  1 sibling, 1 reply; 8+ messages in thread
From: Drew Adams @ 2022-01-12 15:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 53202

> > 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.





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

* bug#53202: [External] : Re: bug#53202: 27.2; Shift + function key not recognized
  2022-01-12 13:08 ` Eli Zaretskii
  2022-01-12 15:46   ` bug#53202: [External] : " Drew Adams
@ 2022-01-12 16:00   ` Drew Adams
  2022-01-13  7:00     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 8+ messages in thread
From: Drew Adams @ 2022-01-12 16:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 53202

> 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.





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

* bug#53202: [External] : Re: bug#53202: 27.2; Shift + function key not recognized
  2022-01-12 15:46   ` bug#53202: [External] : " Drew Adams
@ 2022-01-12 16:50     ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-01-12 16:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 53202

> From: Drew Adams <drew.adams@oracle.com>
> CC: "53202@debbugs.gnu.org" <53202@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.





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

* bug#53202: 27.2; Shift + function key not recognized
  2022-01-12 16:00   ` Drew Adams
@ 2022-01-13  7:00     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-13  7:00 UTC (permalink / raw)
  To: Drew Adams; +Cc: 53202

Drew Adams <drew.adams@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





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

end of thread, other threads:[~2022-01-13  7:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  5:40 bug#53202: 27.2; Shift + function key not recognized Drew Adams
2022-01-12  7:15 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-12 15:29   ` bug#53202: [External] : " Drew Adams
2022-01-12 13:08 ` Eli Zaretskii
2022-01-12 15:46   ` bug#53202: [External] : " Drew Adams
2022-01-12 16:50     ` Eli Zaretskii
2022-01-12 16:00   ` Drew Adams
2022-01-13  7:00     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).