// Default settings.
        public Config()
        {
            key_forward = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.Up,
                DoomKey.W
            });
            key_backward = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.Down,
                DoomKey.S
            });
            key_strafeleft = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.A
            });
            key_straferight = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.D
            });
            key_turnleft = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.Left
            });
            key_turnright = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.Right
            });
            key_fire = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.LControl,
                DoomKey.RControl
            },
                new DoomMouseButton[]
            {
                DoomMouseButton.Mouse1
            });
            key_use = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.Space
            },
                new DoomMouseButton[]
            {
                DoomMouseButton.Mouse2
            });
            key_run = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.LShift,
                DoomKey.RShift
            });
            key_strafe = new KeyBinding(
                new DoomKey[]
            {
                DoomKey.LAlt,
                DoomKey.RAlt
            });

            mouse_sensitivity  = 3;
            mouse_disableyaxis = false;

            game_alwaysrun = true;

            var vm = ConfigUtilities.GetDefaultVideoMode();

            video_screenwidth     = (int)vm.Width;
            video_screenheight    = (int)vm.Height;
            video_fullscreen      = false;
            video_highresolution  = true;
            video_gamescreensize  = 7;
            video_displaymessage  = true;
            video_gammacorrection = 0;

            audio_soundvolume = 8;
            audio_musicvolume = 8;
            audio_randompitch = true;
        }
        private static KeyBinding GetKeyBinding(Dictionary <string, string> dic, string name, KeyBinding defaultValue)
        {
            string stringValue;

            if (dic.TryGetValue(name, out stringValue))
            {
                return(KeyBinding.Parse(stringValue));
            }

            return(defaultValue);
        }