O'Reilly logo

Vaadin 7 Cookbook by Ondrej Kvasnovsky, Jaroslav Holan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing shortcuts

Some users want to use the mouse as little as possible. They prefer to use the keyboard. For these users, we can improve our application by adding keyboard shortcuts. In this recipe, we will show how to add shortcuts on components in Vaadin's application. We will add two actions. The first action is for saving and the second action is for showing the window with Help.

Customizing shortcuts

How to do it...

Carry out the following steps to create custom shortcuts:

  1. Create a Vaadin project with a main UI class named Demo as follows:
    public class Demo extends UI {…}
  2. We create a class called ShortcutPanel which extends the Panel class and implements the

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required