I am experimenting with the shortcut stuff, while trying to improve TAB note
input (see  http://musescore.org/en/node/20357
<http://musescore.org/en/node/20357>  ) and I have strange results.
Case 1
For instance, I have put the following shortcut definitions in actions.cpp:
      Shortcut(         STATE_NORMAL | STATE_NOTE_ENTRY_PITCHED |
STATE_NOTE_ENTRY_DRUM,         0,         "rest",        
QT_TRANSLATE_NOOP("action","Rest"),        
QT_TRANSLATE_NOOP("action","Enter rest"),         quartrest_ICON         ),     
Shortcut(         STATE_NOTE_ENTRY_TAB,         0,         "fret-0",        
QT_TRANSLATE_NOOP("action","Fret 0 (TAB)"),        
QT_TRANSLATE_NOOP("action","Add fret 0 on current string (TAB only)")        
),
and the corresponding shortcuts in shortcuts.xml:
  &lt;SC&gt;    &lt;key&gt;rest&lt;/key&gt;    &lt;seq&gt;0&lt;/seq&gt;   
&lt;/SC&gt;  &lt;SC&gt;    &lt;key&gt;fret-0&lt;/key&gt;   
&lt;seq&gt;0&lt;/seq&gt;    &lt;seq&gt;A&lt;/seq&gt;    &lt;/SC&gt;
and it works correctly: the [0] key inputs a rest in pitched staves and a
"0" fret mark in TAB staves. So far, so good.
Case 2
However, with the following definitions:
      Shortcut(         STATE_NORMAL | STATE_NOTE_ENTRY_PITCHED |
STATE_NOTE_ENTRY_DRUM,         A_CMD,         "pad-note-64",        
QT_TRANSLATE_NOOP("action","64th note"),        
QT_TRANSLATE_NOOP("action","Note duration: 64th"),        
QT_TRANSLATE_NOOP("action","64th note"),          note64_ICON         ),     
Shortcut(         STATE_NOTE_ENTRY_TAB,         0,         "fret-1",        
QT_TRANSLATE_NOOP("action","Fret 1 (TAB)"),        
QT_TRANSLATE_NOOP("action","Add fret 1 on current string (TAB only)")        
),
associated with these shortcuts:
  &lt;SC&gt;    &lt;key&gt;pad-note-64&lt;/key&gt;   
&lt;seq&gt;1&lt;/seq&gt;    &lt;/SC&gt;  &lt;SC&gt;   
&lt;key&gt;fret-1&lt;/key&gt;    &lt;seq&gt;1&lt;/seq&gt;   
&lt;seq&gt;B&lt;/seq&gt;    &lt;/SC&gt;
if I press [1], no action is generated and the application outputs the
following diagnostic message to the console:
"QAction::eventFilter: Ambiguous shortcut overload: 1"
I have tried several changes (removing the double assignments [1] and [B] in
"fret-1" shortcuts, removing the "A_CMD" in "pad-note-64" definitions, and
so on) with no change. The only thing which works is removing the whole
shortcut for "pad-note-64".
Which is the difference between these two cases? What is special with the
definition of "pad-note-64"? Am I overlooking something?
Now I'm stuck; any suggestion is welcome!
Thanks,
Maurizio




--
View this message in context: 
http://dev-list.musescore.org/Help-with-shorcuts-tp7577975.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to