bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] A GTK wrapper for GNU APL


From: Chris Moller
Subject: Re: [Bug-apl] A GTK wrapper for GNU APL
Date: Sat, 16 Aug 2014 17:04:36 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

I'm not sure what you're trying to do.  Would this do it?

 if (((key_event->state == 0 || key_event->state == GDK_MOD2_MASK) &&
       key_event->keyval == GDK_KEY_Return) ||
      (key_event->state == GDK_MOD2_MASK
       && key_event->keyval == GDK_KEY_KP_Enter)) {
// send line to APL
}

(GDK_MOD2_MASK is numlock)

What this does is:
  • If the state is zero or Numlock is on, and Return is pressed, send the line to APL.
  • If numlock is off, treat KP_Enter like a normal character and insert a newline into the buffer.
  • if numlock is on, treat KP_Enter like Return and send the line to APL.

cm

On 08/13/14 17:03, Frederick H. Pitts wrote:
Hello Chris,

	Please consider 1) filtering out whether the 'NumLock' is active or not
when you test the key event state is 0 and keyval is GDK_KEY_Return and
2) adding support for a keyval of GDK_KEY_KP_Enter in the same test.
Then using the numeric keypad with aplwrap would be a lot more pleasant.
As it is right now, aplwrap doesn't send text to GnuAPL on return key
presses when the 'NumLock' is active.

Thanks,

Fred
Retired Chemical Engineer

On Wed, 2014-08-13 at 13:33 -0400, Chris Moller wrote:
I've just pushed a new version to github.

      * Switched to the FreeMono font rather than the SimPL font.
        ]keyb still doesn't look right, but I think it's the box
        characters screwing up and not the normal characters. Mono is
        now the default; use the -v option if you  want variable
        width.
      * Revised the keymap to match ]keyb.  There are a few symbols,
        circle-diaresis, star-diaresis, and quad-colon that GNU APL
        doesn't seem to support, and since I'm basing my keymap on the
        GNU APL Avec.def file, nothing happens when you press those
        keys.  Let me know if that's a problem and I'll try to do
        something about it.  Also, in the real world, diamond is on
        the alt-backquote key but KDE-world intercepts that key and
        there's no way to change that, so I've mapped diamond to the
        otherwise unused alt-d. ]keyb also shows a bizarre symbol, a
        tilde-zero or something like that, on alt-].  I  can't find
        anything similar in the Unicode tables, so I'm ignoring it,
        Let me know if that's a problem.

Have fun,
cm



On 08/13/14 00:11, Blake McBride wrote:

Dear Chris,


Wow.  Very nice!  A few things I noticed:


1.  The -m did not put it in mono font for me (using current GIT).


2.  Mono font really should be the default otherwise nothing
displays correctly.  Try ]keyb.  Try 5 5⍴⍳25


3.  You are using an old keyboard mapping.  It doesn't match the
output of ]keyb.  It also doesn't match my actual keyboard (which
was designed to match the GNU APL standard.)


Thanks.


Blake





      





reply via email to

[Prev in Thread] Current Thread [Next in Thread]