Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

KeyPressEvent propagation does not work #39

Open
pavel-krivanek opened this issue Mar 9, 2020 · 1 comment · May be fixed by #40
Open

KeyPressEvent propagation does not work #39

pavel-krivanek opened this issue Mar 9, 2020 · 1 comment · May be fixed by #40

Comments

@pavel-krivanek
Copy link
Contributor

If I'm not wrong, when event callback returns false, the default event propagation and processing should continue. It does not seem to work.

GtkApplication ensureRunning.
textEditor := GtkEntry new.
textEditor connectKeyPressEvent:  [ :event |
    event isEscape ifTrue: [ #Esc traceCr ]. 
    false ].
window := GtkWindow new
		title: ' Example';
		add: (GtkBox newVertical
			packStart: (textEditor)
			expand: true 
			fill: true
			padding: 0;
			yourself);
		showAll
@pavel-krivanek pavel-krivanek linked a pull request Mar 9, 2020 that will close this issue
@pavel-krivanek
Copy link
Contributor Author

correct form:

GtkApplication ensureRunning.
	

textEditor := GtkEntry new.
textEditor connectKeyPressEvent:  [ :event |
	event isEscape ifTrue: [ #Esc traceCr ]. 
	textEditor imContextFilterKeypress: event.
	false ].
	
window := GtkWindow new
		title: ' Example';
		add: (GtkBox newVertical
			packStart: (textEditor)
			expand: true 
			fill: true
			padding: 0;
			yourself);
		showAll

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant