Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--pen-devices

What does --pen-devices do?

Tells chrome to interpret events from these devices as pen events. Only available with XInput 2 (i.e. X server 1.8 or above). The id's of the devices can be retrieved from 'xinput list'.

Usage

CLILaunch Chrome with --pen-devices using CLI

chrome --pen-devices

PuppeteerLaunch Chrome with --pen-devices using Puppeteer

const browser = await puppeteer.launch({
  args: ['--pen-devices']
});

PlaywrightLaunch Chrome with --pen-devices using Playwright

const browser = await chromium.launch({
  args: ['--pen-devices']
});

SeleniumLaunch Chrome with --pen-devices using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--pen-devices')

driver = webdriver.Chrome(options=options)

Build Conditions

LINUX || IS_CHROMEOS