This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Simon and set of scenarios

Tags: None
(comma "," separated)
kgolubev
Registered Member
Posts
33
Karma
0

Simon and set of scenarios

Thu Feb 07, 2013 11:36 am
Two questions:
I created scenario, I call it "Main_scenario" and set of subscenarios - "windows", "multimedia", "files","volume", "firefox" etc.
Every subscenario is turning on only by a special keyword from main scenario. To disactivate scenario I used "File" context and command (I followed bedahrs advice here - viewtopic.php?f=216&t=109853#p258092)
So, Simon shows that all scenarios disabled, only "firefox" is active. But if I say command from "window" or "volume" scenario (which are inactive) - Simon still reacts to this command.

Another question:
Can I use same word for commands in different subscenarios?
I have set scenario "Multimedia" with two subscenarios for players "VLC" - which is enabled only if VLC player is active window, and "Amarok" - only active if active window is Amarok.
Every subscenario has commands: Play, Pause, Stop, Next, Previous - with own keyboard shortcuts for his player.
When I open player window, simon shows that needed scenario activated, when I say command "Play" in player - Simon reacts, shows the command, but player doesn't start playing. Same with every command for players I say (keyboard shortcuts are right)
bedahr
Moderator
Posts
141
Karma
0
OS

Re: Simon and set of scenarios

Thu Feb 07, 2013 6:10 pm
kgolubev wrote:So, Simon shows that all scenarios disabled, only "firefox" is active. But if I say command from "window" or "volume" scenario (which are inactive) - Simon still reacts to this command.

In Simon 0.4.0 deactivating a scenario will remove it's vocabulary from the active vocabulary. It will, however, not disable the commands. In other words: If another scenario provides the same vocabulary / grammar, then the matching command in a deactivated scenario will still get activated.

But yeah, blocking commands from deactivated scenarios from executing would of course be a good idea (I kinda forgot about it as I never had multiple scenarios with overlapping vocabulary during testing). Please open a feature request on the bug tracker.

I think this actually answers all your questions as I'm assuming that's also the problem with the seemingly broken commands (probably those are different commands with the same trigger from another scenario). If that's not the case, please let me know.

Best regards,
Peter
kgolubev
Registered Member
Posts
33
Karma
0

Re: Simon and set of scenarios

Thu Feb 07, 2013 10:04 pm
Yes, my multimedia scenarios commands overlapping, that's why I had to create two scenarios. I fixed them now - I placed vocabulary in multimedia scenario and commands in VLC and Amarok subscenarios, now they work almost as I expected :) only spacebar shortcut for play/pause doesn't want to trigger (why?)

About inactive scenarios:
Window, Volume, Firefox scenarios have different command sets, they do not overlap. But still they work even when scenario is inactive.
Can it be because inactive subscenario command inherits active main scenario state somehow?
bedahr
Moderator
Posts
141
Karma
0
OS

Re: Simon and set of scenarios

Fri Feb 08, 2013 9:10 am
Hi,

kgolubev wrote:Yes, my multimedia scenarios commands overlapping, that's why I had to create two scenarios. I fixed them now - I placed vocabulary in multimedia scenario and commands in VLC and Amarok subscenarios, now they work almost as I expected :)

Good!

kgolubev wrote:only spacebar shortcut for play/pause doesn't want to trigger (why?)

I'm not aware of any problem there.

kgolubev wrote:Window, Volume, Firefox scenarios have different command sets, they do not overlap. But still they work even when scenario is inactive

Please clarify "work". It would also be helpful if you could describe your scenarios more clearly (which scenario contains which words, grammar and commands).

kgolubev wrote:Can it be because inactive subscenario command inherits active main scenario state somehow?

Probably not. Active constraints cascade down the hierarchy but not inactive ones. If your parent scenario is inactive, the child scenario will be inactive but if your parent scenario is active, your child scenario might still be inactive.

Best regards,
Peter


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell