Hi, I would like to know if it is possible to distinguish between pen and touch input.
By pen, I mean either Surface pen, or Wacom tablet pen, with pressure levels.
What I'd like to do is play around with making simple drawing apps for prototyping some ideas. I'd like to be able to use the pen with pressure levels for drawing, and touch for pinch/zoom/scroll etc. I don't want touch to draw, if I'm holding the Surface tablet and touch it, or if my palm rests against it while I'm holding the pen.
I assume Windows has all the proper events for mouse vs. touch vs. pen. So my question is whether Love exposes those distinctions so I can use them.
If not, would such support be coming soon? Seems like touch and pen are becoming much more prevalent, and that's because they're useful. They can be more useful with better software.
Mouse vs. Touch vs. Pen Input
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Mouse vs. Touch vs. Pen Input
LÖVE doesn't support pen input so that's that. Try your luck with third party libraries, also obviously you'd then have no problem telling if it's pen or mouse input, because you get pen input from a third party lib. As for touch input, there are special touch-related callbacks and functions so you can't miss them. Touch can also emulate left mouse clicks.
Re: Mouse vs. Touch vs. Pen Input
I do need this as well, so I might do some research on a cross-platform way to do it (or multiple non cross-platform ways). I'll share my results here if I ever find something out.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Mouse vs. Touch vs. Pen Input
I'm also interested, but I don't have the hardware to directly test it.
Worth noting, the existing love.touch API supports pressure levels.
Worth noting, the existing love.touch API supports pressure levels.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Mouse vs. Touch vs. Pen Input
The pen manufacturers will probably have separate APIs, or use existing OS specific ones in device-specific manners... probably.
On that note, looks like Wacom is thankfully into sharing information about this, at a first glance anyways:
http://www.wacomeng.com/windows/
http://www.wacomeng.com/mac/index.html
http://www.wacomeng.com/linux/index.html
http://www.wacomeng.com/android/index.html
On that note, looks like Wacom is thankfully into sharing information about this, at a first glance anyways:
http://www.wacomeng.com/windows/
http://www.wacomeng.com/mac/index.html
http://www.wacomeng.com/linux/index.html
http://www.wacomeng.com/android/index.html
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Mouse vs. Touch vs. Pen Input
Yea the core problem with pen input is that unlike mouse or even touch, there is basically no hardware nor software standard for it, so vendors implement their own drivers. You'll have pretty good chances that a Wacom tablet will have drivers for any OS, not so much for anything else. Until that situation changes, you'll not see much support for them. Same reason why force feedback racing wheels are not widely supported in racing games.
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Mouse vs. Touch vs. Pen Input
Isn't HID a standard?
(Page 134 of http://www.usb.org/developers/hidpage/Hut1_12v2.pdf describes an example for Desktop Tablet input device.)
This can still be true regardless of HID existing.raidho36 wrote:so vendors implement their own drivers.
As slime linked above, for windows, two apis exist for tablets on windows, wacom's wintab and windows' RealTimeStylus. For other OS-es, wacom's sites i linked above may hold more (even non-vendor-specific) answers, honestly i haven't read them thoroughly.raidho36 wrote:You'll have pretty good chances that a Wacom tablet will have drivers for any OS, not so much for anything else. Until that situation changes, you'll not see much support for them.
Also, no one needs to care about other vendors; that's how it is with pre-XBOX compatible controllers (see the gamepad api for example).
But all-in-all, i do agree that until SDL implements anything, this could only either be solved with an external library, or maybe FFI, in case it can access the needed APIs.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Who is online
Users browsing this forum: Google [Bot] and 5 guests