Class GCKeyboard

  • All Implemented Interfaces:
    GCDevice, NSObject

    public class GCKeyboard
    extends NSObject
    implements GCDevice
    GCKeyboard is available to an application that links to GameController.framework There are 2 ways to access keyboard paired to the system: 1: Querying for the coalescedKeyboard using [GCKeyboard coalescedKeyboard] 2: Registering for Connection/Disconnection notifications from NSNotificationCenter [@note] All connected keyboards are coalesced into one keyboard object, so notification about connection/disconnection will only be delivered once. API-Since: 14.0
    • Constructor Detail

      • GCKeyboard

        protected GCKeyboard​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static GCKeyboard allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • coalescedKeyboard

        @Nullable
        public static @Nullable GCKeyboard coalescedKeyboard()
        Keyboard object that represents all keyboards connected to the device Should be used to query key states every time input needs to be handled API-Since: 14.0
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • handlerQueue

        @NotNull
        public @NotNull dispatch_queue_t handlerQueue()
        Description copied from interface: GCDevice
        The dispatch queue that element value change handlers are submitted on. The default queue is main, and setting this to any other queue will make value change handlers dispatch async on the given queue. This is useful if the main game loop of the application is not on main, or if input logic is handled on another thread from the main game loop.
        Specified by:
        handlerQueue in interface GCDevice
        See Also:
        GCControllerAxisInput.valueChangedHandler, GCControllerButtonInput.valueChangedHandler, GCControllerButtonInput.pressedChangedHandler, GCControllerDirectionPad.valueChangedHandler, API-Since: 7.0
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • keyboardInput

        @Nullable
        public @Nullable GCKeyboardInput keyboardInput()
        Unlike GCController GCKeyboard only has one input profile. This profile allows you to query buttons and button state API-Since: 14.0
      • physicalInputProfile

        @NotNull
        @Deprecated
        public @NotNull GCPhysicalInputProfile physicalInputProfile()
        Deprecated.
        Description copied from interface: GCDevice
        Gets the physical input profile for the device. [@note] This is equivalent to the controller's gamepad, microGamepad, or extendedGamepad instance.
        Specified by:
        physicalInputProfile in interface GCDevice
        See Also:
        GCController.microGamepad, API-Since: 14.0 Deprecated-Since: 16.0 Deprecated-Message: Use the physicalInputProfile property on GCController instead. For GCKeyboard, use the keyboardInput property. For GCMouse, use the mouseInput property.
      • productCategory

        @NotNull
        public @NotNull java.lang.String productCategory()
        Description copied from interface: GCDevice
        The product category the device belongs to. This is useful for setting appropriate UI elements based on what type of device is connected.
        Specified by:
        productCategory in interface GCDevice
        See Also:
        API-Since: 13.0
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setHandlerQueue

        public void setHandlerQueue​(@NotNull
                                    @NotNull dispatch_queue_t value)
        Description copied from interface: GCDevice
        The dispatch queue that element value change handlers are submitted on. The default queue is main, and setting this to any other queue will make value change handlers dispatch async on the given queue. This is useful if the main game loop of the application is not on main, or if input logic is handled on another thread from the main game loop.
        Specified by:
        setHandlerQueue in interface GCDevice
        See Also:
        GCControllerAxisInput.valueChangedHandler, GCControllerButtonInput.valueChangedHandler, GCControllerButtonInput.pressedChangedHandler, GCControllerDirectionPad.valueChangedHandler, API-Since: 7.0
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • vendorName

        @Nullable
        public @Nullable java.lang.String vendorName()
        Description copied from interface: GCDevice
        A vendor supplied name. May be nil, and is not guaranteed to be unique. This should not be used as a key in a dictionary, but simply as a way to present some basic information about the device in testing or to the user. API-Since: 7.0
        Specified by:
        vendorName in interface GCDevice
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.