<commit_before>// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using OpenTK.Input;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Input.Bindings;

namespace osu.Game.Input.Bindings
{
    public class GlobalKeyBindingInputManager : DatabasedKeyBindingInputManager<GlobalAction>
    {
        private readonly Drawable handler;

        public GlobalKeyBindingInputManager(OsuGameBase game)
        {
            if (game is IKeyBindingHandler<GlobalAction>)
                handler = game;
        }

        public override IEnumerable<KeyBinding> DefaultKeyBindings => new[]
        {
            new KeyBinding(Key.F8, GlobalAction.ToggleChat),
            new KeyBinding(Key.F9, GlobalAction.ToggleSocial),
            new KeyBinding(new[] { Key.LControl, Key.LAlt, Key.R }, GlobalAction.ResetInputSettings),
            new KeyBinding(new[] { Key.LControl, Key.T }, GlobalAction.ToggleToolbar),
            new KeyBinding(new[] { Key.LControl, Key.O }, GlobalAction.ToggleSettings),
            new KeyBinding(new[] { Key.LControl, Key.D }, GlobalAction.ToggleDirect),
        };

        protected override IEnumerable<Drawable> GetKeyboardInputQueue() => new[] { handler }.Concat(base.GetKeyboardInputQueue());<commit_msg>Fix potential nullref<commit_after>// Copyright (c) 2007-2017 ppy Pty Ltd <<EMAIL>>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE

using OpenTK.Input;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Input.Bindings;

namespace osu.Game.Input.Bindings
{
    public class GlobalKeyBindingInputManager : DatabasedKeyBindingInputManager<GlobalAction>
    {
        private readonly Drawable handler;

        public GlobalKeyBindingInputManager(OsuGameBase game)
        {
            if (game is IKeyBindingHandler<GlobalAction>)
                handler = game;
        }

        public override IEnumerable<KeyBinding> DefaultKeyBindings => new[]
        {
            new KeyBinding(Key.F8, GlobalAction.ToggleChat),
            new KeyBinding(Key.F9, GlobalAction.ToggleSocial),
            new KeyBinding(new[] { Key.LControl, Key.LAlt, Key.R }, GlobalAction.ResetInputSettings),
            new KeyBinding(new[] { Key.LControl, Key.T }, GlobalAction.ToggleToolbar),
            new KeyBinding(new[] { Key.LControl, Key.O }, GlobalAction.ToggleSettings),
            new KeyBinding(new[] { Key.LControl, Key.D }, GlobalAction.ToggleDirect),
        };

        protected override IEnumerable<Drawable> GetKeyboardInputQueue() =>
            handler == null ? base.GetKeyboardInputQueue() : new[] { handler }.Concat(base.GetKeyboardInputQueue());
{'fraction_non_alphanumeric': 0.10495323865604433, 'fraction_numerical': 0.006927606511950121, 'mean_word_length': 3.2595870206489677, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7146872', 'n_tokens_mistral': 806, 'n_tokens_neox': 792, 'n_words': 172}