Comments (6)
I think a possible answer to this would be to leave the existing code in place that decides which CSS to use, but then add a mousemove listener, and is a mousemove is detected, replace the LINK element that references the tablet CSS with one that references the desktop CSS instead. The force the page to reload.
See https://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript/4819886#4819886 for a full discussion of different approaches and their pros and cons, as well as a code snippet (in one of the answers) that illustrates the mousemove listener. This would mean that on a touch-enabled desktop, the page would still initially load with the mobile look, but as soon as the user moves the mouse across any part of the page, it would switch to the desktop look. Probably not a perfect solution, but in practice, I think it would work pretty well. We'd want to test on both an Android tablet with a mouse as well as a small form-factor PC (I have a Windows 8 RT computer/tablet hybrid) to see if there is any downside when the full site gets scaled down to that size.
from keyman.
Just tried it on my Dell XPS 10 (running Windows 8 RT ) in IE. With or without the keyboard connected, the site displays poorly. The area above the text box is not collapsed to zero height (as it is on my full-size laptop), but nothing displays in it. The on-screen keyboard displays, covering roughly the bottom half of the display, but the globe button doesn't work, and attempting to type using the keyboard produces no visible results.
from keyman.
I think a possible answer to this would be to leave the existing code in place that decides which CSS to use, but then add a mousemove listener, and is a mousemove is detected, replace the LINK element that references the tablet CSS with one that references the desktop CSS instead.
@tombogle Unfortunately, it's not that simple. The touchscreen-oriented OSKs differ greatly from the desktop-oriented OSK, and at present they're explicitly designed for use on phones and tablets. I've investigated the code paths before, and it'd take a lot of work to enable the touchscreen-oriented OSK to work for touchscreen desktop devices. There is far, far more than just the CSS involved, as that area of the system is in considerable need of redesign and/or refactoring for clarity. There are a lot of random JavaScript code snippets throughout the system that trigger "touch vs not touch" code divergences.
from keyman.
Issue by mcdurdin
Wednesday Jun 3, 2015 at 12:37 GMT
Originally opened as KD-165
When running Chrome, IE or Spartan on Windows 10, on a Surface Pro, both keymanweb.com and Keyman Engine for Web are detecting the browser as a touch device, which means we get the touch centric model...
This is not good for running this combination on an external screen, for example.
from keyman.
We've had a rough workaround in place for a while now - touchscreen laptops are set to use the non-touch interface at this time. We have some prepared design work toward a full resolution, but more is needed and the task is low-priority at this time, as it is not part of our target for KMW 10.0.
from keyman.
It's been a long time coming, but as of #5665 we've finally gotten at least one fully-functioning model for using a fully-functional touch-based OSK layout on desktop devices. (with a mouse)
It's (now) actually pretty trivial to flip a couple of switches internally for the following bits:
- enabling either mouse-based and touch-based handlers on a single OSK.
- a few extra tweaks would allow use of both on the same one.
- the new OSK type can easily swap among the active keyboard's defined layouts.
- We'll need additional design work to enable this for standard use, but this gets us close to allowing user selection of the OSK layout.
- So, it'd be possible to choose whichever form a user prefers.
More design work is needed to present these as options to a user and for properly presenting a touch-based OSK to users on a touchscreen laptop - our current touch-OSK model uses up a large proportion of screen space because it expects to be on smaller devices... and to compete with a mobile device's system keyboard. Those differences mean we should probably have something more tailored to touchscreen laptops.
from keyman.
Related Issues (20)
- bug(developer): Keyman Developer Debugger drops '[' at start of a string in `outs()` HOT 2
- bug(windows): When installed a kmp a link to a pdf in the readme.htm file does not display the .pdf. HOT 1
- bug(linux): extra character inserted when typing in Google doc HOT 5
- bug(android): External physical keyboard doesn't type when virtual keyboard hidden HOT 3
- bug: Keyman 'freezes' not responding when installing Shaw QWERTY HOT 1
- chore(android): Migrate 3 CI config steps into publish step HOT 1
- bug(android): "Always show banner" has no effect HOT 1
- bug(web): Keyboard direction does not change from LTR to RTL (Tamil to Arabic) HOT 2
- bug(developer): An error appears on the keyboard web when trying to select the keyboard in offline
- refactor(web): move `common/web/es-bundling` → `web/src/tools/es-bundling` HOT 1
- refactor(web): move `common/web/eslint` → `common/tools/eslint`
- refactor(web): move `common/web/sentry-manager` → `web/src/engine/sentry-manager`
- refactor(web): move `web/src/engine/device-detect/` → `web/src/engine/main/`
- bug(developer): generation of KVK from LDML keyboard seems to be creating an invalid .kvk file HOT 1
- bug(core): test_unicode needs ICU4C 76 with Unicode 16.0.0 HOT 2
- bug(developer): ldml string variables referenced before definition have `'undefined'` string value
- chore(common): build.sh deps could helpfully use `@keymanapp/<name>` package dependencies
- bug(developer): add ldml compiler warning for `<layers formId="us"><layer id="base">` pattern
- feat(android): Add device Settings link to KeymanSettingsActivity
- bug(developer): @keymanapp/developer-utils is not published
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keyman.