[webkit-gtk] Kiosk-style mouse

Gavin Lambert gavinl at compacsort.com
Mon Sep 22 21:07:18 PDT 2014


Thanks, after searching around a bit more I found the following, which seems to do the trick:

 

     <html onselectstart="return false" ondragstart="return false">

 

          html { cursor: default; }

 

(Might change it to “cursor: none” later but it’s useful to be able to see where the click occurs for the moment.)

 

Much easier than I was dreading. J

 

From: Dub [mailto:dubcanada at gmail.com] 
Sent: Tuesday, 23 September 2014 13:53
To: Gavin Lambert
Cc: webkit-gtk at lists.webkit.org
Subject: Re: [webkit-gtk] Kiosk-style mouse

 

I'm not 100% sure about all of that. But you can easily turn most of that off with css, and javascript.

 

$('img').on('dragstart', function(event) { event.preventDefault(); });

 

body{

    -webkit-touch-callout: none;

    -webkit-user-select: none;

    -khtml-user-select: none;

    user-select: none;

}

 

Though I'm not sure how up to date WebKit 1 is with CSS3 but the image one would work.

 

On Mon, Sep 22, 2014 at 10:14 PM, Gavin Lambert <gavinl at compacsort.com> wrote:

Is it possible to make WebKit/GTK treat mouse events only in a very limited
way?

I have a kiosk-style application that displays a browser view full screen,
using a bit of JavaScript to periodically update the display.  It's
currently using WebKit/GTK 1.8.1.  (ie. WebKit1; I haven't migrated to
WebKit2 because the multi-process model seems too much of a pain in the neck
for this application.)

Now I'm thinking about adding some interactivity via a touchscreen and some
html <button>s or similar clickable elements.

Is there a way to inhibit most of the "normal" mouse behaviour (dragging
images, highlighting text, etc) and only react to button/link click events?


One hacky idea that occurs to me (if WebKit doesn't have an option for this)
is to not connect the touchscreen as a mouse but instead read the raw input
internally and simulate only clicks and not drags.  Not entirely sure how to
go about doing that yet, which is partly why I'm hoping there's a simpler
option.


_______________________________________________
webkit-gtk mailing list
webkit-gtk at lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-gtk

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20140923/ee42a9f7/attachment.html>


More information about the webkit-gtk mailing list