OpenBVE Connection

OpenBVE, OMSI & Trainz => OpenBVE Support Board => Topic started by: linuxtardis on August 17, 2015, 06:39:16 AM

Title: OpenBVE & SDL 2 - scancodes vs keycodes
Post by: linuxtardis on August 17, 2015, 06:39:16 AM
Hi everyone, I am porting OpenBVE to SDL2 (for input & windowing) and OpenTK (for OpenGL/AL binding) and I hit a problem - is it better for this program to use scancodes (physical keys) or keycodes (mapped keys according to keyboard layout)?
If anyone is interested, here's (slightly outdated) github repo: https://github.com/JakubVanek/openbve (https://github.com/JakubVanek/openbve), but beware, a lot of things isn't working yet.
Thanks
EDIT: one more question for previous OpenBVE devs: why are there logical operators often used instead of conditional ones in ifs?
Title: Re: OpenBVE & SDL 2 - scancodes vs keycodes
Post by: coneyislandDFNQ on August 17, 2015, 12:06:01 PM
Hey,

Some of these technical questions some of us don't understand. I believe on the OpenBVE main site ran by user odakyufan can explain alot more.

The mapped keys I guess were easier to code in than other methods. Hopefully in the future the program use more of the computer graphics resources rather the program within itself.