I'm trying to check whether or not shift is being pressed when a function is run. Something like this (but obviously not this, this is just an example):
func doThisThing() {
if Keyboard.shared.keyBeingPressed(.shift) { // < What I'm trying to figure out
print("Doing this thing.")
} else {
print("You're not holding shift.")
}
}
I tried looking, but all I could find was keyDown/keyUp events, which isn't practical in this case.