Hi,
In order to get the current state of the Caps Lock, the AreCapsLocked() method has to be called through the current application instance. Although this instance is platform specific, Unreal Engine gives you the necessary API to check the Caps Lock state in a generic and cross-platform way. However, you would have to do a little bit of work to properly expose this method to Blueprints. Here’s a step by step guide on how to make this a static BlueprintPure node that can be accessed from any blueprint:
-
To access the running application instance, you have to first enable Slate and SlateCore modules. Open your Code Editor, go to [YourProjectName].Build.cs and either uncomment or add this line at the end of the class
PrivateDependencyModuleNames.AddRange(new string[] { “Slate”, “SlateCore” });
-
We’re going to create a new static method within Blueprint Function Library class. You can skip to step#3 If you have already added one to your project. To create a Blueprint Function Library, go to the Editor, click on Add New > New C++ class > Scroll all the way down and select Blueprint Function Library as its parent. Let’s name it MyBlueprintFunctionLibrary (a better naming convention can be something like [YourProjectName]BlueprintFunctionLibrary).
-
In the header file, create a new static method named AreCapsLocked (or anything that makes sense) and mark it with UFUNCTION specifier BlueprintPure:
UFUNCTION(BlueprintPure, Category = "Utilities|InputEvent")static bool AreCapsLocked();
-
In the .cpp file, include the necessary headers and implement the method as such:
#include "MyBlueprintFunctionLibrary.h"#include “GenericPlatform/GenericApplication.h”
#include “SlateApplication.h”bool UMyBlueprintFunctionLibrary::AreCapsLocked()
{
return FSlateApplication::Get().GetModifierKeys().AreCapsLocked();
}
There you go! Compile your code, go to any blueprint and type “CapsLock”. You should now be able to see and get this node.

Hope this helps.
~Vizgin