It seems like on windows 7 with chrome, \ == 187 and /  == 55, when I changed above to that it worked perfectly!

There thing called valueAccessor above can be used to access the value of whatever you've bound it to, in this case you've bound it to the path so maybe it would be more stable to check the last char in the path and compare it to '/' and '\' (i.e. no key codes)? Just an idea