I'm not sure that either the question, or the examples, are intelligible yet.
To get any help, you would need to provide more (and broader) context about what you are hoping to achieve, enabling us to understand what you are talking about.
No idea yet what the meaning, context, or use of your "Q+1, A+1" is, but I wonder if there is a problem which you are hoping to solve with a key down condition ?