Sometimes a Rat is better than a Mouse

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Sometimes a Rat is better than a Mouse

Post by richmond62 » Thu Apr 11, 2019 9:14 am

I have just bought myself an odd-shaped mouse as am getting some wrist pain:
-
RAT.png
RAT.png (26.16 KiB) Viewed 5261 times
-
https://www.trust.com/en/product/22885- ... omic-mouse
-
and I am very happy with it . . . BUT . . . as usual, the boy wants more . . .

It is currently connected to a machine running Xubuntu in my school.

It has 6 buttons . . .

this:

Code: Select all

on mouseDown MX
   put MX into fld "bn"
end mouseDown
only picks up buttons 1,2 and 3 (i.e. left button, scroll button and right button) but not
buttons 4, 5 and 6.

RawKeyDown picks up the forward and the backward scroll.

Now, to be fair, the system (Xubuntu) seems "a bit dicky" about picking up buttons 4, 5 & 6,
whether macOS 10.14.whatever will do any better when I go home tonight we'll have to see.

Is this a LiveCode-specific problem, or does it depend on the operating system?
Last edited by richmond62 on Thu Apr 11, 2019 1:08 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Thu Apr 11, 2019 9:21 am

The interesting thing is that, if I click button 4 or 5 on the mouse, the grab bar
at the top of the LiveCode stack flashes in the same way as it does when I
click button 1,2 or 3, proving that LiveCode does, in some way, pick up the
button click.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Thu Apr 11, 2019 9:47 am

Tangentially, this:

Code: Select all

on rawKeyDown RKD
   put RKD into fld "RAWK"
end rawKeyDown

on keyUP KUP
   put KUP into fld "KEE"
end keyUP

on mouseDown MX
   put MX into fld "bn"
end mouseDown
does not work properly insofar as the rawKeyDown and the keyUp are NOT
"seen" by LiveCode: obviously the mouseDown somehow interferes with that.

This is, actually, a pain-in-the-barbeque-sauce! 8)

If one changes mouseDown to mouseUp it makes not difference.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Thu Apr 11, 2019 9:56 am

bNum.png
-
The documentation (9.0.3) as, as is so often the case, hopelessly out of date.
Last edited by richmond62 on Sat Apr 13, 2019 10:15 am, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Sat Apr 13, 2019 10:15 am

So, it's the weekend round these parts, and I'm messing around with my 6 button mouse
on my machine running macOS 10.14.5 beta 2 and getting NO MORE JOY out buttons 4,5 & 6
that I did on the Linux box in my school, either inwith LiveCode or elsewhere.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Sometimes a Rat is better than a Mouse

Post by FourthWorld » Sat Apr 13, 2019 3:34 pm

Does this device ship with driver software?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Sat Apr 13, 2019 4:02 pm

Does this device ship with driver software?
No, it doesn't, and, although I know I look as green as a cabbage looking
I have spent donkey's ages p*ssing around with just about everyone else's
driver software to get "somewhere" . . .

. . . currently experiencing a "love in" with ControllerMate:

http://www.orderedbytes.com/controllermate/

However, as "we all know" (don't you just hate it when people write that?)
a USB's device's buttons DO send signals to the merry CPU . . .

For the sake of argument, my Belkin Nostromo 52 currently works as a sort of
cockeyed keyboard, and TextEdit (on a Macintosh) picks up letters from its keys.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Sometimes a Rat is better than a Mouse

Post by FourthWorld » Sat Apr 13, 2019 4:44 pm

richmond62 wrote:
Sat Apr 13, 2019 4:02 pm
Does this device ship with driver software?
No, it doesn't...
Beyond my pay grade. If it doesn't map it's hardware signals to standard keyboard/mouse inputs, and also doesn't provide software to interpret unique signalling, I can't imagine how it works.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Sat Apr 13, 2019 4:47 pm

ControllerMate does pickup buttons 4 & 5 of the Trust wonky mouse.

SteerMouse sorts thing out very simply:

http://plentycom.jp/en/steermouse/

and this is FREE:

https://sensible-side-buttons.archagon.net/

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Sometimes a Rat is better than a Mouse

Post by FourthWorld » Sat Apr 13, 2019 5:58 pm

richmond62 wrote:
Sat Apr 13, 2019 4:47 pm
ControllerMate does pickup buttons 4 & 5 of the Trust wonky mouse.

SteerMouse sorts thing out very simply:

http://plentycom.jp/en/steermouse/

and this is FREE:

https://sensible-side-buttons.archagon.net/
Yes, I would imagine specialized software would be needed to handle specialized input devices. Looks like they've done a fine job with that. Is that what comes bundled with the device?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Sat Apr 13, 2019 6:14 pm

Nothing whatsoever comes bundled with the device and the website is less than helpful. . .

https://www.trust.com/en/product/22885- ... omic-mouse

BUT . . . this is not my point . . . my point has to do with LiveCode's ability
or inability to recognise input from external devices.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9834
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Sometimes a Rat is better than a Mouse

Post by FourthWorld » Sat Apr 13, 2019 6:51 pm

richmond62 wrote:
Sat Apr 13, 2019 6:14 pm
Nothing whatsoever comes bundled with the device and the website is less than helpful. . .

https://www.trust.com/en/product/22885- ... omic-mouse

BUT . . . this is not my point . . . my point has to do with LiveCode's ability
or inability to recognise input from external devices.
The two are related. We've had this conversation enough times that I'm surprised we're still doing it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Sometimes a Rat is better than a Mouse

Post by [-hh] » Sat Apr 13, 2019 7:00 pm

Your mouse has only three OS-Buttons: 1,2,3 as usual.

One more is for switching its resolution from 1000 to 1600 dpi.
And the two thumb buttons are for navigating forward/back in an ordinary browser.

So LC recognizes what it can: mouse buttons 1,2,3 (pressing the scroll wheel is button 3).
shiftLock happens

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Sometimes a Rat is better than a Mouse

Post by richmond62 » Sat Apr 13, 2019 7:03 pm

One more is for switching its resolution from 1000 to 1600 dpi.
And the two thumb buttons are for navigating forward/back in an ordinary browser.
Indeed . . . but as those 3 other buttons don't work on macOS, Linux OR Windows for what
they are supposed to do, I thought it might not be a bad thing to leverage them for something
else.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: Sometimes a Rat is better than a Mouse

Post by [-hh] » Sat Apr 13, 2019 7:20 pm

The dpi switch probably requires real hardware (not a virtual OS) and the browser thumb buttons probably send menu events to the MS Edge engine.
TMHO, LC can pass through only system events it can understand. Everything else will be ignored.
shiftLock happens

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”