[Oberon] Oberon keyboard tweaks

Hans Klaver hklaver at dds.nl
Tue Oct 24 19:20:54 CEST 2023


Hi Jörg,

> Hans
>  
> I saw you modified my TextFrames.Write.
>  
> The underlying logic of my code is that Input.Read returns four special Oberon keys called “left”, “right”, “up”, “down” whatever their HW scancodes are.
> If you want Ctrl-B, Ctrl-F, Ctrl-P and Ctrl-N to behave like those 4 cursor keys, try mapping their scancodes to the 4 keys and leave TextFrame.Write untouched.
> However, it might be you want Ctrl-B, Ctrl-F… to behave differently in Frames that are not TextFrames.


You are right, adding the ^B, ^F, ^P & ^N control keys to your extra lines for TextFrames.Write is redundant in my setup of the keyboard translation table in Input.Init. 

Thanks for mentioning it. Now I realize they are actually a leftover from my experiments to which ASCII-codes to map the scancodes of the arrow keys in the table. As you can read I finally chose the ASCII-codes of these particular control keys, because especially ^B and ^F are traditionally used for left and right cursor movement (e.g. in many command line setups).

I will remove them from your code in TextFrames.Write. In my mapping even then these control keys can still be used for the same cursor movements. 

By the way, I encountered your code for TextFrames.Write on Roel de Jonge's webpage for his macOS RISC emulator (which he abandoned for reasons unknown to me). The page can still be found on the Internet Archive:
https://web.archive.org/web/20201229164332/http://www.reactive-instruments.eu/support/cursorControl.html

Regards,

Hans




More information about the Oberon mailing list