Re: [M100] M100 Linux keyboard via inputattach?

2022-09-20 Thread B 9
On Mon, Sep 19, 2022 at 9:04 AM Hiraghm  wrote:

> 1) I would like to use it as a keyboard with my PinePhone, which runs
> Mobian Linux.
>
Sounds like fun! So, have you tried inputattach --ps2serkbd ? Did it work?

2) I'd also like to still be able to telnet onto the phone from the
> keyboard and run some shell commands (mostly for fun)
>
Yes, it will still work, but not both at the same time. Instead of running
inputattach, you'd run getty to present a Login: prompt on the serial port.
On my Debian box, I use systemctl start serial-getty@ttyUSB0 to start the
login daemon manually.

By the way, it's not technically "TELNET" (which worked over the Internet,
like ssh). The program you'll use is "TELCOM", a simple serial console that
connects over the RS232-C port.


> 3) I was thinking of maybe attaching a PI-Zero to it, then I remember that
> I have a 5" touchscreen I can use with it, too. So maybe I'd usually use
> the M100, shelling onto the pi for storage, internet access, or running
> shell programs (like w3m or wordgrinder), and when I needed to, attach the
> screen and use the keyboard for input.
>
No reason not to do both a Pi and a phone, as you saw in that video Brian
shared.


> 4) I also planned on 3d printing a pi-zero attachment case, to support the
> pi connection, and so maybe also print a version with support for the 5"
> display.
>
Also very cool. Everyone will envy your style at the café.  


> 5) I even had the thought to make the case distend below the M100 so as to
> act as a support (like the leg pegs), which might provide room for
> additional batteries, as well
>
Additional batteries may be a good idea. I've noticed that my Model 200 can
run for weeks and weeks on the standard batteries, but they can drain
quickly when using the serial port.

—b9


Re: [M100] M100 Linux keyboard via inputattach?

2022-09-19 Thread Hiraghm

Date: Sun, 11 Sep 2022 17:07:38 -0700
From: B 9
To:m...@bitchin100.com
Subject: Re: [M100] M100 Linux keyboard via inputattach?
Message-ID:

Content-Type: text/plain; charset="utf-8"

On Wed, Sep 7, 2022 at 5:43 AM Hiraghm  wrote:


This is probably a dumb question, maybe even one that was asked/answered
long ago, but...

would it be possible to use a model 100/102/200 as a keyboard for a
Linux workstation via "inputattach"?


Yes, inputattach would work fine, but this seems like a peculiar request
and has me curious what you are doing. Is this to work with an emulator on
the Linux workstation?  Do you have a Model 100 with no screen? Are you so
used to the Model 100 keyboard layout that switching to this new-fangled
IBM keyboard layout doesn't seem worth it?

Actually, now that I think on it, that last point is not such a bad idea. I
have a DEC VT-340 serial terminal which uses the LK-201 keyboard that
inspired IBM's AT keyboard layout. I cannot stand the placement of the CTRL
key and it doesn't even have a proper Esc key. However, if I had a Model
100 I could plug it directly into the VT-340's keyboard port (which I
believe speaks 600 baud RS-232) and it'd make a dandy keyboard. And, a
Model 100 would fit better on my desk tha DEC's huge, honkin' keyboard with
all sorts of wacky "application editing" keys. Now, I just need to find a
Model 100/102 with a defunct screen!

?b9


1) I would like to use it as a keyboard with my PinePhone, which runs 
Mobian Linux.


2) I'd also like to still be able to telnet onto the phone from the 
keyboard and run some shell commands (mostly for fun)


3) I was thinking of maybe attaching a PI-Zero to it, then I remember 
that I have a 5" touchscreen I can use with it, too. So maybe I'd 
usually use the M100, shelling onto the pi for storage, internet access, 
or running shell programs (like w3m or wordgrinder), and when I needed 
to, attach the screen and use the keyboard for input.


4) I also planned on 3d printing a pi-zero attachment case, to support 
the pi connection, and so maybe also print a version with support for 
the 5" display.


5) I even had the thought to make the case distend below the M100 so as 
to act as a support (like the leg pegs), which might provide room for 
additional batteries, as well.





Re: [M100] M100 Linux keyboard via inputattach?

2022-09-12 Thread Brian Brindle
I was trying to do this myself and ended up going a different way. I have
done this with xdotool and a perl wrapper that allows me to re-map some
keys and use the xdotool commands to do special key combinations and even
mouse basic movements. I had all kinds of plans to do stuff with this but
when I added the feature to hit CODE+/ and could enter in the xdotool
keywords to do anything I sort of lost momentum. Not to mention I switched
directions and started playing with an adafruit bluefruit EZ-key for serial
to BT connectivity. I thought the hardware version would be more useful for
typing on anything that could accept BT Keyboard's.

The perl script is below for inspiration and here is a link to a video of
me using it:
https://www.youtube.com/watch?v=GIv831sT50w

#Simple Perl 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 testing - Ctrl-C remapped to
GRPH-C
$ENV{'DISPLAY'} = ':0.0';  # Set X-display

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); }
 #CODE+/ for xdotool keyword input for complex key
combinations
 elsif  (ord($char) == 174) { print "INPUT KEYS:"; my $keyin =
;chomp $keyin; qx (xdotool key "$keyin"); }
   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__

On Sun, Sep 11, 2022 at 8:08 PM B 9  wrote:

> On Wed, Sep 7, 2022 at 5:43 AM Hiraghm  wrote:
>
>> This is probably a dumb question, maybe even one that was asked/answered
>> long ago, but...
>>
>> would it be possible to use a model 100/102/200 as a keyboard for a
>> Linux workstation via "inputattach"?
>>
>
> Yes, inputattach would work fine, but this seems like a peculiar request
> and has me curious what you are doing. Is this to work with an emulator on
> the Linux workstation?  Do you have a Model 100 with no screen? Are you so
> used to the Model 100 keyboard layout that switching to this new-fangled
> IBM keyboard layout doesn't seem worth it?
>
> Actually, now that I think on it, that last point is not such a bad idea.
> I have a DEC VT-340 serial terminal which uses the LK-201 keyboard that
> inspired IBM's AT keyboard layout. I cannot stand the placement of the CTRL
> key and it doesn't even have a proper Esc key. However, if I had a Model
> 100 I could plug it directly into the VT-340's keyboard port (which I
> believe speaks 600 baud RS-232) and it'd make a dandy keyboard. And, a
> Model 100 would fit better on my desk tha DEC's huge, honkin' keyboard with
> all sorts of wacky "application editing" keys. Now, I just need to find a
> Model 100/102 with a defunct screen!
>
> —b9
>


Re: [M100] M100 Linux keyboard via inputattach?

2022-09-11 Thread B 9
On Wed, Sep 7, 2022 at 5:43 AM Hiraghm  wrote:

> This is probably a dumb question, maybe even one that was asked/answered
> long ago, but...
>
> would it be possible to use a model 100/102/200 as a keyboard for a
> Linux workstation via "inputattach"?
>

Yes, inputattach would work fine, but this seems like a peculiar request
and has me curious what you are doing. Is this to work with an emulator on
the Linux workstation?  Do you have a Model 100 with no screen? Are you so
used to the Model 100 keyboard layout that switching to this new-fangled
IBM keyboard layout doesn't seem worth it?

Actually, now that I think on it, that last point is not such a bad idea. I
have a DEC VT-340 serial terminal which uses the LK-201 keyboard that
inspired IBM's AT keyboard layout. I cannot stand the placement of the CTRL
key and it doesn't even have a proper Esc key. However, if I had a Model
100 I could plug it directly into the VT-340's keyboard port (which I
believe speaks 600 baud RS-232) and it'd make a dandy keyboard. And, a
Model 100 would fit better on my desk tha DEC's huge, honkin' keyboard with
all sorts of wacky "application editing" keys. Now, I just need to find a
Model 100/102 with a defunct screen!

—b9


Re: [M100] M100 Linux keyboard via inputattach?

2022-09-11 Thread MikeS
Thanks very much; I'll check it out.

m
  - Original Message - 
  From: B 9 
  To: m...@bitchin100.com 
  Sent: Sunday, September 11, 2022 1:17 PM
  Subject: Re: [M100] M100 Linux keyboard via inputattach?


  On Thu, Sep 8, 2022 at 9:14 AM Joshua O'Keefe  
wrote:

  On Sep 8, 2022, at 9:09 AM, MikeS  wrote:
  Where can I find a good termcaps file?


I don't have a file in termcap format but the terminfo I use is in my 
bucket.  It's by far the most comprehensive of those I've come across:


http://public.nachomountain.com/files/m100/


  The original source of that terminfo is here:


  https://github.com/hackerb9/tandy-terminfo


  It does work pretty well and I haven't had to update it in a while so the 
copy in Joshua's Nacho Mountain is probably current. But I still recommend 
checking out the original github page as it has extra tips on how to use it and 
how to work around programs which do not use terminfo. (Unfortunately, the 
number of programs doing that is growing every year.) It also has a handy 
script for setting up the workarounds, currently called td200 because I only 
have a Tandy 200 to test on. I'd love to get feedback from people with other 
machines so I can make it more general.


  By the way, if a termcap is actually needed, the infotocap program (which 
comes with ncurses) will create one for you.



  —b9




Re: [M100] M100 Linux keyboard via inputattach?

2022-09-11 Thread B 9
On Thu, Sep 8, 2022 at 9:14 AM Joshua O'Keefe 
wrote:

> On Sep 8, 2022, at 9:09 AM, MikeS  wrote:
> Where can I find a good termcaps file?
>
>
> I don't have a file in termcap format but the terminfo I use is in my
> bucket.  It's by far the most comprehensive of those I've come across:
>
> http://public.nachomountain.com/files/m100/
>

The original source of that terminfo is here:

https://github.com/hackerb9/tandy-terminfo

It does work pretty well and I haven't had to update it in a while so the
copy in Joshua's Nacho Mountain is probably current. But I still recommend
checking out the original github page as it has extra tips on how to use it
and how to work around programs which do not use terminfo. (Unfortunately,
the number of programs doing that is growing every year.) It also has a
handy script for setting up the workarounds, currently called td200
 because I
only have a Tandy 200 to test on. I'd love to get feedback from people with
other machines so I can make it more general.

By the way, if a term*cap* is actually needed, the infotocap program (which
comes with ncurses) will create one for you.

—b9


Re: [M100] M100 Linux keyboard via inputattach?

2022-09-08 Thread Joshua O'Keefe
> On Sep 8, 2022, at 9:09 AM, MikeS  wrote:
> Where can I find a good termcaps file?

I don't have a file in termcap format but the terminfo I use is in my bucket.  
It's by far the most comprehensive of those I've come across:

http://public.nachomountain.com/files/m100/




Re: [M100] M100 Linux keyboard via inputattach?

2022-09-08 Thread MikeS
Where can I find a good termcaps file?

m

  - Original Message - 
  From: John R. Hogerhuis 
  To: m...@bitchin100.com 
  Sent: Wednesday, September 07, 2022 4:43 PM
  Subject: Re: [M100] M100 Linux keyboard via inputattach?


  It's an interesting idea, should work.

  When I hook to linux I set a termcap / getty. Either wired or a wimodem.

  And HTERM to do flow control and let me see some UTF-8 output including line 
drawing characters.

  But if you want to use the host's display only inputattach seems like a 
better way.

  WP-2 should work too, it has a terminal program.



  -- John.


  On Wed, Sep 7, 2022 at 5:43 AM Hiraghm  wrote:

This is probably a dumb question, maybe even one that was asked/answered 
long ago, but...

would it be possible to use a model 100/102/200 as a keyboard for a 
Linux workstation via "inputattach"?

As I understand it, inputattach connects a serial device to the input 
stream of a Linux system.

Rather than modifying the keyboard to an M100/102/200, this would leave 
the M100/102/200 intact, and one could still telnet onto the Linux box 
from the M100/102/200 sometimes.

I wonder if this could be done with a WP-2, as well?




Re: [M100] M100 Linux keyboard via inputattach?

2022-09-07 Thread John R. Hogerhuis
It's an interesting idea, should work.

When I hook to linux I set a termcap / getty. Either wired or a wimodem.

And HTERM to do flow control and let me see some UTF-8 output including
line drawing characters.

But if you want to use the host's display only inputattach seems like a
better way.

WP-2 should work too, it has a terminal program.

-- John.

On Wed, Sep 7, 2022 at 5:43 AM Hiraghm  wrote:

> This is probably a dumb question, maybe even one that was asked/answered
> long ago, but...
>
> would it be possible to use a model 100/102/200 as a keyboard for a
> Linux workstation via "inputattach"?
>
> As I understand it, inputattach connects a serial device to the input
> stream of a Linux system.
>
> Rather than modifying the keyboard to an M100/102/200, this would leave
> the M100/102/200 intact, and one could still telnet onto the Linux box
> from the M100/102/200 sometimes.
>
> I wonder if this could be done with a WP-2, as well?
>
>
>


Re: [M100] M100 Linux keyboard via inputattach?

2022-09-07 Thread Allan Zieser

The WP-2 also has telnet so as long as you are using a serial to usb null cable 
it should be able to send and recieve text. I wouldl have to try and see if it 
works.


Allan Zieser


[M100] M100 Linux keyboard via inputattach?

2022-09-07 Thread Hiraghm
This is probably a dumb question, maybe even one that was asked/answered 
long ago, but...


would it be possible to use a model 100/102/200 as a keyboard for a 
Linux workstation via "inputattach"?


As I understand it, inputattach connects a serial device to the input 
stream of a Linux system.


Rather than modifying the keyboard to an M100/102/200, this would leave 
the M100/102/200 intact, and one could still telnet onto the Linux box 
from the M100/102/200 sometimes.


I wonder if this could be done with a WP-2, as well?