Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #55126

Re: Inconsequent EKEY values in GForth

From rickman <gnuarm@gmail.com>
Newsgroups comp.lang.forth
Subject Re: Inconsequent EKEY values in GForth
Date 2017-02-26 15:27 -0500
Organization A noiseless patient Spider
Message-ID <o8vdkd$d2n$1@dont-email.me> (permalink)
References (3 earlier) <o8ssib$v71$1@dont-email.me> <40a3d82e-956e-490a-bfdc-d7bb1443ea04@googlegroups.com> <o8tm6a$1pk$2@dont-email.me> <c733a3bf-7ba6-4636-a3d1-47464ffd842a@googlegroups.com> <4437aca3-dea6-48a9-a651-133c06f19ef3@googlegroups.com>

Show all headers | View raw


On 2/26/2017 6:13 AM, lehs wrote:
> Den söndag 26 februari 2017 kl. 09:48:26 UTC+1 skrev lehs:
>> Den söndag 26 februari 2017 kl. 05:41:34 UTC+1 skrev rickman:
>>> On 2/25/2017 9:48 PM, lehs wrote:
>>>> Den lördag 25 februari 2017 kl. 22:24:15 UTC+1 skrev rickman:
>>>>> On 2/25/2017 8:14 AM, lehs wrote:
>>>>>> SP-Forth for Windows seems to manage the idea of ANS:
>>>>>>
>>>>>> 1020031 1
>>>>>> 1030032 2
>>>>>> 1040033 3
>>>>>>
>>>>>> 1100051 q
>>>>>> 1110057 w
>>>>>> 1120045 e
>>>>>> 1130072 r
>>>>>> 1140074 t
>>>>>> 1150079 y
>>>>>>
>>>>>> My leftmost keys
>>>>>> 101001B ESC
>>>>>> 12900F5 §
>>>>>> 10F0009 TAB
>>>>>> 13A0000 CAPS LOCK
>>>>>> 12A0000 SHIFT
>>>>>> 11D0000 CTRL
>>>>>>
>>>>>> The rightmost SHIFT
>>>>>> 1360000 SHIFT
>>>>>>
>>>>>> The arrows
>>>>>> 14B0000 LEFT
>>>>>> 1480000 UP
>>>>>> 14D0000 RIGHT
>>>>>> 1500000 DOWN
>>>>>
>>>>> If your system reports things like  the shift key being pressed, does it
>>>>> also report the shift key being released?  Or does it report other keys
>>>>> differently when shift, cntl and alt are pressed in the eight
>>>>> combinations?  What about device specific keys like the "Fn" key on my
>>>>> laptop?  Or are you on a desktop?
>>>>>
>>>>> --
>>>>>
>>>>> Rick C
>>>>
>>>> It works like KEY but with physical single keystrokes. It's not perfectly consequent, left shift differ from right shift but left ctrl equals to right ctrl and the fn key is ignored (as some other keys for volume etc).
>>>>
>>>> I use a HP laptop.
>>>
>>> I'm not sure what you intend by "consequent".
>>>
>>> If the shift and control keys are to be used as modifier, it is required
>>> to know when they are pressed as well as when they are released unless
>>> the keyboard or other software is performing the modifications of the
>>> other keys for you.  If you press and hold the shift key while typing
>>> "THIS IS ALL CAPS", some software somewhere has to know when the shift
>>> key was released.
>>>
>>> --
>>>
>>> Rick C
>>
>> I will use a combination of this EKEY and KEY that I think will work fine.
> This seems to work:
>
> 0x0140 CONSTANT FENCE \ lim between act keys and pre keys
> 0xFFFF CONSTANT MASK  \ mask ascii from EKEY code
>
> : KEY* \ -- code
>   EKEY DUP MASK AND        \ ascii?
>   IF MASK AND EXIT THEN    \ ascii code
>   16 RSHIFT DUP FENCE >    \ action key?
>   IF EXIT                  \ action code
>   THEN DROP KEY ;          \ double keystroke
>
> Everything works except ^C in the new console in Windows 10, if inactivate the ctrl-shortcut keys.

So standard ASCII keys set bits in the lower two bytes.  I assume the 
use of the mask before exiting means upper bits could be set?  Any idea 
why that is?

"Action codes" means what exactly?  Was the 140 fence determined 
empirically?  What keys are between 140 and 127 (the top of the ASCII 
codes)?  Finally why do codes below 140 imply double keystroke?  Do you 
understand how EKEY and KEY interact?  I don't follow why KEY is read 
under some conditions.

-- 

Rick C

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-19 02:52 -0800
  Re: Inconsequent EKEY values in GForth rickman <gnuarm@gmail.com> - 2017-02-21 17:16 -0500
    Re: Inconsequent EKEY values in GForth Julian Fondren <julian.fondren@gmail.com> - 2017-02-21 14:26 -0800
    Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-21 23:01 -0800
    Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-21 23:50 -0800
      Re: Inconsequent EKEY values in GForth Paul Rubin <no.email@nospam.invalid> - 2017-02-22 00:40 -0800
        Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-22 00:44 -0800
          Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-22 00:48 -0800
          Re: Inconsequent EKEY values in GForth Paul Rubin <no.email@nospam.invalid> - 2017-02-22 00:51 -0800
            Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-22 00:54 -0800
            Re: Inconsequent EKEY values in GForth minforth@arcor.de - 2017-02-22 02:11 -0800
              Re: Inconsequent EKEY values in GForth Paul Rubin <no.email@nospam.invalid> - 2017-02-22 13:46 -0800
                Re: Inconsequent EKEY values in GForth rickman <gnuarm@gmail.com> - 2017-02-22 17:04 -0500
                Re: Inconsequent EKEY values in GForth minforth@arcor.de - 2017-02-23 04:21 -0800
                Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-23 05:51 -0800
                Re: Inconsequent EKEY values in GForth Julian Fondren <ayrnieu@gmail.com> - 2017-02-23 06:02 -0800
                Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-23 06:10 -0800
                Re: Inconsequent EKEY values in GForth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-02-23 15:45 +0000
                Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-23 07:07 -0800
    Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-22 04:25 -0800
      Re: Inconsequent EKEY values in GForth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-02-22 14:22 +0100
        Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-22 11:16 -0800
      Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-22 11:44 -0800
      Re: Inconsequent EKEY values in GForth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-02-23 16:21 +0000
        Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-24 05:04 -0800
          Re: Inconsequent EKEY values in GForth "Elizabeth D. Rather" <erather@forth.com> - 2017-02-24 12:27 -1000
            Re: Inconsequent EKEY values in GForth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-02-25 12:51 +0100
          Re: Inconsequent EKEY values in GForth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-02-25 16:37 +0000
      Re: Inconsequent EKEY values in GForth "Rudy Velthuis" <newsgroups@rvelthuis.de> - 2017-03-12 04:20 +0000
    Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-25 05:14 -0800
      Re: Inconsequent EKEY values in GForth rickman <gnuarm@gmail.com> - 2017-02-25 16:24 -0500
        Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-25 18:48 -0800
          Re: Inconsequent EKEY values in GForth rickman <gnuarm@gmail.com> - 2017-02-25 23:41 -0500
            Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-26 00:48 -0800
              Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-26 03:13 -0800
                Re: Inconsequent EKEY values in GForth rickman <gnuarm@gmail.com> - 2017-02-26 15:27 -0500
                Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-26 23:39 -0800
                Re: Inconsequent EKEY values in GForth peter.m.falth@gmail.com - 2017-02-26 14:42 -0800
                Re: Inconsequent EKEY values in GForth rickman <gnuarm@gmail.com> - 2017-02-26 18:20 -0500
                Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-26 23:43 -0800
                Re: Inconsequent EKEY values in GForth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-02-27 13:03 +0100
                Re: Inconsequent EKEY values in GForth lehs <skydda.barnen@gmail.com> - 2017-02-27 04:22 -0800
                Re: Inconsequent EKEY values in GForth albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-02-27 13:31 +0100
  Re: Inconsequent EKEY values in GForth anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-02-23 16:27 +0000
  Re: Inconsequent EKEY values in GForth Bernd Paysan <bernd@net2o.de> - 2017-03-12 00:36 +0000

csiph-web