Attempt to make modifier key changes take affect when the dialogue closes. This means you don't have to restart Fenrir to apply them.
This commit is contained in:
1 parent
15e04aa8f8
commit
22f6df6af9
23 files changed
+454
-58
No files matched your search
@@ -475,12 +475,13 @@ func (f *fakeSource) Read() (screen.Snapshot, error) {
|
||||
}
|
||||
|
||||
type fakeKeys struct {
|
||||
poll func(bool, func(input.Decision)) error
|
||||
closed, passed bool
|
||||
events chan error
|
||||
captures []bool
|
||||
captureErr error
|
||||
onCapture func(bool)
|
||||
updateModifiers func([]string, []string) (bool, error)
|
||||
poll func(bool, func(input.Decision)) error
|
||||
closed, passed bool
|
||||
events chan error
|
||||
captures []bool
|
||||
captureErr error
|
||||
onCapture func(bool)
|
||||
}
|
||||
|
||||
func (f *fakeKeys) Events() <-chan error { return f.events }
|
||||
@@ -496,6 +497,12 @@ func (f *fakeKeys) Capture(enabled bool) error {
|
||||
}
|
||||
return f.captureErr
|
||||
}
|
||||
func (f *fakeKeys) Update_modifiers(reader, script []string) (bool, error) {
|
||||
if f.updateModifiers != nil {
|
||||
return f.updateModifiers(reader, script)
|
||||
}
|
||||
return true, nil
|
||||
}
|
||||
func (f *fakeKeys) Pass_next() { f.passed = true }
|
||||
func (f *fakeKeys) Close() error { f.closed = true; return nil }
|
||||
|
||||
|
||||
Reference in new issue
Block a user