@@ -50,11 +50,17 @@ struct ConfigToml {
5050 emulation_backend : Option < EmulationBackend > ,
5151 port : Option < u16 > ,
5252 release_bind : Option < Vec < scancode:: Linux > > ,
53- mouse_sensitivity : Option < f64 > ,
54- invert_scroll : Option < bool > ,
5553 cert_path : Option < PathBuf > ,
5654 clients : Option < Vec < TomlClient > > ,
5755 authorized_fingerprints : Option < HashMap < String , String > > ,
56+ input : InputConfig ,
57+ }
58+
59+ #[ derive( Serialize , Deserialize , Debug ) ]
60+ struct InputConfig {
61+ // TODO: implement scroll_sensitivity and mouse_acceleration
62+ invert_scroll : Option < bool > ,
63+ mouse_sensitivity : Option < f64 > ,
5864}
5965
6066#[ derive( Clone , Serialize , Deserialize , Debug , Eq , PartialEq ) ]
@@ -370,14 +376,14 @@ impl Config {
370376 pub fn invert_scroll ( & self ) -> bool {
371377 self . config_toml
372378 . as_ref ( )
373- . and_then ( |c| c. invert_scroll )
379+ . and_then ( |c| c. input . invert_scroll )
374380 . unwrap_or ( false )
375381 }
376382
377383 pub fn mouse_sensitivity ( & self ) -> f64 {
378384 self . config_toml
379385 . as_ref ( )
380- . and_then ( |c| c. mouse_sensitivity )
386+ . and_then ( |c| c. input . mouse_sensitivity )
381387 . unwrap_or ( 1.0 )
382388 }
383389
0 commit comments