Pan mode control via keyboard
    6 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi! I have a problem. If I set command "pan" in the KeypressFcn of a GUI, so that I can use a key to control the pan mode (e.g. "P"). If the pan mode is not on, there is no problem to activate the pan mode. But if I press the key again, then the KeypressFcn will no more be invoked.
If there anyway to let the key alway control Pan on and Pan off?
Thanks
0 Commenti
Risposte (1)
  Walter Roberson
      
      
 il 28 Feb 2012
        Yes, there is, by infiltrating the listener.
2 Commenti
  Walter Roberson
      
      
 il 28 Feb 2012
				You turn on pan, you use the Jedi Mind Trick on the listeners, you install a new key press callback. The new key press callback handles everything the regular callback would but also looks for 'p' and if it finds it then then it removes the trick callback and wakes up the listeners and turns pan off.
Vedere anche
Categorie
				Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

