HP Forums
Swap View/Copy, Menu/Paste functions? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Swap View/Copy, Menu/Paste functions? (/thread-6691.html)



Swap View/Copy, Menu/Paste functions? - TravisE - 08-16-2016 07:47 AM

Is it possible for the user keyboard function to swap the positions of View/Copy, and Menu/Paste, so that the Copy/Paste functions are easier to access?

I read that returning a number from the key definition would result in the associated key being executed, but I can't seem to do much with it. It appears that this only works for the user-defined keys themselves (so that trying to swap two keys only results in the system hanging in an infinite loop from which even the On key does not reliably exit), and seemingly only the unshifted ones at that.

Is there anything I'm missing? The user guide documentation on this feature isn't all that thorough.


RE: Swap View/Copy, Menu/Paste functions? - Fortin - 08-17-2016 12:04 PM

I've solved a similar problem for a slightly different purpose, but my solution won't help your specific case. ISKEYDOWN() can help you determine if the press is physical or not. Also keeping a persistent local variable as a flag to indicate that the system is acting on the return from the previous user key call instead of an actual key press (even though the key may currently still be pressed) can help. If I recall correctly, the keycode+51 is the shifted key code (9+51).