Comments (6)
This used to be the default, but I dropped it because framework
takes a couple seconds to load, so it was annoying when writing small tools. I agree that not having those keybindings is also annoying in its own right, though. Would you be willing to add some of the basic keybindings for your platform to "gui/easy/private/view/keymap.rkt"? If not, I can probably take care of it later this week.
from racket-gui-easy.
Oh, that's interesting. I've never personally noticed that framework
takes additional time to load, but I believe you.
Would you be willing to add some of the basic keybindings for your platform to "gui/easy/private/view/keymap.rkt"?
I can test on Linux and Windows. I'll take a look and see what I can do!
from racket-gui-easy.
I came up with this for my Linux computer:
(case (system-type 'os)
[(macosx)
(add&map "c:a" 'goto-start (λ (editor _event)
(send editor set-position 0)))
(add&map "c:e" 'goto-end (λ (editor _event)
(send editor set-position (send editor last-position))))
(add&map "d:a" 'select-all (λ (editor _event)
(send editor do-edit-operation 'select-all)))]
[(unix)
(add&map ":c:a" 'select-all (λ (editor _event)
(send editor do-edit-operation 'select-all)))
(add&map ":c:z" 'undo (λ (editor _event)
(send editor do-edit-operation 'undo)))
(add&map ":c:Z" 'redo (λ (editor _event)
(send editor do-edit-operation 'redo)))
(add&map ":c:x" 'cut (λ (editor _event)
(send editor do-edit-operation 'cut)))
(add&map ":c:c" 'copy (λ (editor _event)
(send editor do-edit-operation 'copy)))
(add&map ":c:v" 'paste (λ (editor _event)
(send editor do-edit-operation 'paste)))])
However, undo and redo don't seem to fully work. I think the keybinds are activating but the editor is not recording the undo/redo history correctly, and I need to go to bed rather than debugging this right now. It would also be a nice-to-have if Ctrl+Left, Ctrl+Right, Alt+Left, Alt+Right moved the cursor backward and forward one word, which there doesn't seem to be a built in method for. At least cut/copy/paste all work.
from racket-gui-easy.
I've pushed a change to incorporate your examples, and I think I got undo and redo working. I think the word movement commands probably can also be implemented using find-wordbreak
, but I'll have to look at that some other time.
from racket-gui-easy.
I've pushed another update to support moving backward and forward by word. I think that covers the basics, but do let me know if one of the Windows/Linux bindings is wrong or if there are others we should add.
from racket-gui-easy.
Works great on Windows, great job :)
from racket-gui-easy.
Related Issues (20)
- List view + dialog + slider appears not to update correctly HOT 3
- update-children in container%: hash-ref: no value found for key HOT 1
- tabs: 'new-button (send tab-panel on-new-request) not implemented HOT 3
- How does one program GUIs to handle heterogeneous data, especially with sub-views that contain internal state? HOT 1
- Containers which create internal panels are always stretchable HOT 2
- dyn-view with hidden observable dependencies HOT 11
- is there a way to close a dialog programmatically? HOT 5
- Is it possible to detect when the main window closes? HOT 2
- Render popup-menus relative to a child widget? HOT 1
- Documentation for case-view condition doesn't match implementation HOT 1
- `group` does not accept styles shown in docs HOT 1
- button contract should allow bitmap%, not just label-text% HOT 1
- Error in remove-dependencies while updating conditional view within a list-view HOT 3
- Feature-request: Slightly fancier menus HOT 1
- observable-view: change-children: cannot delete non-window area HOT 2
- Canvas: `ctx: undefined; cannot use field before initialization` HOT 9
- Docs say default hpanel alignment is `'(center top)`, but it isn't
- Clean way to implement a list of checkboxes? HOT 2
- dialog with `close-button` style has no close button HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from racket-gui-easy.