Page 1 of 1

altKey switch not working DP8 in IDE

Posted: Thu Mar 24, 2016 5:38 pm
by newpie
Hello, I am attempting to convert my code to livecode 8. I currently have dp16 on Windows 7.

The issue I am receiving is that I can't get this to trigger like it did in livecode 7 in the IDE. Anyone have any ideas, is this a bug? Perhaps this needs to be done a different method in livecode 8.

Thanks

Code: Select all

on rawKeyDown theKeyNumber
   switch (theKeyNumber)
      case 111 -- o
         if the altKey is down then
            handler1
            break
         end if
      case 119 -- w
         if the altKey is down then
            handler2
            pass rawKeyDown
            break
         end if
   end switch
   pass rawKeyDown
end rawKeyDown

Re: altKey switch not working DP8 in IDE

Posted: Thu Mar 24, 2016 8:49 pm
by [-hh]
Perhaps you could try with a new field, both on LC 7 and LC 8,
so that you can see what's your keyboard mapping and differences between LC 7 and LC 8?

Code: Select all

-- field's script
on rawKeyDown k
  put k && the altkey
  focus on me -- move focus back from msg
end rawKeyDown

Re: altKey switch not working DP8 in IDE

Posted: Fri Mar 25, 2016 4:55 pm
by newpie
Ok, I will try this out when I get a chance and let you know.

Thanks for the help.

Re: altKey switch not working DP8 in IDE

Posted: Fri Mar 25, 2016 5:07 pm
by FourthWorld
Does the optionKey synonym work?

Re: altKey switch not working DP8 in IDE

Posted: Wed Mar 30, 2016 2:55 am
by newpie
Hello, I had a chance to do some test. I wanted to mention I am using a barcode scanner in this scenario which I think plays a role.

From what I can tell LiveCode 7 can process it fast enough with the code below, but livecode 8 it does not. The code that -hh gave gives me the same end result except I do notice livecode 8 processes the scan (ALT+O) slower which would explain why I am having an issue with it.k

I am assuming this is not planned. Any ideas on how I can use Livecode 8 as I need this functionality to work.

Thanks