jsampson Posted December 6, 2009 Report Share Posted December 6, 2009 Hello - I see that alphabetic keys can be remapped, but is there any way of remapping the escape key so that it does not function? I would like the function of the escape key in a particular program to be served by another key combination instead. Regards _John Sampson_ Quote Link to comment Share on other sites More sharing options...
paul Posted December 6, 2009 Report Share Posted December 6, 2009 The Escape key is available as a hotkey for activating a macro in exactly the same way as any alphabetical key. If you want to control this in an already running macro, then use code like this: Wait for Key Press: ESC -- wait for up to 10 seconds On Error Catch Error: The condition was not met within the specified amount of time Variable Set Bool bError to "True" End Catch Error End Error If Variable %bError% Equals "false" -- Esc key was pressed within 10 seconds Text Box Display: Else -- Esc key was not pressed within 10 seconds Text Box Display: End If <WAIT FOR KEY PRESS Key="ESC" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="10" _HANDLE="0x0014"/> <ON ERROR/> <CATCH ERROR Code="20"/> <VARIABLE SET BOOL Destination="bError" Command="263" Value="TRUE"/> <END CATCH ERROR/> <END ERROR/> <IF VARIABLE Variable="%bError%" Condition="\x00" Value="false" IgnoreCase="FALSE"/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang3081{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Esc key was pressed\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="2" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <ELSE/> <TEXT BOX DISPLAY Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang3081{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs16 Esc key was not pressed\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="2" OnTop="FALSE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <END IF/> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.