I am trying to modify Chromium browser's behavior in Chromium OS.
When I execute Chromium browser, I can handover arguments with '--enable-features=' flag.
And I found a argument (#enable-virtual-keyboard) from Available list in chrome://flags
.
Then I executed Chromium browser like below.
example instruction # /opt/google/chrome/chrome --incognito --enable-features=enable-virtual-keyboard
And when I check the flags in chrome://version
, I could see the arguments.
Command Line: /opt/google/chrome/chrome --blahblah --enable-features=enable-virtual-keyboard
But actually the virtual keyboard is not working.
When I enable the argument (virtual keyboard) from chrome://flags
manually. It works well and I could see the Virtual Keyboard.
What is wrong? I would appreciate it if you guys advise me.
--enable-features
actually takes the name of a feature, not the name of a flag. The Chromium documentation explains the difference, but to simplify somewhat, a flag is sort of a user-visible interface to a feature or a command-line switch.Anyway, to do what you want, you need to find out what feature or command-line switch the
enable-virtual-keyboard
flag toggles. Searching forenable-virtual-keyboard
in Chromium Code Search brings us to these lines in about_flags.cc:That last line tells us what we're looking for: that this flag is actually backed by a command-line switch, not a feature. Clicking on
kEnableVirtualKeyboard
shows us its definition:So, adding
--enable-virtual-keyboard
to your command line should have the same effect as flipping the flag. (I should note, though, that there are a number of things that can break the virtual keyboard, so you may have to do other things to get it working.)For the sake of completeness, if you'd found that it was actually backed by a feature, like the
gesture-properties-dbus-service
flag, for example:Then clicking
kGesturePropertiesDBusService
takes us to its definition which specifies the feature name:...so in that case you'd pass
--enable-features=GesturePropertiesDBusService
to enable the flag from your command line.