Re: Context aware keymapping + macro

2023-05-05 Thread Tim de Vries

Sure, modify the code to suit.

Tim

On 2023-05-05 12:43 p.m., Mitch Claborn wrote:
Is it possible to have a macro that is invoked via a key mapping to 
operate differently depending on the contexts in which it is invoked 
(e.g. editing Java vs editing HTML)? Or to have that key mapping 
invoke a different macro based on the context? If so, how?


Example:
When editing a Java file Ctrl+Shift+D inserts "hello Java"
When editing an HTML file Ctrl+Shift+D inserts "hello HTML"



-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Context aware keymapping + macro

2023-05-05 Thread Mitch Claborn
Is it possible to have a macro that is invoked via a key mapping to 
operate differently depending on the contexts in which it is invoked 
(e.g. editing Java vs editing HTML)? Or to have that key mapping invoke 
a different macro based on the context? If so, how?


Example:
When editing a Java file Ctrl+Shift+D inserts "hello Java"
When editing an HTML file Ctrl+Shift+D inserts "hello HTML"

--
Mitch

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Context aware keymapping + macro

2023-03-03 Thread Mitch Claborn
Is it possible to have a macro that is invoked via a key mapping to 
operate differently depending on the contexts in which it is invoked 
(e.g. editing Java vs editing HTML)? Or to have that key mapping invoke 
a different macro based on the context? If so, how?


Example:
When editing a Java file Ctrl+Shift+D inserts "hello Java"
When editing an HTML file Ctrl+Shift+D inserts "hello HTML"

--
Mitch

-
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists