Skip to content

Commit 0d05ed7

Browse files
committed
Add comment regarding input monitoring access on macOS
1 parent 248fd6d commit 0d05ed7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/SFML/Window/Keyboard.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,9 @@ static constexpr unsigned int ScancodeCount{static_cast<unsigned int>(Scan::Laun
338338
////////////////////////////////////////////////////////////
339339
/// \brief Check if a key is pressed
340340
///
341+
/// \warning On macOS you're required to grant input monitoring access for
342+
/// your application in order for `isKeyPressed` to work.
343+
///
341344
/// \param key Key to check
342345
///
343346
/// \return `true` if the key is pressed, `false` otherwise
@@ -348,6 +351,9 @@ static constexpr unsigned int ScancodeCount{static_cast<unsigned int>(Scan::Laun
348351
////////////////////////////////////////////////////////////
349352
/// \brief Check if a key is pressed
350353
///
354+
/// \warning On macOS you're required to grant input monitoring access for
355+
/// your application in order for `isKeyPressed` to work.
356+
///
351357
/// \param code Scancode to check
352358
///
353359
/// \return `true` if the physical key is pressed, `false` otherwise

0 commit comments

Comments
 (0)