OpenTK.Platform.X11.API.DisplayKeycodes C# (CSharp) Method

DisplayKeycodes() private method

private DisplayKeycodes ( Display display, int &min_keycodes_return, int &max_keycodes_return ) : void
display Display
min_keycodes_return int
max_keycodes_return int
return void
        public static extern void DisplayKeycodes(Display display, ref int min_keycodes_return, ref int max_keycodes_return);
        #endregion

Usage Example

Esempio n. 1
0
        public X11Keyboard()
        {
            Debug.WriteLine("Using X11Keyboard.");
            state.IsConnected = true;

            var display = API.DefaultDisplay;

            using (new XLock(display))
            {
                // Find the number of keysyms per keycode.
                int first = 0, last = 0;
                API.DisplayKeycodes(display, ref first, ref last);
                var keysym_ptr =
                    API.GetKeyboardMapping(display,
                                           (byte)first,
                                           last - first + 1,
                                           ref KeysymsPerKeycode);
                Functions.XFree(keysym_ptr);

                if (Xkb.IsSupported(display))
                {
                    // Request that auto-repeat is only set on devices that support it physically.
                    // This typically means that it's turned off for keyboards what we want).
                    // We prefer this method over XAutoRepeatOff/On, because the latter needs to
                    // be reset before the program exits.
                    bool supported;
                    Xkb.SetDetectableAutoRepeat(display, true, out supported);
                    KeyMap = new X11KeyMap(display);
                }
            }
        }
All Usage Examples Of OpenTK.Platform.X11.API::DisplayKeycodes