How to use the command screenkey (with examples)

How to use the command screenkey (with examples)

Screenkey is a screencast tool that displays the keys pressed on the screen. It is a useful tool for creating tutorials and presentations where you want to visually demonstrate keystrokes to your audience.

Use case 1: Display keys which are currently being pressed on the screen

Code:

screenkey

Motivation: This use case is useful when you want to display the keys being pressed on the screen during a live demonstration or recording. It helps the audience or viewers follow along with your actions more easily.

Explanation: The command screenkey without any arguments launches the tool and displays the keys being pressed on the screen.

Example output: Image

Use case 2: Display keys and mouse buttons which are currently being pressed on the screen

Code:

screenkey --mouse

Motivation: When you want to demonstrate both keystrokes and mouse button clicks, this use case is helpful. It allows you to show a comprehensive view of the user’s input during a tutorial or presentation.

Explanation: Adding the --mouse option to the screenkey command enables the display of both keys and mouse buttons being pressed on the screen.

Example output: Image

Use case 3: Launch the settings menu of screenkey

Code:

screenkey --show-settings

Motivation: This use case is handy when you need to access the settings menu of screenkey to customize the behavior or appearance of the tool according to your preferences.

Explanation: The --show-settings option launches the settings menu of screenkey, allowing you to modify various aspects of the tool such as position, font, color, and opacity.

Example output: Settings menu displayed on the screen.

Use case 4: Launch screenkey at a specific position

Code:

screenkey --position top|center|bottom|fixed

Motivation: If you prefer to display screenkey at a specific position on the screen, this use case is for you. It gives you control over where the key display appears during your presentation or recording.

Explanation: By specifying the position argument (top, center, bottom, or fixed) along with the screenkey command, you can launch the tool at the desired position on the screen.

Example output: Image

Use case 5: Change the format of the key modifiers displayed on screen

Code:

screenkey --mods-mode normal|emacs|mac|win|tux

Motivation: This use case allows you to modify the format of key modifiers (Ctrl, Alt, Shift, etc.) displayed on screenkey. You can select a format that matches your preferred keyboard layout or operating system.

Explanation: The --mods-mode option lets you choose from various formats (normal, emacs, mac, win, tux) to display the key modifiers according to your preference.

Example output: Image

Use case 6: Change the appearance of screenkey

Code:

screenkey --bg-color "#a1b2c3" --font Hack --font-color yellow --opacity 0.8

Motivation: If you want to customize the appearance of screenkey, this use case is for you. You can change the background color, font, font color, and opacity of the key display to match your preferences or fit the overall design layout.

Explanation: By adding various arguments to the screenkey command, you can modify different elements of the tool’s appearance. Arguments like --bg-color, --font, --font-color, and --opacity allow you to change the background color, font, font color, and opacity, respectively.

Example output: Image

Use case 7: Drag and select a window on screen to display screenkey

Code:

screenkey --position fixed --geometry $(slop -n -f '%g')

Motivation: When you only want to display screenkey within a specific window or region of the screen during a demonstration or recording, this use case is useful. It allows you to select the window or region to display screenkey with ease.

Explanation: The --position fixed --geometry $(slop -n -f '%g') argument combination enables you to drag and select a window or region on the screen. Screenkey will then appear only within the selected area.

Example output: Screenkey displayed within the selected window or region.

Conclusion:

Screenkey is a versatile tool for displaying keystrokes and mouse button clicks on the screen. The different use cases demonstrated in this article allow you to customize various aspects of the tool, such as its position, appearance, and behavior. Whether you are creating tutorials, giving presentations, or recording demonstrations, screenkey can greatly enhance the clarity and understanding of your content for the audience or viewers.

Related Posts

How to use the command 'help' (with examples)

How to use the command 'help' (with examples)

The ‘help’ command is a built-in command in Bash that displays information about other built-in commands.

Read More
How to use the command "flow" (with examples)

How to use the command "flow" (with examples)

The command “flow” is a static type checker for JavaScript. It allows you to catch bugs and type errors in your JavaScript code before runtime.

Read More
How to use the command 'dcg' (with examples)

How to use the command 'dcg' (with examples)

The ‘dcg’ command is a Drupal code generator tool that allows developers to quickly generate code snippets for different Drupal components such as modules, services, forms, etc.

Read More