sc-controller icon indicating copy to clipboard operation
sc-controller copied to clipboard

OSK keyboard hide inactive keys and/or transparency

Open pattontim opened this issue 2 years ago • 2 comments

When the keyboard is activated it takes up valuable real-estate. One working solution may be a mode which make parts, or the whole of, the keyboard transparent during operation. For example, rendering only the area surrounding the current location of the thumbs or making the whole keyboard translucent except the active key.

Screenshot from 2021-12-29 23-08-38

Has the advantage that you don't need to move the keyboard to work with text, you can just move your thumbs.

pattontim avatar Dec 29 '21 14:12 pattontim

In theory, this is only question of configuring colors of those buttons to include transparency. But I'm not sure how would it draw - at least on Linux without compositing window manager, buttons would be transparent and you'd see black background color of the window throught them.

kozec avatar Jan 10 '22 13:01 kozec

@kozec

I don't quite understand the details and the implications for operation across different distributions, but if I add the line

204 Gtk.Window.set_opacity(self, 0.5) to scc/osd/__init__.py

I get working transparency on Linux. My understanding is that it will use the compositing manager if available to introduce transparency.

https://lazka.github.io/pgi-docs/Gtk-3.0/classes/Window.html#Gtk.Window.set_opacity Screenshot from 2022-02-02 20-26-29

It needs to be called after show()

If I invert the colour scheme I should get effective transparency

pattontim avatar Feb 02 '22 11:02 pattontim