Skip to content

modifier+key action shows also key action as pressed #18793

@AlexHolly

Description

@AlexHolly

Godot Master
https://godotengine.org/qa/28199/how-to-use-shortcuts-with-modifier

I am looking for something like this I thought godot checks this internally. Try to press CONTROL+S.

Expected result CONTROL_S

func _process(event):
    if Input.is_action_just_pressed("CONTROL_S"): # KEY_CONTROL+KEY_S
        print("CONTROL_S")

    if Input.is_action_just_pressed("S"): # KEY_S
        print("S")

# Output: CONTROL_S and S

This works but I can't use it in my case

func _process(delta):
    if Input.is_action_just_released("CONTROL_S"): # KEY_CONTROL+KEY_S
        print("CONTROL_S")

    if Input.is_action_just_released("S") && !Input.is_action_just_released("CONTROL_S"): # KEY_S
        print("S")

# Output: CONTROL_S

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions