Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/exp/shiny: hebrew keyboard not supported #28034

Open
yahelmanor opened this issue Oct 5, 2018 · 0 comments

Comments

@yahelmanor
Copy link

commented Oct 5, 2018

What did you do?

I have created a program that logs the key.Event from the window, then I tried to type Hebrew rune in my keyboard and the program loged

key = key.Event{(CodeUnknown), key.Modifiers(), Press}
key = key.Event{(CodeUnknown), key.Modifiers(), Release}

the program

package main

import (
	"fmt"
	"log"

	"golang.org/x/exp/shiny/driver"
	"golang.org/x/exp/shiny/screen"
	"golang.org/x/mobile/event/key"
	"golang.org/x/mobile/event/lifecycle"
)

func main() {
	driver.Main(func(s screen.Screen) {
		w, err := s.NewWindow(&screen.NewWindowOptions{
			Title: "~",
		})
		if err != nil {
			log.Fatal(err)
		}
		defer w.Release()
		for {
			e := w.NextEvent()
			switch e := e.(type) {
			case key.Event:
				fmt.Println("key =", e)
			case lifecycle.Event:
				if e.To == lifecycle.StageDead {
					return
				}
			}
		}
	})
}

What did you expect to see?

I have expected the key.Event to contain the Unicode of the character I pressed.
And the log should be like

key = key.Event{'א' (CodeUnknown), key.Modifiers(), Press}
key = key.Event{'א' (CodeUnknown), key.Modifiers(), Release}

What did you see instead?

the Unicode was -1.

Does this issue reproduce with the latest release (go1.11.1)?

yes

System details

go version go1.10.1 linux/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/Desktop/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="/usr/bin/gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build633916952=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.10.1 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.10.1
uname -sr: Linux 4.18.0-8-generic
Distributor ID:	Ubuntu
Description:	Ubuntu Cosmic Cuttlefish (development branch)
Release:	18.10
Codename:	cosmic
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.28-0ubuntu1) stable release version 2.28.
gdb --version: GNU gdb (Ubuntu 8.2-0ubuntu1) 8.2

@gopherbot gopherbot added this to the Unreleased milestone Oct 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.