Waldmar,
One solution I have would be to install a hook for one or more of the various
keyboard messages that are available. These messages give you access to flags
that give extended information, which could be used to determine if the ALT key
is down. My suggestion would be to use the WM_SYSKEYDOWN message. Here is a
very basic example:
use strict;
use warnings;
use Data::Dump qw(dump);
use Win32::GUI qw();
use Win32::GUI::Constants qw(/^WM_/); #gets all WM_ message constants
my $win = Win32::GUI::Window->new(
-name => 'main',
-size => [320,240],);
$win->Hook(
WM_SYSKEYDOWN,
sub{
dump \...@_; #shows all parameters;
my($this,$wParam,$lParam,$type,$msgcode) = @_;
return unless $type == 0; #make sure message isn't WM_COMMAND or WM_NOTIFY
return unless $msgcode == WM_SYSKEYDOWN; #make sure message is WM_SYSKEYDOWN
#process event
return 0;
}
);
$win->Show();
Win32::GUI::Dialog();
__END__
This may be what you were looking for. Check out the Windows SDK documentation
for more info about the various messages that could be used.
Hope this will help.
Kevin.
> From: w...@sao.pl
> To: perl-win32-gui-users@lists.sourceforge.net
> Date: Sat, 30 May 2009 19:02:02 +0200
> Subject: [perl-win32-gui-users] How to catch keyboard event like LeftAlt+F5?
>
> Hello!
>
> I have the following problem: I can manage AltGr+F5 (RightAlt+F5) and all
> keyboard events with OEM and NEM.
>
> However I don't know how to catch the LeftAlt+F5 and similar.
>
> Can anyone help me?
>
> regards
> Waldemar
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> http://perl-win32-gui.sourceforge.net/
_________________________________________________________________
Looking for a place to rent, share or buy this winter? Find your next place
with Ninemsn property
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Edomain%2Ecom%2Eau%2F%3Fs%5Fcid%3DFDMedia%3ANineMSN%5FHotmail%5FTagline&_t=774152450&_r=Domain_tagline&_m=EXT
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/