Determine proper "unicode" key code

If you press various combinations of keys (with key modifiers such as SHIFT, Ctrl, Option and CMD)
macOS returns various “unicode values”

For example, Pressing “A”
return 97
Shift returns 65
Ctrl returns 1
Alt return 229 ( å )

so basically there could be up to 4 different unicode values returned for any keyboard key.
actually it is up to 15 combinations (some of which may or may not be valid)

What I need is to create a function the will return the value, WITHOUT using the keyboard

something like

x = getKey("A",false,false,false,false ) // return 97
x = getKey("A",true,false,false,false ) // return 65
x = getKey("A",false,true,false,false ) // return1
x = getKey("A",false,false,true,false ) // return 229