Electron enable touch events for a touch screen - electron

I have a Raspberry Pi connected to touchscreen and running an electron app on it through the startx command,
# startx ./electron-app -- --nocursor
the problem that I can't handle the touch events like (touchstart, touchend) and apparently that is because Electron (or chromium) not seeing the screen as a touch screen.

The problem is not that Electron/Blink isn't seeing the touchscreen / native touch events. There are two parts to the problem, as I understand it:
You need to ensure you're receiving touch events in the OS from the touchscreen. I haven't tested with Pi/Linux, so I'm not sure if those handle touch events natively. I know that OSX, for one, requires a third-party driver like [UDPP by Touch-Base.
Once the OS is handling touch events, those are piped through to Blink via the Electron wrapper. However, you need to set the touch-events command-line switch to enable it. My understanding is that that switch is passed through as a Chromium commandline switch.
I found more info on this thread, though not very much, and still haven't gotten things working on my OSX setup. Electron's documentation is very sparse...the touch-events switch isn't even listed in their CLI docs. Hope this helps.

Related

How do i disable the Windows 11 Touch (NOT Trackpad) gestures without disabling getting Touchinputs?

I have the problem with my Application on windows, that takes Wintouch as input and when i use more then two fingers, windows start to make a dropdown (like pressing win + d) and minimisses the window.
I want to disable this without loosing touch completely.
i thought something like Edge-UI could be this, but i dont fine it on win11.
OS Name Microsoft Windows 11 Home the newest Version 10.0.22621 Build 22621.
Mit freundlichen Grüßen,
John L.
I tryed to find the edge-UI without any succsess
I found a solution to the problem.
win11 seems to do it all over the settings menu and i found it on:
settings > bluetooth & devices > touch > three- and four finger touch gestures -> disable
This fixed the issue that windows-11 minimises multitouch applications!
mfg.

Is there a way to get nomachine to better show the caret in terminal?

Host machine: Debian 10 running NoMachine 7.2.3
Settings:
Specified H264
User Hardware Encoding enabled
Use Specific Frame Rate enabled (60FPS)
Use Acceleration enabled
Client: Windows 10 running NoMachine 7.2.3
Both machines have monitors attached.
Using NX protocol for connection.
FullScreen / Scale to Window / Desktop is currently 2560x1440 (reduced from native while testing this issue)
Specific issue:
I do a ton of work in the terminal and when viewing desktop via nomachine, the terminal caret is randomly not visible. The same issue is less noticeable with right click menus and other areas of "visual updates in small screen space." If this were another remote desktop vendor I would try to find the "don't update just regions" setting to force the entire display to update regularly, but I can't find similar settings for nomachine. I have a dedicated gigabit connection between the two machines with no other traffic on that line, so bandwidth is not an issue.
To recreate:
I disabled caret blink (using universal access / accessibility settings) so the caret is a solid block in terminal / vi. If I edit a text file in vi and move up and down, the caret will only update visually every other line or so (verified on the physical screen it is moving correctly). Same if I highlight or insert, etc. You inevitably miss a character or so or lose your place).
I have tried changing speed vs quality slider, resolutions, swapping from h264 to VP8, etc.
I have disabled:
multi-pass display encoding
frame buffering on decoding
client side image post-processing
Nothing seems to change this specific issue. Yes I can make dragging a quarter-screen-sized terminal window smoother, but that doesn't help me follow the caret in vi/vim. Both machines are nicely spec'd (client has 16G / RTX2080, server has 32G / GTX1080)
Is there a way to get nomachine to update all the screen all the time, or at least better refresh small areas like a terminal caret?
(OP): Based on a night of troubleshooting, the issue seemed to be either:
An issue with the Debian install of the nvidia drivers
The server machine is a laptop with a broken main screen (but with an HDMI external monitor plugged in). The Debian X-server may have been confused as to whether it was headless or not and caused issues with nomachine (which tries to detect headless and start a virtual session).
The solution to this exact problem would be to disable the GUI and force a virtual session, per https://www.nomachine.com/AR03P00973 (dummy dongles won't work because the laptop's main display is not a standard plug).
In my specific case, I needed GUI access on the server at times so I couldn't use the above methods, and I could not remedy the problem with Debian, so I wiped the system and installed Ubuntu 20.04, which is more forgiving with graphics drivers and monitors. After setting up the Ubuntu system as similarly as possible to the Debian system and letting the proprietary nvidia drivers auto install, nomachine connected at the same resolution and worked perfectly, without the lag in small screen areas.

Tray is not built on Electron (Windows)

We face an Issue with the Creation of a "Tray" (and very often, also JumpLists/UserTaks) on Windows with Electron 6-9 and Windows Version 1809.
Basically, they are not created at all automatically. The App triggers a Command to build the Tray/Tasks, but this seems to be ignored (or at least, there is no Error shown), the result is even "ok". But - Windows does not show the Tray / the JumpLists/UserTasks.
Nevertheless, if I open Dev Tools and trigger the Command manually, the Tray immediately appears. In 100% of all Cases on all Windows Versions, we could test on.
We also tried to delay the automatic Creation of the Tray by 5-30 Seconds, but this does not seem to help.
So basically, the main Window triggers an Event, which is sent via ContextBridge (Electron 9) and ipcRenderer.invoke() to ipcMain. This works fine and should not be an Issue - all other Commands work perfectly fine too and the Command is executed.
ipcMain.handle('ipc-cmd',async(event,params)=>{... initTray();}
The initTray Function:
let tray=new Tray(path.join(__dirname,'assets/icon.ico'));
let trayMenu=Menu.buildFromTemplate([...]);
tray.setTooltip(...);
tray.setContextMenu(trayMenu);
tray.on('click',()=>{
win.isVisible()?win.hide():win.show();
});
This should not be any Issue, as its basically standard.
Are there any Circumstances, that can "block" the Creation of the Tray? Is there any Kind of Timing Issue or Reasons, why Windows wont show it? The Creation of the Dock (on MacOS, same Principle) always works fine.
Thanks.

Jmyron and Windows 8

I am running into hardware issues that perhaps someone here knows a workaround. I am using a PC and windows.
For several years I have been making interactive installations using video tracking: the Jmyron library in Processing, which has functioned marvelously for me. I use this set up: cctv type microcameras to a multiplexer, the I digitize this signal via a firewire cable to a pci card. Then Processing reads these quads (sometimes more) as a single window, and it has always worked (from windows xp all the way to 7). Then comes windows 8: Processing seems to prefer the built-in webcam to the firewire bus. On previous version of windows, the firewire bus would naturally override the webcam, provided I had first opened a video capture in Windows Maker, and then shut it down before running the Processing sketch. In Windows 7, which had no native video capture software, I used this great open source video editor called Capture Flux. The webcam never interfered. With Windows 8, no matter what I try, Processing defaults to the webcam, which for my purposes is useless. I have an exhibition coming up real soon, and there is no way I am going to have the time to rewrite all that code for Open CV or other newer libraries.
I am curious if anyone has had similar problems, found a work around? Is there a way of disabling the webcam in Windows 8 (temporarily of course, because I need it to be operational for other applications), or some other solution?
Thank you!
Try this:
type "windows icon+x" choose device manager (or use run/command line: "mmc devmgmt.msc")
look for imaganing devices, find your integrated webcamera
right click on it and choose disable - now processing should skip the device.
Repeat the steps to reenable the device.
Other solution would be using commands in processing:
println (Capture.list()); (google it on processing.org) this way you will get all avaliable devices and you can choose the particular one based on its name.
Hope this helps.

Usin Griffin Powermate in Dart

I know this sounds weird, but I am making a program in Dart in browser that takes input from the Griffin Powermate USB know controller. So far, I have been using the included drivers and mapped a click on the knob to a click on the mouse. Now I have run into a problem with this: The default drivers send both "buttonDown" and "buttonUp" events at the time of release, and nothing at the time when I would expect "buttonDown"-events.
I assume I will have to ignore the drivers and dive into the details. So I have the following questions:
Is there a magical driver replacement(preferably for OSX, but I can install another OS) that fixes the problem immediately?
Is there a way to access generic USB HID devices in Dart? (like 'node-hid' for node.js)

Resources