React to Shift+Tab in Gloss

时间:2016-02-12 20:42:51

标签: haskell interactive gloss

I am currently writing a game using }}}' play. The basic structure of this game is very simple: I have a board with units on it, one of which is in focus.

I have added the ability to change the focus by cycling through the units on the board using gloss. Quite quickly, I realised that I wanted to also be able to cycle back so I thought I'd use KeyTab to do so as is customary in this situation.

Shift + KeyTab' Events come with Modifiers, one of which is gloss. Perfect? Well... not quite: whenever I press shift, the event is never received by the window (I used Shift + KeyTab's Debug.Trace to print all the received traces).

With CAPS LOCK, I do receive Event with the KeyTab modifier marked as shift. If I switch to using Down as my shortcut, it works perfectly well. Here is a minimal example reproducing the problem:

Ctrl + KeyTab

0 个答案:

没有答案