Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[solved] Escape key activates Cancel button



  • Please log in to reply
2 replies to this topic
mikek
  • Members
  • 161 posts
  • Last active: Nov 09 2015 05:02 PM
  • Joined: 21 Nov 2008
Hi all, I would like a gui Cancel button to work when the escape key is pressed. (Similar to how the Enter key activates the default button.) Any suggestions would be appreciated. Thank you very much.

- Mike

Morpheus
  • Members
  • 475 posts
  • Last active: Oct 21 2014 11:08 AM
  • Joined: 31 Jul 2008
✓  Best Answer
GuiEscape:

ButtonGuiCancel:

{

  Do whatever

}

Return


mikek
  • Members
  • 161 posts
  • Last active: Nov 09 2015 05:02 PM
  • Joined: 21 Nov 2008
Perfect! Thank you very much, Morpheus.

- Mike