9,867 karma · joined Aug 20, 2015 (11y ago) · 5,528 submissions
comment 7y ago · link · parent
A better solution is to use non-modal layout switching, when you have a dedicated key for every layout. On Windows I use left and right Control keys (with a help of a closed-source program), so I always start typing with pressing one of them. But on Linux I cannot use them (I tried to write a program that would listen to /dev/input but found out that you cannot switch layout in Wayland-based Gnome from an external program because there is no API for this).
Super + Space which is used on Macs, is also a poor choice. It is surprising that Apple, which manufactures it own hardware, was unable to just make dedicated keys for different layouts.
comment 7y ago · link · parent
Typically compositor uses libxkbcommon which suffers from the same problems that X server had.
> Remote keyboards are just like physical keyboards. Just configure VNC's keyboard to use the correct layout.
It is inconvenient and I don't think it would work. There is no such thing as "VNC keyboard". VNC client sends keysyms over the wire, so the VNC server has to convert them back to a key number, switch to necessary layout if there are several of them, turn off modifiers like Shift if necessary. This is too complicated. For example, x11vnc server doesn't support non-latin input correctly.
> (BTW I'm not sure I understand what you mean by "Everything is broken")
That many VNC servers cannot handle non-latin input correctly.
> however in Wayland on-screen keyboards _can_ send unicode to the compositor via the standard text-input protocol
This looks like an extension for implementing IME. You can see that there is no key press or key release events. These events are defined in wayland protocol spec [1] and they still use a key number. So you cannot send key press/release events for characters not present in current keyboard layout.
[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-...
comment 7y ago · link · parent
Both X11 and Wayland have poorly designed keyboard events handling (which was defined in XKeyboard spec in 1995). For example, you want to use Ctrl + Shift keys to switch keyboard layouts on release. Simple thing that is working in Windows. You cannot do that in Linux, because:
- if you assign Ctrl + Shift to switch keyboard layout then when these keys are pressed, the event will be consumed and you cannot use combinations like Ctrl + Shift + F (this will be interpreted as Ctrl + F or Shift + F depending on what key you have pressed earlier)
- you cannot make a separate program that would monitor all key presses and releases and switch layout without breaking other programs. In the X server and extensions there is no such feature as "monitoring pressed keys"
The only way to do it reliably is to have a privileged program that would listen to events in /dev/input.
By the way this bug hasn't been fixed for 14 years [1], and instead of fixing it the distributions have been using different hacks and workarounds. Also, they don't warn user that using Ctrl + Shift to switch layout will break hotkeys using these modifiers.
Another issue is remote control programs like VNC. In both X11 and Wayland to emulate user input VNC server muss pass a key number to the X server or Wayland compositor. Not a keysym, not a unicode codepoint, but rather a number of the key on a physical keyboard. Now guess what happens if VNC client's machine has a keyboard layout with characters not present in layout on VNC server's machine? Everything gets broken. Typical solution for this is to find unused key number and patch current keyboard layout before sending a key press event to the X server.
Because of the same reason on-screen keyboards on Linux cannot produce characters not present in keyboard layout. Emoji, for example.
comment 7y ago · link · parent
comment 7y ago · link · parent
[1] https://android.stackexchange.com/questions/115944/how-to-pr...
comment 7y ago · link · parent
I suppose that many Android users might agree to these options without understanding completely what they mean or even without noticing because some of the options are hidden behind spoilers.
Android is an example of a case where you become a product although you have paid for the phone.
comment 7y ago · link · parent
[1] https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1777415
comment 7y ago · link · parent
Also, what if the drone flies into someone's window or a car? How do you identify the owner?
comment 7y ago · link · parent
> If your app lists normal permissions in its manifest (that is, permissions that don't pose much risk to the user's privacy or the device's operation), the system automatically grants those permissions to your app.
But the app could use it to determine user's location (by scanning for WiFI access points identifiers) without any notification. So the user wouldn't realise that the app now knows their location.
You can see it in the docs [3]:
> Android 8.0 and Android 8.1:
> A successful call to WifiManager.getScanResults() requires any one of the following permissions:
> CHANGE_WIFI_STATE
So this issue was fixed only on Android 9, and had been working for years. Any application could secretly determine your location. That's the state of privacy protection on Android. It is difficult to believe that Google developers who are very smart people couldn't foresee it for years.
I googled a little and found a confirmation that this method was working: [4]
[1] https://developer.android.com/reference/android/Manifest.per...
[2] https://developer.android.com/guide/topics/permissions/overv...
[3] https://developer.android.com/guide/topics/connectivity/wifi...
[4] https://blog.trustlook.com/2015/06/02/how-apps-tracking-your...