v-keypress-event

Some people think the keydown and keypress events are the same. Some people think the keypress is a keydown followed by a keyup. They're all WRONG!

The keydown event happens when any key is pressed, while the keypress event only fires for keys that produce character output.

(Hint: Type in some of the boxes. Now try only using the CTRL, CAPS, SHIFT, etc keys.)

v-blur-outside example

		

		<script>
			export default {
				methods: {
					onKeyPressOutside(e, el) {
						console.log("onKeyPressOutside");
						console.log("Event:", e);
						console.log("Element that was typed into:", e.target);
						console.log("Element that just likes to watch:", el);
					}
				}
			}
		</script>