I have just went through this swamphole of a problem the last few days, as TextEdit, and LineEdit nodes handled all keyinput with modifiers, but their RECT sizes were limiting and not as freely editable as Label's.
Here's what I've used so far
var caps_enabled
func _input(event):
if event is InputEventKey and event.pressed:
if event.scancode == KEY_CAPSLOCK:
if caps_enabled == false:
caps_enabled = true
else:
caps_enabled = false
match event.scancode:
KEY_A:
if event.shift or caps_enabled == true:
myLabel.text = "A"
return
else:
myLabel.text = "a"
return
So godot doesn't handle capsLock enabled // disabled yet (check out this github proposal and thumbs it up so it can gain some developer attention), therefore you need to create a variable that can handle the capslock input scancode - which also means that if it's already enabled when the game starts, it will be backwards the entire time.
I couldn't get the code for SHIFT + CAPS_ENABLED to set text to "a" , so i'm just skipping that headache.
Also note, this code is just for the letter A, and will need to be repeated for the entire alphabet, numbers, and then I'm thinking of adding modifiers for ALT codes as well -_-
Anyways, hope this helps.
07