@@ -1752,6 +1752,61 @@ impl ModifiersState {
17521752 pub fn meta_key ( & self ) -> bool {
17531753 self . intersects ( Self :: META )
17541754 }
1755+
1756+ /// Returns `true` if the AltGraph key is pressed.
1757+ pub fn alt_graph_key ( & self ) -> bool {
1758+ self . contains ( Self :: ALT_GRAPH )
1759+ }
1760+
1761+ /// Returns `true` if the CapsLock key is toggled.
1762+ pub fn caps_lock_key ( & self ) -> bool {
1763+ self . contains ( Self :: CAPS_LOCK )
1764+ }
1765+
1766+ /// Returns `true` if the NumLock key is toggled.
1767+ pub fn num_lock_key ( & self ) -> bool {
1768+ self . contains ( Self :: NUM_LOCK )
1769+ }
1770+
1771+ /// Returns `true` if the ScrollLock key is toggled.
1772+ pub fn scroll_lock_key ( & self ) -> bool {
1773+ self . contains ( Self :: SCROLL_LOCK )
1774+ }
1775+
1776+ /// Returns `true` if the Fn key is pressed.
1777+ pub fn fn_key ( & self ) -> bool {
1778+ self . contains ( Self :: FN )
1779+ }
1780+
1781+ /// Returns `true` if the FnLock key is toggled.
1782+ pub fn fn_lock_key ( & self ) -> bool {
1783+ self . contains ( Self :: FN_LOCK )
1784+ }
1785+
1786+ /// Returns `true` if the KanaLock key is toggled.
1787+ pub fn kana_lock_key ( & self ) -> bool {
1788+ self . contains ( Self :: KANA_LOCK )
1789+ }
1790+
1791+ /// Returns `true` if the Loya key is pressed.
1792+ pub fn loya_key ( & self ) -> bool {
1793+ self . contains ( Self :: LOYA )
1794+ }
1795+
1796+ /// Returns `true` if the Roya key is pressed.
1797+ pub fn roya_key ( & self ) -> bool {
1798+ self . contains ( Self :: ROYA )
1799+ }
1800+
1801+ /// Returns `true` if the Symbol key is pressed.
1802+ pub fn symbol_key ( & self ) -> bool {
1803+ self . contains ( Self :: SYMBOL )
1804+ }
1805+
1806+ /// Returns `true` if the SymbolLock key is toggled.
1807+ pub fn symbol_lock_key ( & self ) -> bool {
1808+ self . contains ( Self :: SYMBOL_LOCK )
1809+ }
17551810}
17561811
17571812/// The logical state of the particular modifiers key.
0 commit comments