doc: Add example to get the list of keys triggering a modifier Also add the corresponding test, so that we keep the doc in sync.