I am coding in a vbs page and I need to know when AltGr is pressed. I must use the IE browser only (I am using version 1909).
Here is a sample of code reproducing the issue:
sub document_onkeydown()
MsgBox "key=" & window.event.keyCode
MsgBox "ctrl=" & window.event.ctrlKey
MsgBox "alt=" & window.event.altKey
MsgBox "altLeft=" & window.event.altLeft
end sub
The document_onkeydown sub is called each time I press a key.
My problem is that it is impossible to differentiate AltGr key from Ctrl key.
If I press Ctrl:
window.event.keyCode = 17
window.event.ctrlKey = true
window.event.altKey = false
window.event.altLeft = false
If I press AltGr:
window.event.keyCode = 17
window.event.ctrlKey = true
window.event.altKey = false
window.event.altLeft = false
As you can see, the values are the same. How to differentiate between the two keys pressed?
I could see that window.event.altRight is not recognized so I can't use that.
I am using a FRA CAFR (french Canada) keyboard.