Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:12 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Mouse support in editor

Author Message
Frank_Drebin
Newbie

Joined: 12/09/2020
Location: Switzerland
Posts: 11
Posted: 04:47pm 15 Sep 2020
Copy link to clipboard 
Print this post

Pardon me if this has already been covered in the forum, but would it be conceivable to add USB mouse support in the Full Screen Editor? The idea would be to use the mouse to move the (editing) cursor, that would be way speedier and more practical than using the arrow keys.

Thanks again for this great little computer.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10310
Posted: 05:08pm 15 Sep 2020
Copy link to clipboard 
Print this post

The CMM2 does not support a mouse and supporting mouse control just for PC connections is not in keeping with the design philosophy Sorry.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 05:50pm 15 Sep 2020
Copy link to clipboard 
Print this post

Hi Frank,

It's not simply a case of plugging a hub into the USB port and then plugging mouse and keyboard into that. The USB port and supporting stack on the CMM2 is very limited and not even all ostensibly standard USB keyboards will work with it. That means a mouse has to be added via the GPIO connector so you have to agree on a pin standard and build an adapter, probably for an obsolete ps/2 or serial mouse. Once that is done each program has to be adapted separately for mouse control.

Peter's answer is understandable.

Best wishes,

Tom
Edited 2020-09-16 03:51 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Frank_Drebin
Newbie

Joined: 12/09/2020
Location: Switzerland
Posts: 11
Posted: 06:50pm 15 Sep 2020
Copy link to clipboard 
Print this post

Thanks for those replies.

It makes sense, but it was worth asking!

Frank
 
NPHighview

Senior Member

Joined: 02/09/2020
Location: United States
Posts: 203
Posted: 07:34pm 15 Sep 2020
Copy link to clipboard 
Print this post

If you're in the DOS version of mmBasic, you can configure an external editor using the environment variables in the DOS / Windows settings.  I'm doing that, with the Basic code on an SD card that I can pop out and then insert into the B: drive in the cmm2.  Maybe not quite as convenient as the USB serial terminal, but I'm much more used to a particular editor, and the use of a mouse and "conventional" keyboard shortcuts (ctrl-c, ctrl-v, etc.).

- Steve
Live in the Future. It's Just Starting Now!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 08:11am 16 Sep 2020
Copy link to clipboard 
Print this post

Silicon Chip magazine did a project that allowed you to connect a mouse to a MCU by converting the mouse data into serial.  Perhaps you can harness that for your code.  It will never work in the editor though.  I forget what issue it was in, but within the last year or so - I will look, and post back which issue it was.
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 02:45pm 16 Sep 2020
Copy link to clipboard 
Print this post

have a look at the arduino micro pro:
https://www.ebay.com/itm/222237855486

these use a 32U4 processor that can be set up to mimic a USB keyboard, and would be ideal if you wished to interface an old custom mechanical-switch keyboard to a CMM2.

THEN, at the same time you could ALSO incorporate some sort of mouse functionality via (for example) a serial mouse attached to one of the 32U4 serial ports. map mouse and wheel movement, and button presses to some spare scan codes; if lots of people start using it, then there is an excuse to add support to the editor.

in GFXterm, the mouse wheel is mapped to cursor up/down and so works without need for any mouse-awareness in the onboard editor. perhaps someone could work out a similar scheme to invisibly handle mouse movement?


cheers,
rob   :-)
 
Womble

Senior Member

Joined: 09/07/2020
Location: United Kingdom
Posts: 267
Posted: 02:23am 18 Sep 2020
Copy link to clipboard 
Print this post

  robert.rozee said  have a look at the arduino micro pro:
https://www.ebay.com/itm/222237855486

these use a 32U4 processor that can be set up to mimic a USB keyboard, and would be ideal if you wished to interface an old custom mechanical-switch keyboard to a CMM2.

THEN, at the same time you could ALSO incorporate some sort of mouse functionality via (for example) a serial mouse attached to one of the 32U4 serial ports. map mouse and wheel movement, and button presses to some spare scan codes; if lots of people start using it, then there is an excuse to add support to the editor.

A genuine Teensy 2.0 (also uses the ATMEGA32u4) although more expensive is much easier to use.  I have played around with some chinese clones of the Sparkfun Pro Micro boards.  Many of them do not have enough i/o ports for a full keyboard matrix, and they often are missing the bootloader.  You can hack around this, but YMMV.  You can spend days figuring out how to get the bootloader working to get code onto the chinese clones with no guarantee of sucess.

The CMM2: What Next? thread has extensive discussion about getting mouse support in Basic programs ...
  matherp said  Mouse support via USB is do-able but would be either/or with a keyboard. Mouse support via PS2 is also do-able but would need an I/F adapter and uses a defunct standard. It could be done in a CFunction but can't easily be added to the firmware as there are no command of function slots free

I cannot see any problem with writing a simple text editor with support for a homebrew serial mouse attached to the appropriate gpio port.  I dont think it would be easy, but it should be possible.

Call me a pessimist, but I cannot see mouse support appearing in the firmware editor at any point in the future.  Unfortunately.

However

I did the following search ...


and found this post ...
  matherp said  
  Quote  which has a mouse functionality, and it works fine, surprisingly!


There are some that do because they don't implement the "mouse" via a hub, or the keyboard somehow bypasses the hub, seems to be specifically some type of cheap wireless, but the advice has to be don't buy and expect to work a keyboard with hub or mouse functionality.

in reply to ...
  Atomizer_Zero said  I have one of these

https://www.amazon.co.uk/Rii-Mini-Bluetooth-Wireless-Keyboard-Black/dp/B010WMB6DK/ref=sr_1_3?dchild=1&keywords=rii+mini+i8%2B&qid=1596119132&sr=8-3

which has a mouse functionality, and it works fine, surprisingly! lol


Might serve your use case, if it works, you could hack a decent keyboard matrix and build a fankenstein solution to get a better typing experience in combination with some mouse support.  As I said earlier YMMV.
Edited 2020-09-18 12:28 by Womble
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025