On 10/19/12 5:41 PM, Peter M. Brigham wrote:
For those who
are interested here is my version (slightly altered from yours,
Jacque). They are all control-shift keypresses that work only in the
IDE script editor.

Actually, heavily modified. :) Here's mine for comparison. It uses the command key instead of control key, doesn't include any commenting functions, and still doesn't have your (useful) "type space" addition which I've been meaning to add now for a few years.

on commandKeyDown whichKey
if ("editor field" is not in the name of the target and "script" is not in the name of the target) \
        or the shiftkey is not down
  then pass commandKeyDown
  switch whichKey
    case quote
    case "'"
      put quote & the selection & quote into the selection
      break
    case "v" -- paste only plain text
      put the clipboardData["text"] into the selection
      break
    case "="
    case "+"
      put " -" & "-" & "#"&"#"&"#" into the selection
      break
    case "9"
    case "0"
    case "("
    case ")"
      put "(" & the selection & ")" into the selection
      break
    case "["
    case "]"
    case "{"
    case "}"
      get the selection
      put "[" & it & "]" into the selection
      if it = "" then
        put the selectedchunk into tSel
        put word 4 of tSel into word 2 of tSel
        put (word 4 of tSel) - 1 into word 4 of tSel
        select tSel
      end if
      break
    case " " -- scriptPaint
      put the mousetext into the selection
      break
    default
      pass commandKeyDown
  end switch
end commandKeyDown

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to