altKey switch not working DP8 in IDE

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

Post Reply
newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

altKey switch not working DP8 in IDE

Post by newpie » Thu Mar 24, 2016 5:38 pm

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
Last edited by newpie on Fri Mar 25, 2016 2:56 am, edited 1 time in total.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: altKey switch not working DP8 in IDE

Post by [-hh] » Thu Mar 24, 2016 8:49 pm

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
shiftLock happens

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: altKey switch not working DP8 in IDE

Post by newpie » Fri Mar 25, 2016 4:55 pm

Ok, I will try this out when I get a chance and let you know.

Thanks for the help.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: altKey switch not working DP8 in IDE

Post by FourthWorld » Fri Mar 25, 2016 5:07 pm

Does the optionKey synonym work?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: altKey switch not working DP8 in IDE

Post by newpie » Wed Mar 30, 2016 2:55 am

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

Post Reply