Linux console tools development discussion
 help / color / mirror / Atom feed
* [kbd] U+f000 and above
@ 2008-11-09 12:42 Michael Schutte
  2008-11-10 14:54 ` Alexey Gladkov
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Schutte @ 2008-11-09 12:42 UTC (permalink / raw)
  To: kbd

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

Alexey,

Do you agree with me that it would make sense to make loadkeys fail (or
at least warn the user) on U+xxxx keysym specifications >= 0xf000?
Currently, these will simply be seen by the kernel as non-Unicode syms,
which is confusing at best.

As far as I can tell, there are no widespread keymap files which use
this feature.

Cheers,
-- 
Michael Schutte <michi@uiae.at>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbd] U+f000 and above
  2008-11-09 12:42 [kbd] U+f000 and above Michael Schutte
@ 2008-11-10 14:54 ` Alexey Gladkov
  2008-11-12 16:04   ` Michael Schutte
  0 siblings, 1 reply; 4+ messages in thread
From: Alexey Gladkov @ 2008-11-10 14:54 UTC (permalink / raw)
  To: kbd

Michael Schutte wrote:
> Alexey,
> 
> Do you agree with me that it would make sense to make loadkeys fail (or
> at least warn the user) on U+xxxx keysym specifications >= 0xf000?

I agree. This is a good idea.

-- 
Rgrds, legion


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbd] U+f000 and above
  2008-11-10 14:54 ` Alexey Gladkov
@ 2008-11-12 16:04   ` Michael Schutte
  2008-11-18 14:55     ` Alexey Gladkov
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Schutte @ 2008-11-12 16:04 UTC (permalink / raw)
  To: Linux console tools development discussion

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

On Mon, Nov 10, 2008 at 05:54:52PM +0300, Alexey Gladkov wrote:
>> Do you agree with me that it would make sense to make loadkeys fail (or
>> at least warn the user) on U+xxxx keysym specifications >= 0xf000?
>
> I agree. This is a good idea.

Okay then, this does the trick:

diff --git a/src/analyze.l b/src/analyze.l
index f55c676..392c9aa 100644
--- a/src/analyze.l
+++ b/src/analyze.l
@@ -90,7 +90,7 @@ To                      to|To|TO
 \-                     {return(DASH);}
 \,                     {return(COMMA);}
 \+                     {return(PLUS);}
-{Unicode}              {yylval=strtol(yytext+1,NULL,16);return(UNUMBER);}
+{Unicode}              {yylval=strtol(yytext+1,NULL,16);if(yylval>=0xf000)lkfatal1("unicode keysym out of range: %s",yytext);return(UNUMBER);}
 {Decimal}|{Octal}|{Hex}        {yylval=strtol(yytext,NULL,0);return(NUMBER);}
 <RVALUE>{Literal}      {return((yylval=ksymtocode(yytext))==-1?ERROR:LITERAL);}

Sorry for the ugliness, I just sticked to the prevailing coding style in
analyze.l.  Re-format as you wish :-)

-- 
Michael Schutte <michi@uiae.at>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [kbd] U+f000 and above
  2008-11-12 16:04   ` Michael Schutte
@ 2008-11-18 14:55     ` Alexey Gladkov
  0 siblings, 0 replies; 4+ messages in thread
From: Alexey Gladkov @ 2008-11-18 14:55 UTC (permalink / raw)
  To: Linux console tools development discussion

Michael Schutte wrote:
> Sorry for the ugliness, I just sticked to the prevailing coding style in
> analyze.l.  Re-format as you wish :-)

Applied, thanks!

-- 
Rgrds, legion


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-18 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-09 12:42 [kbd] U+f000 and above Michael Schutte
2008-11-10 14:54 ` Alexey Gladkov
2008-11-12 16:04   ` Michael Schutte
2008-11-18 14:55     ` Alexey Gladkov

Linux console tools development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \
		kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com
	public-inbox-index kbd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.kbd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git