bethesirius / ChosunTruck

Euro Truck Simulator 2 autonomous driving solution
732 stars 104 forks source link

Add Start/Stop #25

Closed zappybiby closed 7 years ago

zappybiby commented 7 years ago

Pause with '+' key and start with '*' using NUMPAD

bethesirius commented 7 years ago

Using hotkeys to pause and start is very nice. But, how about using other keys? Such as 'Insert', 'Delete', 'PgUP', 'PgDn' so on... Because I'm using a tenkeyless keyboard, it's impossible to press NUMPAD keys :(

zappybiby commented 7 years ago

oh, ok. well sure you can edit it for whatever is useful. We could use the '+' or '-' on the normal keyboard.

zappybiby commented 7 years ago

does this work?

while (true) {
        // Press '+' to pause
        if (GetAsyncKeyState(VK_OEM_PLUS) & 0x8000){
            while (true) {
                // Press '-' to start
                if (GetAsyncKeyState(VK_OEM_MINUS) & 0x8000){
                    break;
                }
            }
        }