Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Term::ReadKey's Win32PeekChar doesn't support special keys #9514

Closed
p5pRT opened this issue Oct 7, 2008 · 4 comments
Closed

Term::ReadKey's Win32PeekChar doesn't support special keys #9514

p5pRT opened this issue Oct 7, 2008 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 7, 2008

Migrated from rt.perl.org#59690 (status was 'resolved')

Searchable as RT59690$

@p5pRT
Copy link
Author

p5pRT commented Oct 7, 2008

From jerbraun@microsoft.com

Created by jerbraun@microsoft.com

In ReadKey.xs, Win32PeekChar only uses
record.Event.KeyEvent.uChar.AsciiChar to figure out the *key return
value. For text this is okay, but special keys (F1-Fx, HOME, PAGEUP,
PAGEDOWN, ARROWS, etc) all set AsciiChar to zero. In these cases, the
wVirtualKeyCode must be used to figure out what key was pressed.

(Perl's getc seems to have a similiar bug?)

Perl Info

Flags:
    category=library
    severity=medium

Site configuration information for perl 5.10.0:

Configured by SYSTEM at Tue May 13 16:52:25 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
  Platform:
    osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
    optimize='-MD -Zi -DNDEBUG -O1',
    cppflags='-DWIN32'
    ccversion='14.1.60511', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\sd\pyxis\source\40\zune\tools\perl\lib\CORE"  -machine:x86'
    libpth=\lib
    libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib msvcrt.lib
    perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib msvcrt.lib
    libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf  -libpath:"D:\sd\pyxis\source\40\zune\tools\perl\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY
    33741 avoids segfaults invoking S_raise_signal() (on Linux)
    33763 Win32 process ids can have more than 16 bits
    32809 Load 'loadable object' with non-default file extension
    32728 64-bit fix for Time::Local


@INC for perl 5.10.0:
    D:/sd/pyxis/source/40/zune/tools/perl/site/lib
    D:/sd/pyxis/source/40/zune/tools/perl/lib
    .


Environment for perl 5.10.0:
    HOME=C:\Users\jerbraun
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=D:\sd\pyxis\source\40\sdk\bin\i386\ARM;D:\sd\pyxis\source\40\sdk\bin\i386;D:\sd\pyxis\source\40\public\common\oak\Bin\i386;D:\sd\pyxis\source\40\private\bin\i386;D:\sd\pyxis\source\40\private\bat;D:\sd\pyxis\source\40\public\common\oak\misc;D:\sd\pyxis\source\40\developr\jerbraun;C:\Python25\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;D:\sd\pyxis\source\40\zune\developer\jerbraun\bin;C:\PROGRA~1\NcFTP;C:\Program Files\Microsoft Application Virtualization Client;C:\Program Files\Microsoft Network Monitor 3\;C:\Windows\system32\WindowsPowerShell\v1.0\;D:\sd\pyxis\source\40\platform\WOOKIE;D:\sd\pyxis\source\40\platform\WOOKIE\tools\bin\i386;D:\sd\pyxis\source\40\platform\WOOKIE\tools\nvflash\bin\i386;D:\sd\pyxis\source\40\platform\WOOKIE\tools\buildbct\bin\i386;D:\sd\pyxis\source\40\zune\tools\bin\i386;D:\sd\pyxis\source\40\zune\tools\bat;D:\sd\pyxis\source\40\zune\tools\perl\bin;D:\sd\pyxis\source\40\zune\tools\perl\site\bin;C:\Program Files\GnuWin32\bin;c:\Python25;F:\sd\xbox\cadence\tools\bin;D:\sd\pyxis\source\40\zune\tools\env;C:\Cadence\SPB_16.01\tools\specctra\bin;C:\Cadence\SPB_16.01\tools\pcb\bin;C:\Cadence\SPB_16.01\tools\bin;C:\Cadence\SPB_16.01\tools\libutil\bin;C:\Cadence\SPB_16.01\tools\fet\bin
    PERLDOC_NROFF=groff -E -mtty-char -Tascii -P-c
    PERL_BADLANG (unset)
    SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Oct 8, 2008

From jns@integration-house.com

Hi Jeremy,
Term​::ReadKey is not maintained as part of the Perl core. The ticket
#59690 can be closed.

I already have an ancient RT ticket (#16538) against this same
feature request with a patch, I've held off releasing this because I
haven't had the facilities to compile and test on Windows.

If someone could volunteer to help test a new release then I'd be
happy to make the fix.

2008/10/7 via RT Jeremy Braun <perlbug-followup@​perl.org>​:

# New Ticket Created by Jeremy Braun
# Please include the string​: [perl #59690]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org/rt3/Ticket/Display.html?id=59690 >

This is a bug report for perl from jerbraun@​microsoft.com,
generated with the help of perlbug 1.36 running under perl 5.10.0.

-----------------------------------------------------------------
[Please enter your report here]

In ReadKey.xs, Win32PeekChar only uses
record.Event.KeyEvent.uChar.AsciiChar to figure out the *key return
value. For text this is okay, but special keys (F1-Fx, HOME, PAGEUP,
PAGEDOWN, ARROWS, etc) all set AsciiChar to zero. In these cases, the
wVirtualKeyCode must be used to figure out what key was pressed.

(Perl's getc seems to have a similiar bug?)

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=library
severity=medium
---
Site configuration information for perl 5.10.0​:

Configured by SYSTEM at Tue May 13 16​:52​:25 2008.

Summary of my perl5 (revision 5 version 10 subversion 0) configuration​:
Platform​:
osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler​:
cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='14.1.60511', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries​:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt​:ref,icf -libpath​:"D​:\sd\pyxis\source\40\zune\tools\perl\lib\CORE" -machine​:x86'
libpth=\lib
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib
gnulibc_version=''
Dynamic Linking​:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt​:ref,icf -libpath​:"D​:\sd\pyxis\source\40\zune\tools\perl\lib\CORE" -machine​:x86'

Locally applied patches​:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
33741 avoids segfaults invoking S_raise_signal() (on Linux)
33763 Win32 process ids can have more than 16 bits
32809 Load 'loadable object' with non-default file extension
32728 64-bit fix for Time​::Local

---
@​INC for perl 5.10.0​:
D​:/sd/pyxis/source/40/zune/tools/perl/site/lib
D​:/sd/pyxis/source/40/zune/tools/perl/lib
.

---
Environment for perl 5.10.0​:
HOME=C​:\Users\jerbraun
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=D​:\sd\pyxis\source\40\sdk\bin\i386\ARM;D​:\sd\pyxis\source\40\sdk\bin\i386;D​:\sd\pyxis\source\40\public\common\oak\Bin\i386;D​:\sd\pyxis\source\40\private\bin\i386;D​:\sd\pyxis\source\40\private\bat;D​:\sd\pyxis\source\40\public\common\oak\misc;D​:\sd\pyxis\source\40\developr\jerbraun;C​:\Python25\;C​:\Windows\system32;C​:\Windows;C​:\Windows\System32\Wbem;D​:\sd\pyxis\source\40\zune\developer\jerbraun\bin;C​:\PROGRA~1\NcFTP;C​:\Program Files\Microsoft Application Virtualization Client;C​:\Program Files\Microsoft Network Monitor 3\;C​:\Windows\system32\WindowsPowerShell\v1.0\;D​:\sd\pyxis\source\40\platform\WOOKIE;D​:\sd\pyxis\source\40\platform\WOOKIE\tools\bin\i386;D​:\sd\pyxis\source\40\platform\WOOKIE\tools\nvflash\bin\i386;D​:\sd\pyxis\source\40\platform\WOOKIE\tools\buildbct\bin\i386;D​:\sd\pyxis\source\40\zune\tools\bin\i386;D​:\sd\pyxis\source\40\zune\tools\bat;D​:\sd\pyxis\source\40\zune\tools\perl\bin;D​:\sd\pyxis\source\40\zune\tools\perl\site\bin;C​:\Program Files\GnuWin32\bin!
;c​:\Python25;F​:\sd\xbox\cadence\tools\bin;D​:\sd\pyxis\source\40\zune\tools\env;C​:\Cadence\SPB_16.01\tools\specctra\bin;C​:\Cadence\SPB_16.01\tools\pcb\bin;C​:\Cadence\SPB_16.01\tools\bin;C​:\Cadence\SPB_16.01\tools\libutil\bin;C​:\Cadence\SPB_16.01\tools\fet\bin
PERLDOC_NROFF=groff -E -mtty-char -Tascii -P-c
PERL_BADLANG (unset)
SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Oct 8, 2008

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 9, 2008

module@renee-baecker.de - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant