public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* setkeycodes, sysrq, and USB keyboard
@ 2005-07-04 21:43 federico
  2005-07-04 22:05 ` Vojtech Pavlik
  2005-07-05 15:27 ` setkeycodes (KDSETKEYCODE: Invalid argument) Dominik Karall
  0 siblings, 2 replies; 4+ messages in thread
From: federico @ 2005-07-04 21:43 UTC (permalink / raw)
  To: linux-kernel

hi all,

i have a problem: i got a white Apple usb keyboard, but this keyboard
doesn't have PrintScr nor SysRq.
i read in Documentation/sysrq.txt how to change the SYSRQ scancode.
i launched showkey and acknowledged that R_Alt+F13 is 100,183 => 64b7.
i ran

 # setkeycodes 64b7 84
KDSETKEYCODE: No such device
failed to set scancode b7 to keycode 84

i'm on a gentoo-vanilla 2.6.13_rc1 with kbd-1.12-r5. (or on
2.6.11-gentoo-r9 which produces the same result)

here's some relevant output from strace:

open("/dev/tty", O_RDWR) = 3
ioctl(3, KDGKBTYPE, 0xbffdfcb7) = 0
ioctl(3, KDSETKEYCODE, 0xbffdfd20) = -1 ENODEV (No such device)
dup(2) = 4
fcntl64(4, F_GETFL) = 0x8001 (flags O_WRONLY|O_LARGEFILE)
close(4) = 0
...
write(2, "KDSETKEYCODE: No such device\n", 29KDSETKEYCODE: No such device
) = 29
...
write(2, "failed to set scancode 64b7 to k"..., 42failed to set scancode
64b7 to
keycode 84
) = 42

if anyone has a possible solution i really appreciate.
ciao!

-- 
Federico

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

* Re: setkeycodes, sysrq, and USB keyboard
  2005-07-04 21:43 setkeycodes, sysrq, and USB keyboard federico
@ 2005-07-04 22:05 ` Vojtech Pavlik
  2005-07-05  9:21   ` federico
  2005-07-05 15:27 ` setkeycodes (KDSETKEYCODE: Invalid argument) Dominik Karall
  1 sibling, 1 reply; 4+ messages in thread
From: Vojtech Pavlik @ 2005-07-04 22:05 UTC (permalink / raw)
  To: federico; +Cc: linux-kernel

On Mon, Jul 04, 2005 at 11:43:03PM +0200, federico wrote:
> hi all,
> 
> i have a problem: i got a white Apple usb keyboard, but this keyboard
> doesn't have PrintScr nor SysRq.
> i read in Documentation/sysrq.txt how to change the SYSRQ scancode.
> i launched showkey and acknowledged that R_Alt+F13 is 100,183 => 64b7.
> i ran
> 
>  # setkeycodes 64b7 84
> KDSETKEYCODE: No such device
> failed to set scancode b7 to keycode 84
> 
> i'm on a gentoo-vanilla 2.6.13_rc1 with kbd-1.12-r5. (or on
> 2.6.11-gentoo-r9 which produces the same result)
> 
> here's some relevant output from strace:
> 
> open("/dev/tty", O_RDWR) = 3
> ioctl(3, KDGKBTYPE, 0xbffdfcb7) = 0
> ioctl(3, KDSETKEYCODE, 0xbffdfd20) = -1 ENODEV (No such device)
> dup(2) = 4
> fcntl64(4, F_GETFL) = 0x8001 (flags O_WRONLY|O_LARGEFILE)
> close(4) = 0
> ...
> write(2, "KDSETKEYCODE: No such device\n", 29KDSETKEYCODE: No such device
> ) = 29
> ...
> write(2, "failed to set scancode 64b7 to k"..., 42failed to set scancode
> 64b7 to
> keycode 84
> ) = 42
> 
> if anyone has a possible solution i really appreciate.
> ciao!
 
Sorry, you can't use 'setkeycodes' on USB keyboards. They don't use the
PS/2 protocol, and hence it doesn't make sense.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

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

* Re: setkeycodes, sysrq, and USB keyboard
  2005-07-04 22:05 ` Vojtech Pavlik
@ 2005-07-05  9:21   ` federico
  0 siblings, 0 replies; 4+ messages in thread
From: federico @ 2005-07-05  9:21 UTC (permalink / raw)
  To: linux-kernel

Vojtech Pavlik ha scritto:

>Sorry, you can't use 'setkeycodes' on USB keyboards. They don't use the
>PS/2 protocol, and hence it doesn't make sense.
>  
>
ouch! cannot push SysRq?!?
do I still need my PS/2 keyboard plugged in?

(that keyboard is terribly useful because it is a USB hub... but having
the need to plug a PS/2 keyboard whenever X locks up is a waste of
forces... and a waste of keyboards)

isn't there a workaround for this??
an option in the kernel .config to hardcode sysrq-scancodes would be
fine. sorry but i never look in the deep of the kernel. if you point me
to some branch of the kernel maybe i could hack it :9

ciao!

-- 
Federico


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

* Re: setkeycodes (KDSETKEYCODE: Invalid argument)
  2005-07-04 21:43 setkeycodes, sysrq, and USB keyboard federico
  2005-07-04 22:05 ` Vojtech Pavlik
@ 2005-07-05 15:27 ` Dominik Karall
  1 sibling, 0 replies; 4+ messages in thread
From: Dominik Karall @ 2005-07-05 15:27 UTC (permalink / raw)
  To: federico; +Cc: linux-kernel

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

On Monday 04 July 2005 23:43, federico wrote:
> hi all,
>
> i have a problem: i got a white Apple usb keyboard, but this keyboard
> doesn't have PrintScr nor SysRq.
> i read in Documentation/sysrq.txt how to change the SYSRQ scancode.
> i launched showkey and acknowledged that R_Alt+F13 is 100,183 => 64b7.
> i ran
>
>  # setkeycodes 64b7 84
> KDSETKEYCODE: No such device
> failed to set scancode b7 to keycode 84
>
> i'm on a gentoo-vanilla 2.6.13_rc1 with kbd-1.12-r5. (or on
> 2.6.11-gentoo-r9 which produces the same result)
>
> here's some relevant output from strace:
>
> open("/dev/tty", O_RDWR) = 3
> ioctl(3, KDGKBTYPE, 0xbffdfcb7) = 0
> ioctl(3, KDSETKEYCODE, 0xbffdfd20) = -1 ENODEV (No such device)
> dup(2) = 4
> fcntl64(4, F_GETFL) = 0x8001 (flags O_WRONLY|O_LARGEFILE)
> close(4) = 0
> ...
> write(2, "KDSETKEYCODE: No such device\n", 29KDSETKEYCODE: No such device
> ) = 29
> ...
> write(2, "failed to set scancode 64b7 to k"..., 42failed to set scancode
> 64b7 to
> keycode 84
> ) = 42

Does setkeycode work with current kernels? When I try to set a keycode, I 
always get following error:

dominik@box # LANG="C" setkeycodes e03e 84
KDSETKEYCODE: Invalid argument
failed to set scancode be to keycode 84

but my dmesg output tells me, that this should be ok:
atkbd.c: Unknown key released (translated set 2, code 0xbe on isa0060/serio0).
atkbd.c: Use 'setkeycodes e03e <keycode>' to make it known.

so, is the output from atkbd.c wrong, or does setkeycodes work in the wrong 
way?

cheers,
dominik

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

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

end of thread, other threads:[~2005-07-05 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-04 21:43 setkeycodes, sysrq, and USB keyboard federico
2005-07-04 22:05 ` Vojtech Pavlik
2005-07-05  9:21   ` federico
2005-07-05 15:27 ` setkeycodes (KDSETKEYCODE: Invalid argument) Dominik Karall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox