Space bar as APL key?

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Space bar as APL key?

Postby JohnS|Dyalog on Wed Jul 20, 2016 1:45 pm

In addition to the native back-tick `r → ⍴ input mechanism, Dyalog on Mac provides optional DyalogAlt??.keylayout files so that APL characters may be typed into other applications such as email and text editors. It's the Mac equivalent of Windows' IME: see the MacOS tab in http://www.dyalog.com/apl-font-keyboard.htm for download/installation details. These keyboards use Alt as the APL key, so that Alt+r → ⍴.

I've been experimenting with the Karabiner keyboard customiser for Mac (https://pqrs.org/osx/karabiner/) to use the Space bar as an alternate APL key.

This means that, while writing this forum post, I'm holding down Space (with either thumb) to enter APL chars: ⍳ ⍴ ↑ ⍋ ...

After a little practice, it begins to feel very nice because the thumbs are always in position: finger-contortions occur no more frequently than if I were typing plain English text.

I notice two minor differences in my typing:

1. A regular blank is now echoed when the Space bar is released rather than when it is pressed. It took me a while to realise this was happening, so it's not at all distracting.

2. Karabiner must disable auto-repeat for Space, which makes it behave in this respect like a regular non-repeating alphabetic a-z key: to insert a bunch of blanks you need to press and release the Space bar repeatedly.

There is some precedent for this arrangement, which is known as SandS (Space and Shift) see: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys

John.
JohnS|Dyalog
 

Re: Space bar as APL key?

Postby JohnS|Dyalog on Sun Jul 31, 2016 9:20 am

Update: I now have a little menu on my MacBook menu bar with items: Mac, Win and Off. This allows me to use the same Space+ modifier to type APL characters into both Mac and Windows (VM and Remote Desktop) apps, including APL sessions in both environments. For example, on my Mac keyboard, I can now use Space+r to type ⍴ irrespective of the application.

Stop press: Takayama Fumihiko of Karabiner showed me how to make this process automatic so I no longer need my menu. Now, when typing into regular Mac apps, Space+... sends Alt+... and when typing into VM or RDC, Space+... sends Ctrl+... Also holding down Right_Alt+Space gives me repeating blanks.
JohnS|Dyalog
 


Return to APL Chat

Who is online

Users browsing this forum: Google [Bot] and 1 guest