View Single Post
Old 02-25-2017, 08:42 PM   #1
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default API: gfx.getchar giving an incorrect value (FIXED)

A few people are having issues with their choice of keybind for my Radial Menu script: http://forum.cockos.com/showthread.php?t=186637

Specific to this thread, it won't work properly when bound to function keys. After some poking I found that gfx.getchar() will tell you that F1 is being held down (returns 26161), but gfx.getchar(26161) insists it's not. This breaks my script because I'm using gfx.getchar to check that the key is still down on every loop.

Test script here: https://dl.dropboxusercontent.com/u/...F1%20issue.lua

Install it, run it, hold down F1 and you should see that the message "F1?" is always false. (Esc will quit)

Cheers.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate

Last edited by Lokasenna; 03-01-2017 at 07:00 PM.
Lokasenna is offline   Reply With Quote