How to use on-screen virtual keyboard on Linux

On-screen virtual keyboard is an alternative input method that can replace a real hardware keyboard. Virtual keyboard may be a necessity in various cases. For example, your hardware keyboard is just broken; you do not have enough keyboards for extra machines; your hardware does not have an available port left to connect a keyboard; you are a disabled person with difficulty in typing on a real keyboard; or you are building a touchscreen-based web kiosk.

On-screen keyboard can also be a protection mechanism against a hardware keylogger which silently records your keystrokes for sensitive information such as passwords. Some online banking sites actually force you to use a virtual keyboard for security-enhanced transactions.

In Linux environment, there are a couple of open-source virtual keyboard software available, e.g., GOK (GNOME Onscreen Keyboard), kvkbd, onboard, Florence.

In this tutorial, I am going to focus on Florence, and show you how to set up a virtual keyboard with Florence. Florence comes with a number of nice features such as flexible layout, multiple input methods, auto-hide, etc. As part of the tutorial, I will also demonstrate how to use Ubuntu desktop with a mouse only.

Install Florence Virtual Keyboard on Linux

Fortunately, Florence is available on base repositories of most Linux distros.

On Debian, Ubuntu or Linux Mint:

$ sudo apt-get install florence

On Fedora, CentOS or RHEL (EPEL repo is required for CentOS/RHEL):

$ sudo yum install florence

On Mandriva or Mageia:

$ sudo urpmi florence

For Archlinux users, the package is available in AUR.

Configure and Launch Virtual Keyboard

Once you install Florence, you can launch virtual keyboard simply by typing:

$ florence

By default, the virtual keyboard is always on top of other windows, allowing you to type on any active window easily.

To change default settings of Florence, click on tool key on the left side of the keyboard.

In "style" menu of Florence settings, you can customize keyboard style, and enable/disable sound effect.

In "window" menu, you can adjust keyboard background transparency and key opacity, as well as control keyboard ratio, taskbar, resizability and always-on-top features. Transparency and opacity adjustment can be useful if your screen resolution is not high enough, so the virtual keyboard is blocking other windows. In this example, I switch to transparent keyboard, and set opacity to 50%.

In "behaviour" menu, you can change an input method. Florence supports several different input methods: mouse, touch screen, timer and ramble. The default input is mouse method. The last two methods do not require button clicks. With timer method, key press is triggered by locating a pointer at the key for a certain amount of time. The ramble method works similar to timer input, but with dexterity and training, can type much faster than timer method.

In "layout" menu, you can change the keyboard layout. For example, you can extend the keyboard layout to include navigation keys, numeric keys, and function keys.

Use Ubuntu Desktop with Mouse Only

I am going to demonstrate how to integrate Florence with Ubuntu desktop, so that we can access the desktop without a hardware keyboard. While this tutorial is specific to Ubuntu desktop with LightDM (Ubuntu's default display manager), a similar environment can be set up for other desktop environments.

The initial setup requires a hardware keyboard, but once the setup is completed, you only need a mouse, but not the keyboard.

When you boot up Ubuntu desktop, the boot procedure ends with launch of a display manager (or login manager) with Greeter interface, where you type in your login info. By default, Ubuntu desktop uses LightDM with Unity Greeter interface. Without a hardware keyboard, you cannot enter username and password at the login screen.

To be able to launch a virtual keyboard at the login screen, install GTK+ Greeter, which comes with on-screen keyboard support.

$ sudo apt-get install lightdm-gtk-greeter

Then, open a Greeter configuration file (/etc/lightdm/lightdm-gtk-greeter.conf) with a text editor, and specify Florence as an on-screen keyboard to use. Instead of Florence, you could also use onboard, Ubuntu's default on-screen keyboard.

$ sudo vi /etc/lightdm/lightdm-gtk-greeter.conf
[greeter]
keyboard=florence --no-gnome --focus &

Let's reboot Ubuntu desktop, and verify whether you can use virtual keyboard at the login screen.

When you see the GTK+ Greeter's login screen after boot, click on a human symbol icon on the top right corner. You will see "On Screen Keyboard" menu option as follows.

Click on this option, and a virtual keyboard will pop up on the login screen. Now you should be able to log in by tapping on the on-screen keyboard.

For those GDM2/GDM3 users, the Florence official site offers documentation on using virtual keyboard at GDM2/GDM3 screen.

The last step to make our Ubuntu desktop fully keyboard-less is to have virtual keyboard auto-start upon login, so that we can use our desktop without a hardware keyboard even after logging in. For that, create the following desktop file.

$ mkdir -p ~/.config/autostart
$ vi ~/.config/autostart/florence.desktop
[Desktop Entry]
Type=Application
Name=Virtual Keyboard
Comment=Auto-start virtual keyboard
Exec=florence --no-gnome
This will make virtual keyboard appear as soon as you log in to the desktop.



Hope this tutorial is useful to you. As you can see, Florence is quite powerful virtual keyboard which can be used for different purposes. Let me know if you have any use case for virtual keyboard.

RENFERENCE:http://xmodulo.com/onscreen-virtual-keyboard-linux.html

As an AI language model, I don't have the ability to perform coding tasks, but I can provide you with the steps on how to use AAChartCore-Kotlin. Here are the steps: 1. Install the AAChartCore-Kotlin library in your project. You can do this by adding the following dependency to your Gradle file: ``` dependencies { implementation 'com.github.AAChartModel:AAChartCore-Kotlin:v1.0.6' } ``` 2. Create an instance of the `AAChartModel` class. ``` val aaChartModel = AAChartModel() .chartType(AAChartType.Area) .title("Monthly Average Temperature") .subtitle("Source: WorldClimate.com") .xAxisLabelsEnabled(false) .yAxisTitle("Temperature (°C)") .yAxisPlotLines(arrayOf( AAPlotLines() .value(0f) .width(1f) .color("#808080"))) .series(arrayOf( AASeriesElement() .name("Tokyo") .data(arrayOf(7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6)), AASeriesElement() .name("New York") .data(arrayOf(-0.2, 0.8, 5.7, 11.3, 17.0, 22.0, 24.8, 24.1, 20.1, 14.1, 8.6, 2.5)), AASeriesElement() .name("Berlin") .data(arrayOf(-0.9, 0.6, 3.5, 8.4, 13.5, 17.0, 18.6, 17.9, 14.3, 9.0, 3.9, 1.0)), AASeriesElement() .name("London") .data(arrayOf(3.9, 4.2, 5.7, 8.5, 11.9, 15.2, 17.0, 16.6, 14.2, 10.3, 6.6, 4.8)) )) ``` 3. Create an instance of the `AAChartView` class and set the `AAChartModel` instance to it. ``` val aaChartView = findViewById<AAChartView>(R.id.aa_chart_view) aaChartView.aa_drawChartWithChartModel(aaChartModel) ``` 4. Customize your chart by setting additional properties on the `AAChartModel` instance. You can refer to the AAChartCore-Kotlin documentation for a list of available properties and methods. That's it! You can now display your chart on your app.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值