App manager should pass to the apps key which was pressed when it was clicked on

Started by ubacher, March 10, 2018, 09:40:26 PM

Previous topic - Next topic

ubacher

If an app, on being invoked, could know if a special key was pressed when it was called up, it would open
up the possibility to modify app behaviour by pressing Shift/Ctrl/Alt while clicking on the app to invoke it.

I asked about this before in this forum and tried requesting the key status from within the app - but this I could not make work.
There seems no working mechanism for this from within the app.

Now I noticed in the documentation that one can pass a string to the app which one invokes.
Thus my request: (this would be a change in the app manager)
If, at the time the app is clicked on, a key is pressed, then pass this information on to the app in the query=
option.


Mario

To implement this, the App Manager needs to be changed, the apps/run endpoint needs to be changed, the internal mechanisms in IMatch which are involved in launching apps and also the apps/info endpoint to communicate the information to the launched app.

The App Manager in an app by itself. When you click on an app it uses the apps/run endpoint to tell IMatch to launch it.
Only the App Manager knows which keys were pressed when the user clicked the app. The actual launch of the app is de-coupled and the user may have let already go of the keys at that time.

The standard mouse event only reliably provides the state of the shift, ctrl and alt keys. On some platforms the meta key, or, for touch devices, additional information about the touch gesture or pressure. The apps/run endpoint would need to take this additional information, the App Manager would need to provide it, and IMatch would have to route and remember this information and then provide it to the app via the apps/info endpoint.

Also, what if an App is launched from within the App Panel or via a Favorite?

This is all doable but I wonder if this would be worth the effort. How often is this really needed? If your app supports different "run modes", why not just ask the user once your app runs?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

Quotethe apps/run endpoint needs to be changed,
No: there is a query= which can be used to pass on the information to the app.
It was reading about this which made me think...

I had a look at the code of the app manager and it looks like just two changes are needed.
onclick="return Show(event)" to be added to '<div id="{id}" class="list-group-item"> ',

and changes to the section starting with
$('.list-group-item').click(function(e) {
to add something like
if (event.ctrlKey) { ......
   pass on a keyid = "ctrlKeywaspressed" .. to the apprun via query=

won't be as easy as I show it here of course....

Its up to the app developer then to look at this info and use it.

This would allow an app to work like favorites where, when Shift is pressed while it is clicked on, it does something different.

Many, if not most of my apps, never display anything. To get a variant behaviour I have to either create another app or to go thru the
extra step of asking the user which behaviour he wants. Where an app provides buttons anyway which the user has to click this is not an issue of course.

I don't know how this would work if initiated via a favorite - but there is already a mechanism to detect if shift was pressed so........

Mario

The Query String could be used. But then of course apps which use the query string for other purposes would fail. Or would need to update their query string processing to ignore the additional parameters. I'm not sure if this would break things because I don#t get feedback from developers about the features they use...

Let's see if there is more than one or two users out there who need such a functionality.
You can always write yourself a small "launcher app" which allows you to run your own apps via a click, and then provide any extra info you need.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ubacher

QuoteBut then of course apps which use the query string for other purposes would fail
But the app reading the query string would look at the string and see if it can understand it i.e. if it is destined
for it.

QuoteYou can always write yourself a small "launcher app"....
That would complicate things. I could modify the launcher of course although I don't know if I understand it well enough.

But running an app using this keypress pass-on from a favorite is out of my hands.

Jingo

Quote from: ubacher on March 11, 2018, 02:04:36 PM

QuoteYou can always write yourself a small "launcher app"....
That would complicate things. I could modify the launcher of course although I don't know if I understand it well enough.


I started to re-write the app manager awhile back to only display thumbnail icons of all the apps in a horizontal manner.. my goal being to have this panel always open but as small as possible.  I was able to get rid of all the data and just show the icons - but I never got as far as making the apps not appear in a vertical list.  Suppose something like this could be accomplished and then a multitude of apps could be displayed with tooltips in a small space. 

If I ever get the time (swamped with book design clients at the moment) - I can revisit this if enough interest!  Enjoy - Andy.

Mario

I have re-designed the App Manager for IMatch 2018 a bit.
There is now an icon/text layout option, much like the apps on your smart phone.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

Quote from: Mario on March 11, 2018, 10:58:39 PM
I have re-designed the App Manager for IMatch 2018 a bit.
There is no an icon/text layout option, much like the apps on your smart phone.

And...  now I can stop tinkering with that...  :P  Looking forward to 2018... Thanks Mario!!!

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Jingo

^^ Yup... that is pretty much what my retool was going to look like.. the final step was to get the vertical icons into a grid like you did.... oh well... glad to see an official version of it!

Mario

The App Manager was the first app ever I wrote for IMatch. Due time for an overhaul.
All new apps also use Bootstrap 4 now, and FontAwesome 5.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on March 12, 2018, 07:43:22 PM
This is how the prototype looks (pretty much final):



Cool. I like the IMatch Coach. ;D
BTW, you use also nice icons. Maybe the wizard is a bit unclear, specialy if it is displayed smaller, in contrary for example to the App Spy, what looks clear and nice.

I wonder where the path with IMatch still goes. The program is getting better and better and the possibilities more diverse.  ;D :D
Best wishes from Switzerland! :-)
Markus

Mario

The IMatch Coach is not generally available, sorry. It's an app for some commercial clients. Maybe I do something similar later for all users.

I draw all icons in Affinity Designer.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook