• How to get up/dn/left/right arrows in WIN32FORTH? EKEY doesn't

    From Zoltan Spin@21:1/5 to All on Sun May 1 10:15:37 2022
    Hi!
    Discovering the just loaded Win32Forth, I found that EKEY doesnt provide anything when arrows are pressed, which is quite an issue when any user interface is needed.

    What did I miss?

    If I get this to work, maybe latter I ask about the mouse state.

    Thank you for any help
    Zoltan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From NN@21:1/5 to Zoltan Spin on Sun May 1 16:05:42 2022
    On Sunday, 1 May 2022 at 18:15:39 UTC+1, Zoltan Spin wrote:
    Hi!
    Discovering the just loaded Win32Forth, I found that EKEY doesnt provide anything when arrows are pressed, which is quite an issue when any user interface is needed.

    What did I miss?

    If I get this to work, maybe latter I ask about the mouse state.

    Thank you for any help
    Zoltan

    I havent used win32forth in a while so please test as I am not sure which applies

    : test begin ekey? 0= while repeat ekey . ;
    type test and press any F-key

    do you get a number ? if yes that number represents the f-key.

    or

    try :
    : test begin ekey? 0= while repeat ekey ekey>fkey .s ;

    you can use the function ekey>fkey as shown in https://forth-standard.org/standard/facility/EKEYtoFKEY

    One of these should work.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to All on Mon May 2 14:46:58 2022
    On 2/05/2022 09:05, NN wrote:
    On Sunday, 1 May 2022 at 18:15:39 UTC+1, Zoltan Spin wrote:
    Hi!
    Discovering the just loaded Win32Forth, I found that EKEY doesnt provide anything when arrows are pressed, which is quite an issue when any user interface is needed.

    What did I miss?

    If I get this to work, maybe latter I ask about the mouse state.

    Thank you for any help
    Zoltan

    I havent used win32forth in a while so please test as I am not sure which applies

    : test begin ekey? 0= while repeat ekey . ;
    type test and press any F-key

    do you get a number ? if yes that number represents the f-key.

    or

    try :
    : test begin ekey? 0= while repeat ekey ekey>fkey .s ;

    you can use the function ekey>fkey as shown in https://forth-standard.org/standard/facility/EKEYtoFKEY

    One of these should work.

    Not out-of-the-box anyway. A quick browse of the docs brought no joy despite K-UP etc being provided. ISTM systems claiming ANS/200x features should at least dedicate a section in the docs explaining how users can get them up
    and running. It's not just Win32Forth that has this problem e.g. how many 'standard' systems can run your two 'standard' scripts?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to dxforth on Mon May 2 06:47:08 2022
    dxforth <dxforth@gmail.com> writes:
    On 2/05/2022 09:05, NN wrote:
    : test begin ekey? 0= while repeat ekey . ;
    type test and press any F-key

    do you get a number ? if yes that number represents the f-key.

    or

    try :
    : test begin ekey? 0= while repeat ekey ekey>fkey .s ;
    ...
    how many
    'standard' systems can run your two 'standard' scripts?

    Ok, I tested a few with the following:

    1) : test begin ekey? 0= while repeat ekey . ; test \ press cursor-up
    2) : test begin ekey? 0= while repeat ekey ekey>fkey .s ; test \ press cursor-up
    3) k-up .

    Here's what I got:

    1) 2) 3) System
    2147483650 2147483650 -1 2147483650 gforth-0.7.3
    3328 3328 -1 3328 iForth-5.1-mini
    256 ekey>fkey ? 256 sf 3.11
    27 [A ekey>fkey ? k-up ? vfxlin 5.11 RC2

    - anton
    --
    M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
    comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
    New standard: http://www.forth200x.org/forth200x.html
    EuroForth 2021: https://euro.theforth.net/2021

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Howerd Oakford@21:1/5 to All on Wed May 4 14:23:47 2022
    Am 01/05/2022 um 19:15 schrieb Zoltan Spin:
    Hi!
    Discovering the just loaded Win32Forth, I found that EKEY doesnt provide anything when arrows are pressed, which is quite an issue when any user interface is needed.

    What did I miss?

    If I get this to work, maybe latter I ask about the mouse state.

    Thank you for any help
    Zoltan
    Hi Zoltan,

    Which version of Win32Forth are you using?
    With Win32Forth6v05H :

    Win32Forth: ANS Forth for Windows 95/98/ME/NT/2K/XP/7/8/10
    Version: 6.05 Build: 0100 453K bytes free

    I get "ekey hex . 20006" when I press the up-arrow key.

    Win32Forth6v05H is available here : http://www.inventio.co.uk/Win32Forth6v05H.7z

    Cheers,
    Howerd

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to dxforth on Thu May 5 10:53:37 2022
    On 2/05/2022 14:46, dxforth wrote:

    Not out-of-the-box anyway. A quick browse of the docs brought no joy despite K-UP etc being provided.
    No further info on the above however Google brought up this new doc on Win32Forth by Bill Ragsdale:

    https://github.com/BillRagsdale/WIN32Forth-Guide

    The 'official' Win32Forth site is here:

    http://win32forth.sourceforge.net/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jos Ven@21:1/5 to All on Thu May 5 01:18:53 2022
    Op zondag 1 mei 2022 om 19:15:39 UTC+2 schreef Zoltan Spin:
    Hi!
    Discovering the just loaded Win32Forth, I found that EKEY doesnt provide anything when arrows are pressed, which is quite an issue when any user interface is needed.

    What did I miss?

    If I get this to work, maybe latter I ask about the mouse state.

    Thank you for any help
    Zoltan

    In Win32For version 6.15.04 that is possible by creating
    a window and use then use the WM_KEYDOWN message.
    That will give you the needed scan code.
    Jos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zoltan Spin@21:1/5 to All on Fri May 6 13:01:21 2022
    Thank you NN, Dxforth, Anton, Howerd, Jos for your quick and kind comments.
    I tried again and got this:

    \ Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
    ekey . -7FFFFFFE ok \ up
    ekey . -7FFFFFFD ok \ dn
    ekey . -80000000 ok \ left
    ekey . -7FFFFFFF ok \ right

    \ Win32Forth: a 32 Bit Forth for Windows 95/98/ME/NT4/W2K/XP/VISTA/W7/W8/W10
    \ Version: 6.15.05 Build: 2
    ekey . never got anything, like keys are disconnected. (nor anything from ekey?)

    I go on with Gforth.
    This will occupy me nicely for a few months, and then I need to use the mouse (anticipating some headache too ;-)

    An opinion: Forth would be way more in use if it takes into account that people need to make visuals.
    Like there are words to manipulate I/Os like in all languages, without requiring a skilled professional insight into the computer guts.
    Having said that, It is beyond my limited knowledge to understand the issue, I can only highlight the need.

    Thanks again,
    Zoltan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Coombs@21:1/5 to Zoltan Spin on Fri May 6 22:50:46 2022
    On Fri, 6 May 2022 13:01:21 -0700 (PDT)
    Zoltan Spin <kvieta.pensulo@gmail.com> wrote:

    \ Win32Forth: a 32 Bit Forth for Windows 95/98/ME/NT4/W2K/XP/VISTA/W7/W8/W10 \ Version: 6.15.05 Build: 2
    ekey . never got anything, like keys are disconnected. (nor anything from ekey?)

    Downloaded version from Howerd's link.
    Windows7 found where to get 7z de-compressor, but instead.
    Converted to .zip on host linux machine.
    Windows unzipped this into downloads folder
    Ran win32for.exe from there:

    Win32Forth: ANS Forth for Windows 95/98/ME/NT/2K/XP/7/8/10
    Version: 6.05 Build: 0100 453K bytes free
    OS: Windows 7 Home directory: C:\Users\Jan\Downloads\Win32Forth6v05H

    ekey hex . 20006 ok \ up
    ekey hex . 20005 ok \ right
    ekey hex . 20007 ok \ down
    ekey hex . 20004 ok \ left

    Jan Coombs
    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to Zoltan Spin on Fri May 6 20:04:14 2022
    On Friday, May 6, 2022 at 4:01:22 PM UTC-4, Zoltan Spin wrote:
    Thank you NN, Dxforth, Anton, Howerd, Jos for your quick and kind comments.
    I tried again and got this:

    \ Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
    ekey . -7FFFFFFE ok \ up
    ekey . -7FFFFFFD ok \ dn
    ekey . -80000000 ok \ left
    ekey . -7FFFFFFF ok \ right

    \ Win32Forth: a 32 Bit Forth for Windows 95/98/ME/NT4/W2K/XP/VISTA/W7/W8/W10 \ Version: 6.15.05 Build: 2
    ekey . never got anything, like keys are disconnected. (nor anything from ekey?)

    I go on with Gforth.
    This will occupy me nicely for a few months, and then I need to use the mouse (anticipating some headache too ;-)

    An opinion: Forth would be way more in use if it takes into account that people need to make visuals.
    Like there are words to manipulate I/Os like in all languages, without requiring a skilled professional insight into the computer guts.
    Having said that, It is beyond my limited knowledge to understand the issue, I can only highlight the need.

    Thanks again,
    Zoltan

    Win32Forth: a 32 Bit Forth for Windows 95/98/ME/NT4/W2K/XP/VISTA/W7/W8/W10 Version: 6.15.05 Build: 2
    Platform: Windows 10 Home, 8,747k bytes free

    ekey hex . D ok \ Enter

    It simply did not respond to any of the arrow keys. It finally responded when I touched the Enter key.

    It did not respond to any of the other similar keys, like Home, End, F1, F2... etc. until I reached F10.
    ekey hex . 10010 ok \ F10 key

    No response to the Delete key, but Backspace did.

    ekey hex . 8 ok \ BS

    So what would have changed in key handling between 6.05 and 6.15.05

    --

    Rick C.

    - Get 1,000 miles of free Supercharging
    - Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zoltan Spin@21:1/5 to All on Sat May 7 05:48:08 2022
    Le samedi 7 mai 2022 à 05:04:15 UTC+2, gnuarm.del...@gmail.com a écrit :
    On Friday, May 6, 2022 at 4:01:22 PM UTC-4, Zoltan Spin wrote:
    Thank you NN, Dxforth, Anton, Howerd, Jos for your quick and kind comments.
    I tried again and got this:

    \ Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc. ekey . -7FFFFFFE ok \ up
    ekey . -7FFFFFFD ok \ dn
    ekey . -80000000 ok \ left
    ekey . -7FFFFFFF ok \ right

    \ Win32Forth: a 32 Bit Forth for Windows 95/98/ME/NT4/W2K/XP/VISTA/W7/W8/W10
    \ Version: 6.15.05 Build: 2
    ekey . never got anything, like keys are disconnected. (nor anything from ekey?)

    I go on with Gforth.
    This will occupy me nicely for a few months, and then I need to use the mouse (anticipating some headache too ;-)

    An opinion: Forth would be way more in use if it takes into account that people need to make visuals.
    Like there are words to manipulate I/Os like in all languages, without requiring a skilled professional insight into the computer guts.
    Having said that, It is beyond my limited knowledge to understand the issue, I can only highlight the need.

    Thanks again,
    Zoltan

    Win32Forth: a 32 Bit Forth for Windows 95/98/ME/NT4/W2K/XP/VISTA/W7/W8/W10 Version: 6.15.05 Build: 2
    Platform: Windows 10 Home, 8,747k bytes free

    ekey hex . D ok \ Enter

    It simply did not respond to any of the arrow keys. It finally responded when I touched the Enter key.

    It did not respond to any of the other similar keys, like Home, End, F1, F2... etc. until I reached F10.
    ekey hex . 10010 ok \ F10 key

    No response to the Delete key, but Backspace did.

    ekey hex . 8 ok \ BS

    So what would have changed in key handling between 6.05 and 6.15.05

    --

    Rick C.

    - Get 1,000 miles of free Supercharging
    - Tesla referral code - https://ts.la/richard11209
    ==================================================================
    gnuarm,
    I had a doubt after reading Jan Coombs, and did exactly the same as you yesterday, with exactly the same (non) result:

    Win32Forth: a 32 Bit Forth for Windows 95/98/ME/NT4/W2K/XP/VISTA/W7/W8/W10 Version: 6.15.05 Build: 2
    Compiled: dimanche, avril 10 2022, 9:02
    Platform: Windows 10 Home, 8,745k bytes free
    2,812 Words in Application dictionary
    2,631 Words in System dictionary
    5,443 Words total in dictionaries
    20,312 Windows Constants available
    Loading Win32For.CFG
    Loading Win32ForUser.CFG

    Current directory is: C:\Users\Tech\Win32Forth\Win32Forth
    Program path is: C:\Users\Tech\Win32Forth\Win32Forth\Win32for.exe
    Forth path is: C:\Users\Tech\Win32Forth\Win32Forth\
    Application path is: not set

    System Editor is: Win32Forth IDE

    ekey hex . D ok \ here exited as you as I could..
    .s empty ok

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)