260125.2 · 9295c4c2d760438e6bcf1b2c016f787daaf6bc38
feat(emulator): Implement keyboard layout support
This is a start on work to support richer keyboard reporting in the emulator layer. Also a number of the tests have been simplified, and we addressed some spelling issues while here, and supporting code refactors have taken place.
The keyboard handling in the emulator got several minor bugs fix, such as Ctrl-Shift should not generate sequences in legacy mode.
Initial support for layouts includes the stock US and US International layouts, including support for AltGr and dead keys.
reading declarations
Changes to demos/styles/styles_test.go. All files
@@ -49,8 +49,7 @@ func TestStyles(t *testing.T) { mt.Drain() // control L (forces sync)- mt.KeyEvent(vt.KeyEvent{Code: 'l', Down: true, Mod: vt.ModCtrl})- mt.KeyEvent(vt.KeyEvent{Code: 'l', Down: false, Mod: vt.ModCtrl})+ mt.KeyTap(vt.KeyRCtrl, vt.KeyL) attrs := 0 var lastAttr vt.Attr@@ -62,8 +61,8 @@ func TestStyles(t *testing.T) { } } }- mt.KeyEvent(vt.KeyEvent{Code: 'q', Down: true, Mod: vt.ModCtrl})- mt.KeyEvent(vt.KeyEvent{Code: 'q', Down: false, Mod: vt.ModCtrl})++ mt.KeyTap(vt.KeyRCtrl, vt.KeyQ) wg.Wait() if attrs < 8 {