Hey Jonathan,

I made a terrible video of it a few years ago. You can see it here:
https://www.youtube.com/watch?v=GIv831sT50w

I wish in the demo I had typed somewhere other than the terminal to show it
works anywhere on the desktop, not just there. For example I am sending
this e-mail right now from FireFox on the Raspberry Pi using the M102 as my
keyboard.

This was just meant as a proof of concept and I never got around to doing
much else with it. My current job is weird, so my github is not public. The
code is basic, doesn't need to be perl I just used it because I was
familiar with how to make it read individual keys quickly with Glib. Glib
modules are not installed by default so would need to be added.

I had to re-map some keys, added some mouse movements and a "command mode"
where you can type key combinations since that is impossible natively.  The
way that I use it is access my Pi via the serial port, type perl ./
keyboard.pl and type away. (CTRL-C for the remote system has been re-mapped
to GRPH-C)

The script will work fine with a running X windows environment on the
native / hardware display but if using VNC you will need to fiddle with
X-security settings.

[BEGIN PERL SCRIPT]
#!/usr/bin/perl

#Simple script to send keypresses from CLI to xdtool
#Brian Brindle July, 2021

use warnings;
use strict;
use Glib;
use Glib qw/TRUE FALSE/;
use Term::ReadKey;
$|++;

#$SIG{'INT'} = 'IGNORE';   #Ignore Ctrl-C for now work on more elgant way
of handling.
$ENV{'DISPLAY'} = ':0.0';  # Set X-display

sub xdo_cmd {
     ReadMode('normal'); # restore normal tty settings
     print "INPUT KEYS:";
     my $keyin = <STDIN>;
     chomp $keyin;
     qx (xdotool key "$keyin");
     ReadMode('cbreak'); #read single char
     return;
    }

ReadMode('cbreak'); #read single char

my $main_loop = Glib::MainLoop->new;

Glib::Idle->add(
        sub{
            my $char;
            if (defined ($char = ReadKey(0)) ) {    #ReadKey(0) - use 1 for
non-blocking (Return undef)
             if (ord($char) == 10) { print "[RETURN->]\n"; qx (xdotool key
Return); }
             elsif  (ord($char) == 30) { print "[UP->]\n"; qx (xdotool key
Up); }
             elsif  (ord($char) == 31) { print "[DOWN->]\n"; qx (xdotool
key Down); }
             elsif  (ord($char) == 29) { print "[LEFT->]\n"; qx (xdotool
key Left); }
             elsif  (ord($char) == 28) { print "[RIGHT->]\n"; qx (xdotool
key Right); }
             elsif  (ord($char) == 132) { print "[CTRL-C->]\n"; qx (xdotool
key ctrl+c); } #GRPH + C
             elsif  (ord($char) == 1) { print "[MOUSE LEFT]\n"; qx (xdotool
mousemove_relative --polar  270 10); }
             elsif  (ord($char) == 6) { print "[MOUSE RIGHT]\n"; qx
(xdotool mousemove_relative --polar  270 10); }
             elsif  (ord($char) == 20) { print "[MOUSE UP]\n"; qx (xdotool
mousemove_relative --polar  0 10); }
             elsif  (ord($char) == 2) { print "[MOUSE DOWN]\n"; qx (xdotool
mousemove_relative --polar  180 10); }
             elsif  (ord($char) == 34) { print "[QUOTATION]\n"; qx (xdotool
key 0x0ad3); }
             elsif  (ord($char) == 174) { xdo_cmd(); } #CMD + / to enter
xdotool combos. Example ctrl+alt+del
            else {
                print "$char-> chr\$(", ord($char),")\n";
                # Action wtih key presses here:
                qx (xdotool type "$char");
        }
             }
          return TRUE; #Loop
          });

$main_loop->run;
ReadMode('normal'); # restore normal tty settings
__END__
[END PERL SCRIPT]

Brian

On Mon, Dec 11, 2023 at 10:43 AM jonathan.y...@telia.com <
jonathan.y...@telia.com> wrote:

> Hello,
>
> That perl script and whatever else is needed to let the M100 act as
> keyboard input for X windows sounds interesting.  I assume you have the
> raspberry pi video output device showing X?  Would you be willing to share
> the details?
>
> Jonathan
>
> ----Original Message----
> From : bbrin...@gmail.com
> Date : 2023-12-11 - 13:08 (CEST)
> To : m...@bitchin100.com
> Subject : Re: [M100] M100 ergonomics
>
> I've got several and they get used often. Daily task is usually note
> taking with IDEA! or journaling with the built in text editor. I do use the
> Ultimate ROM II and View80 a LOT.  I also use it pretty extensively for
> Amateur radio, primarily logging and satellite tracking. I also spend quite
> a bit of time messing around in CP/M mode doing weird stuff with DDT.
>
> I have a raspberry-pi connected that I've dubbed the "Tan-PI". It's got
> several programs on it to do file sharing / TPDD emulation and I have a
> hacked together perl script that sends each key press from the Tandy to the
> X-windows system as keyboard input allowing me to use the M100 as the
> keyboard to the Raspberry Pi system. I will often remote the Raspberry Pi
> with VNC on my phone when I need a "real desktop" to send an e-mail or go
> to a web stie the tandy can't handle from the Linux CLI.
>
> These are my two go-to addons. I use a small USB power bank and this for
> power:
> https://www.amazon.com/gp/product/B0BJDSG28P
>
> I also have a bunch of these Laptop "Foot" devices. Just drop one at the
> back, middle of the Model-T and it greatly improves the ergonomix. They are
> cheap so I keep one in my bag and one on my desk.
>
> https://www.amazon.com/SUPBEE-Universal-Computer-Anti-Slip-Ventilated/dp/B085QL2QXS
>
>
>
>
> On Mon, Dec 11, 2023 at 6:30 AM Gary Wilkinson < gpwilkin...@hotmail.com>
> wrote:
>
>> My T102 is connected as a terminal to my VAX4000. I have a DVI connected
>> to an LCD screen with composite video, so I get 80 column full screen text.
>> Very useable.
>>
>> Sent from my iPhone
>>
>> > On 11 Dec 2023, at 10:25, Lee Osborne < leeosbo...@fastmail.co.uk>
>> wrote:
>> >
>> > 
>> > I use mine quite a lot for journalling and writing articles, mainly
>> because it has the best keyboard of any device I own. I find that a desk or
>> table is fine as long as the light is reasonably good. I can type faster on
>> it than most other computers or keyboards.
>> >
>> > Lee
>> >
>> >> On Mon, 11 Dec 2023, at 00:47, runrin wrote:
>> >> Hey all!
>> >>
>> >> I was wondering if people would be willing to share how they typically
>> >> use their Model Ts.
>> >>
>> >> I've found that it's pretty difficult for me to find a comfortable
>> >> position to use my Model 100 for any length of time. I'm always
>> bending
>> >> forward to get a better view when I sit at a table or desk, and when
>> >> it's on my lap the lack of palmrest causes the keyboard to slide too
>> >> close to my body making it hard to type.
>> >>
>> >> Do you typically only use them on desks? Do you use yours on your lap?
>> >> Do you use a lap desk? Any tips for how you comfortably use a Model T
>> >> for longer stretches (30+ minutes) would be appreciated.
>> >>
>> >> Thanks!
>> >>
>> >
>> > Lee Osborne
>> > West Lothian, Scotland
>> > 07960 096282
>> > leeosbo...@fastmail.co.uk
>> > www.journeyman.online/services
>>
>
>
>

Reply via email to