fix path issue with content script match
use keypress for better compatibility