[Gambas-user] Re: Crossword program and Ctrl-key

Mikael Ulfenborg mikaelu at ...1188...
Wed Nov 2 08:27:51 CET 2005


On Tuesday 25 October 2005 17:09, Mikael Ulfenborg wrote:

>> Hello all,
>>
>> First an announcement: My first Gambas project is live, gmbcrossword a
>> crossword construction
>> program for swedish type crosswords. You can read more at
>> http://gmbcrossword.sourceforge.net/
>>
>> Then a question:
>> Is it possible to make the Ctrl-keys up/down states work under gambas 1.03
>> ? I've tried with a global variable and key events but the event always
>> reports Ctrl-key down until
>> I press another key on the keyboard (I want to use Ctrl-mouse click).
>

>What do you want to do exactly?
>
>If you want to know if one of the CTRL key were pressed during a keyboard 
>event, then you can read the Key.Control property.

I want to enable "Ctrl-clicking" with the mouse. It is as follows:

1) I have a key down handler reading the state of the Ctrl-key and storing it in a global variable
2) I read this variable in the mouse-down handler

The problem is that the variable always reports Ctrl down if the Ctrl-key was pressed AND/OR released if
I not press another key between the readings or press another key TOGETHER with Ctrl.
If I put a simple debug print in the key handler it reports the key down for both the "press" and "release"
events of the ctrl key. Perhaps this is simply a Ubuntu Breezy problem?

While I'm at it: How do I make/include a nice help file in my applications?

Btw, I must say that Gambas has really taken me by storm! I've used VB and Delphi before (in my dark Windows times,
10 years ago). It is unbelieveable easy to make an app. It took me 2-3 days to learn Gambas and have the first
working version (with printing support!) of gmbCrossword...





More information about the User mailing list