help Keyboard and Tk

[email protected] ("leglaude") Mon, 8 Nov 2021 06:04:31 +0100
Newsgroups perl.tcltk
Message-ID <5E539DDEB80344B89CAD16BF5F8CEE6E@DESKTOPMQ213KV>
------=_NextPart_000_0031_01D7D466.7F3C4D10
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi all,

I have a litle Script perl Tk.

It's simple,
I press a key in my keyboard, and I can see the name key in the terminal =
with a print.

All key good, but I have a problem with the key f10.

I can see F10 in the consol, no problem.
But in windows 10, f10 open the menu.

Can you help me to solve the problem?
Thanks!
This is my script.

use Tk;=20

$mw =3D MainWindow->new;

$mw->bind("<Key>", [ sub {
print "Touche : $_[1]\n";
 },=20
                     Ev('K')] );=20
MainLoop;
------=_NextPart_000_0031_01D7D466.7F3C4D10
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 11.00.10570.1001">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2 face=3DArial>Hi all,</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>I have a litle Script perl =
Tk.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>It's simple,<BR>I press a key in my =
keyboard, and I=20
can see the name key in the terminal with a print.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>All key good, but I have a problem with =
the key=20
f10.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>I can see F10 in the consol, no =
problem.<BR>But in=20
windows 10, f10 open the menu.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>Can you help me to solve the =
problem?</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial>Thanks!</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial>This is my script.</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>use Tk; </FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>$mw =3D =
MainWindow-&gt;new;</FONT></DIV>
<DIV><FONT size=3D2 face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial>$mw-&gt;bind("&lt;Key&gt;", [ sub =
{<BR>print=20
"Touche : $_[1]\n";<BR>&nbsp;},=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Ev('K')] ); <BR>MainLoop;</FONT></DIV></BODY></HTML>

------=_NextPart_000_0031_01D7D466.7F3C4D10--