aboutsummaryrefslogtreecommitdiffstats
path: root/example.dkmap
diff options
context:
space:
mode:
authorTeddy Wing2018-10-03 10:00:32 +0200
committerTeddy Wing2018-10-03 10:00:32 +0200
commit7b040a5f3c8f66a2fd95bc1baccfa4fa2885425d (patch)
treec8d6e5498ed03989b7f7b7c454d1504f06876f74 /example.dkmap
parent54cc9a4b02acf1339c63dabece9eaf07f28fb152 (diff)
downloaddome-key-map-7b040a5f3c8f66a2fd95bc1baccfa4fa2885425d.tar.bz2
KeyboardKeyWithModifiers: Remove `Option` from `flags` field
I originally wrapped the contained `Vec` in an `Option` to that we wouldn't have to initialise whole new empty `Vec` for every key in an `Action` list. However, this made less sense once I wrote the parser and ended up with an empty `Vec` by default that I then had to convert into an `Option`. Now I've started the code to type keys including modifiers, and the `Option` no longer makes any sense at all. In order to type keys (including modifiers), I'll be using Autopilot's `tap()` function: pub fn tap<T: KeyCodeConvertible + Copy>(key: T, flags: &[Flag], delay_ms: u64) { This function requires a slice, so I ended up getting a `Vec` from my parser, converting it to an Option to satisfy my original interface, and now would have to convert it back into a `Vec` or slice in order to be able to pass it into `tap()`. Talk about unnecessary. Get rid of the `Option` because it's more work for absolutely no reason.
Diffstat (limited to 'example.dkmap')
0 files changed, 0 insertions, 0 deletions