[Gambas-user] Detecting just Control Key

David Sanromá dsanroma at gmail.com
Thu Oct 25 13:30:38 CEST 2018


Hello everyone,

I am brand new to Gambas and I must say I am loving it.


I do have 2 questions...

* I am trying to use a GridView (Mode = Single) and once I select an 
element, I don't seem to find the way to "Unselect" it via the UI in 
run-time. I tried Ctrl+Click, Alt+Click, Shift.... and so on and no 
dice. Something I should know ?


* I tried to "implement" my own Ctrl+Click to unselect the current row 
and I found an strange behavior which seems inconsistent with the 
documentation.


Public Sub FormatsGridView_KeyPress()

     Print Key.Control

End


It prints False when I just press the Ctrl key by it self. However, it 
prints True when I press Ctrl+A


I tried the code in the documentation 
(http://gambaswiki.org/wiki/comp/gb.qt4/key/control?nl) and same thing. 
Me.Text is always set to False if the only key that is pressed is the 
Control key by itself.


Please forgive my inexperience with Gambas ;)

TIA,

David




More information about the User mailing list