Skip to content

Key callback argument 'repeat' is true on keyUp-event #485

@qristofer

Description

@qristofer

On at least win32,
when pressed is false, repeat is (sometimes, if not always) true.

void keyfunc(RGFW_window* win, RGFW_key key, RGFW_keymod keyMod, RGFW_bool repeat, RGFW_bool pressed) {

    if( repeat ) // intention to ignore key repeats ends up ignoring key-releases too
        return;

    if( pressed ){

        if( key == RGFW_space ) {
            start_charging_plasma_pistol();
        }

    }else{

        //DEAD CODE

        if( key == RGFW_space ){
            fire_plasma_pistol();
        }

    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions