• Joel Martin's avatar
    Touch events and mouse button selectors. · ad3f7624
    Joel Martin authored
    First crack at supporting touch screen for devices like Android and
    iOS tablets. Part of https://github.com/kanaka/noVNC/issues/48.
    
    This change detects touch screen support and uses the touchstart,
    touchmove, touchend events in place of the normal mouse events.
    
    In order to support middle and right mouse clicks, if the device is
    a touch device, then three toggle buttons are added to the UI
    representing the left, middle and right mouse buttons. These select
    which mouse button will be sent when the screen is touched. All the
    buttons can be toggled off, in which case then the touch events only
    move the mouse cursor rather than sending a mouse down and mouse up
    for touchstart and touchend events respectively. This allows fairly
    full control with the mouse on touch screens.
    ad3f7624
util.js 8.31 KB