Problem: I would like to give an area a keyboard shortcut like so:
Qt Code:
  1. import Qt 4.7
  2. Rectangle{
  3. width: 50; height: 50; color: "red"
  4. focus: true
  5. Keys.onPressed: { if ( event.key == Qt.Key_A) keyEffect() }
  6. function keyEffect() {color = "blue"}
  7. }
To copy to clipboard, switch view to plain text mode 

I plan on using this type of element in a number of places (some in Columns/Rows/Grids, some in ListViews, etc. with different keyboard shortcuts each). However, when I try this only the last one instantiated ever gets checked since it takes away the focus from the others.

Question: How do I manage it so that all elements get checked when a key has been pressed?