chromium/ui/base/x/x11_global_shortcut_listener.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/base/x/x11_global_shortcut_listener.h"

#include <stddef.h>

#include "base/containers/contains.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/event.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h"
#include "ui/events/platform/platform_event_source.h"
#include "ui/gfx/x/connection.h"

namespace {

// The modifiers masks used for grabbing keys.  Due to XGrabKey only working on
// exact modifiers, we need to grab all key combinations including zero or more
// of the following: Num lock, Caps lock and Scroll lock.  So that we can make
// sure the behavior of global shortcuts is consistent on all platforms.
const x11::ModMask kModifiersMasks[] =;

x11::ModMask GetNativeModifiers(bool is_alt_down,
                                bool is_ctrl_down,
                                bool is_shift_down) {}

}  // namespace

namespace ui {

XGlobalShortcutListener::XGlobalShortcutListener()
    :{}

XGlobalShortcutListener::~XGlobalShortcutListener() {}

void XGlobalShortcutListener::StartListening() {}

void XGlobalShortcutListener::StopListening() {}

bool XGlobalShortcutListener::CanDispatchEvent(const PlatformEvent& event) {}

uint32_t XGlobalShortcutListener::DispatchEvent(const PlatformEvent& event) {}

bool XGlobalShortcutListener::RegisterAccelerator(KeyboardCode key_code,
                                                  bool is_alt_down,
                                                  bool is_ctrl_down,
                                                  bool is_shift_down) {}

void XGlobalShortcutListener::UnregisterAccelerator(KeyboardCode key_code,
                                                    bool is_alt_down,
                                                    bool is_ctrl_down,
                                                    bool is_shift_down) {}

void XGlobalShortcutListener::OnKeyPressEvent(const KeyEvent& event) {}

}  // namespace ui