-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key::printable ignores modifiers #287
Comments
After some digging, it would appear
So this might be an issue with |
libtcod/libtcod#12 seems to be asking about the same symptoms, and the answer is that for anything other than special keys (escape, backspace, etc) we should rely on the |
Oops, I've just noticed the already existing public I'll leave this open as I still think |
Thanks for figuring this out for me 😄 |
The tutorial has been updated to use I agree that this is misleading. libtcod does expose the "printable" field (under the wonderfully descriptive name I'm not really sure what to do here. As far as I can tell, using I'd be open to renaming We already have the Lines 92 to 131 in deda7ec
I'm not off the top of my head sure how to handle the Unfortunately, given life circumstances, available time and priorities I am unlikely to contribute much to tcod-rs in the future. |
to convert from a I'm not sure I'll have time to implement it, but I'll see what I can do. |
When pressing (on a US layout)
Shift + .
I expect theprintable
field oftcod::input::Key
to be>
. Instead, it is.
. (Thecode: Text
event seems to have the correct data in thetext
field). Based on #187 and https://tomassedovic.github.io/roguelike-tutorial/part-11-dungeon-progression.html I believeprintable: '>'
is the expected behavior in this scenario.tcod-rs
version:0.14.0
rustc --version
:rustc 1.34.2 (6c2484dc3 2019-05-13)
Events from pressing
.
Events from pressing
>
That is:
shift
down.
down.
upshift
upI'd expect both
code: Char
events to showprintable: '>'
(note also, they both showshift: true
).Repro: https://github.com/abesto/tcod-modifier-repro/blob/master/src/main.rs
The text was updated successfully, but these errors were encountered: