I have an event listener in Javascript, I can tell whether a key event is Ctrl (e.keyCode == 17), but how can I know this Ctrl comes from the right one or left
I don't know if it was available when this was asked, but you can distinguish left- from right-ctrl, as well as alt and shift. You can now use the KeyboardEvent.DOM_KEY_LOCATION_* properties to make this distinction.
See Can javascript tell the difference between left and right shift key?
Be aware though, I discovered that Chrome appears to have a defect in its implementation. See How can I distinguish left- and right- shift, ctrl, and alt keys onkeyup in Chrome with Javascript