Subject: bug#53062: 29.0.50; Inserting charger causes keyboard event <dead-circumflex>

From: Eli Zaretskii <[email-masked]>
Date: Fri, 07 Jan 2022 08:48:18 +0200

> Date: Thu, 06 Jan 2022 22:48:53 +0100
> From:  Theodor Thornhill via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 
> So, I noticed that everytime I insert my charger the echo area echos
> "dead-circumflex-".  Obviously I:
> 
> (global-set-key (kbd "<dead-circumflex>") 'save-buffers-kill-emacs)
> 
> Now everytime I insert my laptop charger emacs is killed.
> 
> Is this expected?  I pulled and built emacs from source just now, and
> still get that behavior.

Is what expected?  If you bind that function key to
save-buffers-kill-emacs, it is expected that whenever that function
key is "pressed", Emacs will exit, yes.

If you were asking about the dead-circumflex function key event being
generated when you plug your charger, I think it's something that
is local to your system -- some piece of software generates key input
event when you do that.  Emacs just responds to the input events it
receives from the OS.

If you cannot figure out how to disable that "feature", you could
perhaps bind that key to 'ignore', then Emacs will process and ignore
that key.