View unanswered posts | View active topics



Reply to topic  [ 7 posts ] 
Key-press detection 
Author Message
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 47
Location: Switzerland
Hi Devs

I've stucked in development of my next plugin. I need an information about any key-press to hide my extended non-string tooltip. Unfortunately it seems that all key-events geht handled in UITools-Class. Is this correct? How may I then get an information about the key-presses (not only inputs which I can catch with the OnChar-Event)?

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Fri Mar 04, 2011 7:59 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11695
Location: Paris, France
It's a difficult thing to code.

You can look into PluginCore.Controls.UITools to see how it hides the tooltips.

It might be worth exposing a simple event for that (in UITools) to make it easier.


Fri Mar 04, 2011 11:28 pm
Profile WWW
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 47
Location: Switzerland
Philippe wrote:
It's a difficult thing to code.

You can look into PluginCore.Controls.UITools to see how it hides the tooltips.


Actually I've managed quite all the other cases in which the tooltip should get hidden (except a normal key-press).

Philippe wrote:
It might be worth exposing a simple event for that (in UITools) to make it easier.


Do you think about a forwarding/spreading the key-event or an HideToolTip-event? Alternatively you could offer the option to pass the Tooltip that is displayed (in fact I don't have any text in my Tooltip, that's why I had to write a custom one. Although it's a bit difficult because I'm handlig the different events a little else)?

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Mon Mar 07, 2011 11:44 am
Profile
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 47
Location: Switzerland
Any progress on this issue?

Shall I propose a patch for the key-event and/or the passing of a custom tooltip?

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Wed Mar 09, 2011 11:06 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11695
Location: Paris, France
Didn't have too much time to look into that - if you figure something you can definitely provide a patch.


Wed Mar 09, 2011 11:26 am
Profile WWW
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 47
Location: Switzerland
Hi!

After FD4 being released and finding some spare time, I'm getting back on topic. Altough I managed to get input- and deletion-keystrokes, I'm still not able to catch "control"-keys (especially "arrow down/up/left/right"). It seems to be last missing piece of the puzzle. Without having studied the archtecture of FD4 too deeply - is there a possibility to get to be informed when one of the arrow-keys (and/or other control-key such as "end", etc.) is pressed?

Or would it alternatively be possible to get informed when the position of the cursor in the actual document changes?

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Fri Oct 28, 2011 12:15 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11695
Location: Paris, France
Currently most plugins use the Event.UIRefresh to check the cursor position and update their context accordingly.


Fri Oct 28, 2011 8:02 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.