//! Module containing controller-specific abstractions allowing complex //! keybindings use crate::{game_input::GameInput, window::MenuInput, settings::gamepad::con_settings::LayerEntry}; use gilrs::{ev::Code as GilCode, Axis as GilAxis, Button as GilButton}; use hashbrown::HashMap; use serde::{Deserialize, Serialize}; /// Contains all controller related settings and keymaps #[derive(Clone, Debug, Serialize, Deserialize, Default)] #[serde(default)] pub struct ControllerSettings { pub game_button_map: HashMap>, pub menu_button_map: HashMap>, pub game_analog_button_map: HashMap>, pub menu_analog_button_map: HashMap>, pub game_axis_map: HashMap>, pub menu_axis_map: HashMap>, pub layer_button_map: HashMap>, pub modifier_buttons: Vec