summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kbdcontrol/lex.l
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1998-01-07 08:43:28 +0000
committeryokota <yokota@FreeBSD.org>1998-01-07 08:43:28 +0000
commitad126593f875cc82ace7ff78b0fb97241b139ddb (patch)
tree1ccae3e0699d7a41f9872342214beb8aca440cd1 /usr.sbin/kbdcontrol/lex.l
parent3ed12c01d2398d8d3ced2e1ca6f32826a72a870f (diff)
downloadFreeBSD-src-ad126593f875cc82ace7ff78b0fb97241b139ddb.zip
FreeBSD-src-ad126593f875cc82ace7ff78b0fb97241b139ddb.tar.gz
Added accent (dead) key support to syscons and kbdcontrol.
With a keymap with accent key definitions loaded to syscons, you press an accent key followed by a regular letter key to produce an accented letter. Press an accent key followed by the space bar to get the accent letter itself. Code is based on the ideas and work by jmrueda@diatel.upm.es and totii@est.is. PR: i386/4016 - Added keywords for accent (dead) keys: dgra, dacu, dcir, dtil... - Recognize accent map definitions. <accent_map_definition> ::= <accent_key_name> <accent_char> <accent_map> <accent_key_name> ::= dgra | dacu | dcir | dtil | dmac | dbre | ddot | duml | dsla | drin | dced | dapo | ddac | dogo | dcar <accent_map> ::= <map_entry> | <map_entry> <accent_map> <map_entry> ::= ( <regular_letter_char> <accented_char> ) - Use ioctls PIO_DEADKEYMAP and GIO_DEADKEYMAP to set and get the accent key map table in syscons. - Made the output for the -L option more intelligible and look like initializers in kbdtables.h. - Reorganized print functions in order to print the accent key map.
Diffstat (limited to 'usr.sbin/kbdcontrol/lex.l')
-rw-r--r--usr.sbin/kbdcontrol/lex.l20
1 files changed, 19 insertions, 1 deletions
diff --git a/usr.sbin/kbdcontrol/lex.l b/usr.sbin/kbdcontrol/lex.l
index 8b1d3b8..3680d0f 100644
--- a/usr.sbin/kbdcontrol/lex.l
+++ b/usr.sbin/kbdcontrol/lex.l
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id$
+ * $Id: lex.l,v 1.5 1997/02/22 16:05:58 peter Exp $
*/
%{
@@ -95,6 +95,23 @@ NS|ns { number = 31; return TNUM; }
SP|sp { number = 32; return TNUM; }
DEL|del { number = 127; return TNUM; }
+dgra|DGRA { number = 0; return TACC; }
+dacu|DACU { number = 1; return TACC; }
+dcir|DCIR { number = 2; return TACC; }
+dtil|DTIL { number = 3; return TACC; }
+dmac|DMAC { number = 4; return TACC; }
+dbre|DBRE { number = 5; return TACC; }
+ddot|DDOT { number = 6; return TACC; }
+duml|DUML { number = 7; return TACC; }
+ddia|DDIA { number = 7; return TACC; }
+dsla|DSLA { number = 8; return TACC; }
+drin|DRIN { number = 9; return TACC; }
+dced|DCED { number = 10; return TACC; }
+dapo|DAPO { number = 11; return TACC; }
+ddac|DDAC { number = 12; return TACC; }
+dogo|DOGO { number = 13; return TACC; }
+dcar|DCAR { number = 14; return TACC; }
+
fkey{D}({D}*) {
sscanf(yytext+4, "%d", &number);
return TFUNC;
@@ -115,3 +132,4 @@ scr{D}({D}*) {
return TFLAG;
}
[ \t\n] { /* ignore */ }
+. { return *yytext; }
OpenPOWER on IntegriCloud