我有一个我不太了解的“神秘盒子”。我需要让Leonardo在BIOS设置中与盒子配合使用。我从GitHub(https://github.com/gdsports/usb-metamorph/tree/master/USBSerPassThruLine)下载了USBSerPassThruLine项目,该项目似乎可以与人类已知的所有BIOS设置一起使用,除了我的特殊包装盒。
每个按键都伴随一个隐式SHIFT。因此,如果我呼叫Keyboard.press('a'),我会得到'A'。 或者对于Keyboard.press('3')我得到'#'。
我尝试使用自己的简单press()例程尽可能直接:
The files belonging to this database system will be owned by user “postgres”.
This user must also own the server process.
The database cluster will be initialized with locale “en_US.utf8”.
The default database encoding has accordingly been set to “UTF8”.
The default text search configuration will be set to “english”.
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers … 128MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
running bootstrap script … ok
performing post-bootstrap initialization … ok
syncing data to disk … ok
WARNING: enabling “trust” authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
–auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start…2019-03-14 19:54:02.964 UTC [41] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”
2019-03-14 19:54:03.038 UTC [42] LOG: database system was shut down at 2019-03-14 19:53:59 UTC
2019-03-14 19:54:03.069 UTC [41] LOG: database system is ready to accept connections
done
server started
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
2019-03-14 19:54:03.147 UTC [41] LOG: received fast shutdown request
waiting for server to shut down…2019-03-14 19:54:03.150 UTC [41] LOG: aborting any active transactions
2019-03-14 19:54:03.152 UTC [41] LOG: background worker “logical replication launcher” (PID 48) exited with exit code 1
2019-03-14 19:54:03.156 UTC [43] LOG: shutting down
.2019-03-14 19:54:03.200 UTC [41] LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
2019-03-14 19:54:03.287 UTC [1] LOG: listening on IPv4 address “0.0.0.0”, port 5432
2019-03-14 19:54:03.287 UTC [1] LOG: listening on IPv6 address “::”, port 5432
2019-03-14 19:54:03.293 UTC [1] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”
2019-03-14 19:54:03.366 UTC [50] LOG: database system was shut down at 2019-03-14 19:54:03 UTC
2019-03-14 19:54:03.394 UTC [1] LOG: database system is ready to accept connections
2019-03-14 19:54:56.209 UTC [58] ERROR: relation “public.databasechangeloglock” does not exist at character 22
2019-03-14 19:54:56.209 UTC [58] STATEMENT: SELECT COUNT(*) FROM public.databasechangeloglock
全部无济于事。
我仍然得到:'!@#$%^'(而不是'123456')
有什么想法吗?
顺便说一句,扼杀的是,此BIOS设置适用于我插入包装盒的任何USB键盘。这个盒子可以使用一些较旧的标准吗?
答案 0 :(得分:0)
必须添加它才能使其正常工作:
if (first_time) {
first_time = 0;
memset(&rawdata, 0x0, sizeof(KeyReport));
rawdata.keys[0] = KEY_CAPSLOCK;
sendReport(&rawdata);
releaseAll();
delay(100);
rawdata.keys[0] = KEY_CAPSLOCK;
sendReport(&rawdata);
releaseAll();
delay(100);
rawdata.keys[0] = KEY_LEFTSHIFT;
sendReport(&rawdata);
releaseAll();
delay(100);
}
为什么这样有效?谁知道?
顺便说一句,这有零个东西来做Arduino开发板,以及所有与这个p.o.s有关的事情。框。