Old 10-15-2018, 09:37 AM   #1
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 513
Default gfx.getchar() - Bugs (FIXED)

I've found some issues with gfx.getchar.

When hitting F10, it will return the code twice, unlike all other keys, where it returns the code once, waits a moment before returning the second keystroke.
The following code reproduces it on Reaper 5.941 and Reaper 5.96 sucessfully.

I'm using Windows 7Pro, with a naked Reaper 5.96 and SWS installed.

Code:
gfx.init()
function main()
  A=gfx.getchar()
  if A>=1 then reaper.ShowConsoleMsg(A.."\n") end
  if A~=-1 then reaper.defer(main) end
end

main()

There's also an issue with the Euro-currency symbol €
This returns two codes, 261 and 128. Is this intentional? Are there other characters that can be returned that way?
__________________
Reaper Fun Fact of the week: Font in the IDE is too small?
Change Config-variable edit_fontsize or the reaper.ini entry [REAPER]->edit_fontsize to the fontsize you need.
mespotine is offline   Reply With Quote
Old 10-15-2018, 09:51 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,556
Default

Looking into this. For the euro symbol, what keyboard layout are you using?
Justin is online now   Reply With Quote
Old 10-15-2018, 10:15 AM   #3
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 513
Default

German(Germany) layout.

Oh, it can't be typed into the IDE neither, so I need to read it from the outside to show it in drawstr-functions currently...
__________________
Reaper Fun Fact of the week: Font in the IDE is too small?
Change Config-variable edit_fontsize or the reaper.ini entry [REAPER]->edit_fontsize to the fontsize you need.
mespotine is offline   Reply With Quote
Old 10-15-2018, 10:36 AM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 11,556
Default

Thanks. The F10 issue was an easy fix, the euro key, a lot more difficult, haven't figured it out yet (alt-gr handling on Windows is a mystery to me at the moment ... Oddly other alt-gr combinations seem to work here, hmph.
Justin is online now   Reply With Quote
Old 10-15-2018, 10:44 AM   #5
mespotine
Human being with feelings
 
mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig, Germany
Posts: 513
Default

I hope, you can get this working at some point

BTW, is there any limitation in gfx-functions in regards of codepages? Or can I use UTF8, UTF16 and so on without a problem(with setting an appropriate font first)?
__________________
Reaper Fun Fact of the week: Font in the IDE is too small?
Change Config-variable edit_fontsize or the reaper.ini entry [REAPER]->edit_fontsize to the fontsize you need.
mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.