From 0d05ed739c9e066a20cd104f69fbb637140490c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20D=C3=BCrrenberger?= Date: Thu, 5 Dec 2024 00:09:21 +0100 Subject: [PATCH] Add comment regarding input monitoring access on macOS --- include/SFML/Window/Keyboard.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/SFML/Window/Keyboard.hpp b/include/SFML/Window/Keyboard.hpp index 6b625ce50..9077ce1c6 100644 --- a/include/SFML/Window/Keyboard.hpp +++ b/include/SFML/Window/Keyboard.hpp @@ -338,6 +338,9 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun //////////////////////////////////////////////////////////// /// \brief Check if a key is pressed /// +/// \warning On macOS you're required to grant input monitoring access for +/// your application in order for `isKeyPressed` to work. +/// /// \param key Key to check /// /// \return `true` if the key is pressed, `false` otherwise @@ -348,6 +351,9 @@ static constexpr unsigned int ScancodeCount{static_cast(Scan::Laun //////////////////////////////////////////////////////////// /// \brief Check if a key is pressed /// +/// \warning On macOS you're required to grant input monitoring access for +/// your application in order for `isKeyPressed` to work. +/// /// \param code Scancode to check /// /// \return `true` if the physical key is pressed, `false` otherwise