Zorin OS Screen freezes when Switch from Laptop keyboard to usb keyboard.
When a key is pressed on laptop keyboard and then pressed on usb keyboard
the Screen freezes for about two seconds.
It happens to any device attached to usb, like a barcode scanner, which is the real problem here.
There is something to try to solve that issue?
I want the screen not to freeze when pressing a key on the keyboard and reading a barcode after that.
Related
I have a convertible laptop for which there isn't great Linux support: the desktop environment is unable to detect when the device is in tablet mode, so the keyboard and touchpad are always active, which makes tablet mode almost useless. I've solved this problem by writing a simple Python script that grabs the keyboard and mouse input devices and proxies events to the system until a specific key sequence is received. At this point, it stops proxying events until the same key sequence is seen again.
The code is effectively a slightly more complex version of this example (which reproduces the problem):
import evdev
import selectors
dev = evdev.InputDevice('/dev/input/event5')
ui = evdev.UInput.from_device(dev)
dev.grab()
selector = selectors.DefaultSelector()
selector.register(dev, selectors.EVENT_READ)
while True:
for key, mask in selector.select(0.1):
dev = key.fileobj
for event in dev.read():
cat = evdev.categorize(event)
print(cat)
ui.write_event(event)
/dev/input/event5 is the touchpad. The system has the following devices:
Available devices:
/dev/input/event0: Lid Switch
/dev/input/event1: Power Button
/dev/input/event2: Sleep Button
/dev/input/event3: Power Button
/dev/input/event4: AT Translated Set 2 keyboard
/dev/input/event5: SynPS/2 Synaptics TouchPad
/dev/input/event6: Wacom HID 5072 Pen
/dev/input/event7: Wacom HID 5072 Finger
/dev/input/event8: HDA Intel PCH Mic
/dev/input/event9: HDA Intel PCH Headphone
/dev/input/event10: HDA Intel PCH HDMI/DP,pcm=3
/dev/input/event11: PC Speaker
/dev/input/event12: ThinkPad Extra Buttons
/dev/input/event13: Integrated Camera: Integrated C
/dev/input/event14: Video Bus
When this code runs, movements and regular click actions work just fine, but a two-fingered click, which normally acts like a right-button click, no longer works. Since this code is just taking events and re-sending them, why is this behavior different? How would I get the two-fingered click to work as expected?
I think what you need is very similar to this, altered of course to your needs
Python_Touchscreen_RightClick.py
if this doesn't work for you you can also try and use Gesture Event from python-libinput
I run Qt Virtual Keyboard example in ubuntu(16.04), it runs just on full screen mode and i can not see text edit when typing with virtual keyboard.
I want virtual keyboard width fit to window size and show under the text edit.
How ?
I use this component for virtual keyboard, it works correctly.
The virtual keyboard in the simulator is not showing when I focus on a text field.
It showed the first time I clicked inside the text field but subsequent clicks in the text field do not bring up the virtual keyboard.
This is happening for the IPhone 6 to iPhone X simulators.
I'm using Visual Studio Mac.
It would appear the simulator detected my Macs keyboard, so it no longer shows the virtual keyboard.
How can I fix this so that the virtual keyboard shows whenever I interact with a control that accepts text input.
Solution
In the top menu bar of the simulator I had to turn "Connect Hardware Keyboard" off.
I got there by going to Hardware -> Keyboard -> Connect Hardware Keyboard
I am running a loop that needs to break if I press left button on a mouse. I have a touchscreen LCD that will display the c++ code I am running, and I want to be able to break the loop if I touch the LCD screen. Thank you
I have some code that moves a UITextView out from under the on-screen keyboard. The problem is, sometimes people will surely use a Bluetooth keyboard instead.
How can I detect that that is what's being used for input?
Also, BTW: I can detect when the on-screen keyboard goes away, but how to approach the same intention when it's a wireless keyboard?
Thanks.
You can detect when a bluetooth keyboard is connected by registering for UIKeyboardWillShowNotification the same way that you did for detecting when the keyboard hides. If a BT keyboard is connected, you will not receive a keyboard will show notification when the text field or text view that is requesting the keyboard becomes the first responder.