Skip to content

Commit

Permalink
electron: listen to keyboard layout changes (#11689)
Browse files Browse the repository at this point in the history
The contribution responsible for listening to keyboard changes in Electron wasn't bound/used.

Bind the `ElectronNativeKeymap` contribution.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
kittaakos authored Sep 21, 2022
1 parent 523fbbf commit b75b614
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { ElectronMessagingService } from './messaging/electron-messaging-service
import { ElectronConnectionHandler } from '../electron-common/messaging/electron-connection-handler';
import { ElectronSecurityTokenService } from './electron-security-token-service';
import { TheiaBrowserWindowOptions, TheiaElectronWindow, TheiaElectronWindowFactory, WindowApplicationConfig } from './theia-electron-window';
import { ElectronNativeKeymap } from './electron-native-keymap';

const electronSecurityToken: ElectronSecurityToken = { value: v4() };
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -59,4 +60,7 @@ export default new ContainerModule(bind => {
child.bind(WindowApplicationConfig).toConstantValue(config);
return child.get(TheiaElectronWindow);
});

bind(ElectronNativeKeymap).toSelf().inSingletonScope();
bind(ElectronMainApplicationContribution).toService(ElectronNativeKeymap);
});

0 comments on commit b75b614

Please sign in to comment.