Support for meta and hyper keys added
Support for the compose key has also been added but it's just the button code for now, no support for actually composing stuff. There are plans for that in a fixme.
This commit is contained in:
parent
9a37fbf04a
commit
8c28c57925
@ -17,7 +17,7 @@ type Backend interface {
|
|||||||
// Whatever the application draws from within this event handler must be
|
// Whatever the application draws from within this event handler must be
|
||||||
// the first thing that appears on-screen.
|
// the first thing that appears on-screen.
|
||||||
//
|
//
|
||||||
// The OnResize evnt handler must run whenever the window is resized.
|
// The OnResize event handler must run whenever the window is resized.
|
||||||
// The backend must push updates to the screen after OnResize has been
|
// The backend must push updates to the screen after OnResize has been
|
||||||
// run.
|
// run.
|
||||||
//
|
//
|
||||||
@ -45,8 +45,8 @@ type Backend interface {
|
|||||||
Draw ()
|
Draw ()
|
||||||
}
|
}
|
||||||
|
|
||||||
// BackendFactory should completely initialize a backend, and return it. If
|
// BackendFactory must completely initialize a backend, and return it. If
|
||||||
// anything goes wrong, it should stop, clean up any resources and return an
|
// anything goes wrong, it must stop, clean up any resources and return an
|
||||||
// error so another backend can be chosen.
|
// error so another backend can be chosen.
|
||||||
type BackendFactory func (
|
type BackendFactory func (
|
||||||
application *Application,
|
application *Application,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package x
|
package x
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
import "unicode"
|
import "unicode"
|
||||||
import "github.com/jezek/xgb/xproto"
|
import "github.com/jezek/xgb/xproto"
|
||||||
import "github.com/jezek/xgbutil/keybind"
|
import "github.com/jezek/xgbutil/keybind"
|
||||||
@ -36,10 +37,15 @@ var buttonCodeTable = map[xproto.Keysym] stone.Button {
|
|||||||
0xFFE2: stone.KeyRightShift,
|
0xFFE2: stone.KeyRightShift,
|
||||||
0xFFE3: stone.KeyLeftControl,
|
0xFFE3: stone.KeyLeftControl,
|
||||||
0xFFE4: stone.KeyRightControl,
|
0xFFE4: stone.KeyRightControl,
|
||||||
|
|
||||||
|
0xFFE7: stone.KeyLeftMeta,
|
||||||
|
0xFFE8: stone.KeyRightMeta,
|
||||||
0xFFE9: stone.KeyLeftAlt,
|
0xFFE9: stone.KeyLeftAlt,
|
||||||
0xFFEA: stone.KeyRightAlt,
|
0xFFEA: stone.KeyRightAlt,
|
||||||
0xFFEB: stone.KeyLeftSuper,
|
0xFFEB: stone.KeyLeftSuper,
|
||||||
0xFFEC: stone.KeyRightSuper,
|
0xFFEC: stone.KeyRightSuper,
|
||||||
|
0xFFED: stone.KeyLeftHyper,
|
||||||
|
0xFFEE: stone.KeyRightHyper,
|
||||||
|
|
||||||
0xFFFF: stone.KeyDelete,
|
0xFFFF: stone.KeyDelete,
|
||||||
|
|
||||||