lairworks / nas2d-core

NAS2D is an open source, object oriented 2D game development framework written in portable C++.
http://nas2d.lairworks.com
zlib License
10 stars 6 forks source link

Update key modifier functions #1152

Closed DanRStevens closed 6 months ago

DanRStevens commented 6 months ago

Closes #1151

Mark KeyModifier methods as static.

Remove Caps Lock checking from shift. We probably don't want to check Caps in that method. For control key combos, they should be unaffected by Caps. For text capitalization, we need to xor the state of Shift and Caps (rather than or them). Removing this check also makes the shift function consistent with query_shift.

Implement the query_ prefixed methods in terms of the static methods.

Strip the query_ prefix from non-static methods that query the current keyboard state.