Commit 278d72ae authored by Max Asbock's avatar Max Asbock Committed by Linus Torvalds

[PATCH] ibmasm driver: redesign handling of remote control events

This patch rewrites the handling of remote control events.  Rather than making
them available from a special file in the ibmasmfs, now the events from the
RSA card get translated into kernel input events and injected into the input
subsystem.  The driver now will generate two /dev/input/eventX nodes -- one
for the keyboard and one for the mouse.  The mouse node generates absolute
events more like a touch pad than a mouse.
Signed-off-by: default avatarVernon Mauery <vernux@us.ibm.com>
Signed-off-by: default avatarMax Asbock <masbock@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b8acb808
...@@ -34,16 +34,31 @@ ...@@ -34,16 +34,31 @@
#include <linux/version.h> #include <linux/version.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/input.h>
/* Driver identification */ /* Driver identification */
#define DRIVER_NAME "ibmasm" #define DRIVER_NAME "ibmasm"
#define DRIVER_VERSION "0.4" #define DRIVER_VERSION "1.0"
#define DRIVER_AUTHOR "Max Asbock" #define DRIVER_AUTHOR "Max Asbock <masbock@us.ibm.com>, Vernon Mauery <vernux@us.ibm.com>"
#define DRIVER_DESC "IBM ASM Service Processor Driver" #define DRIVER_DESC "IBM ASM Service Processor Driver"
#define err(msg) printk(KERN_ERR "%s: " msg "\n", DRIVER_NAME) #define err(msg) printk(KERN_ERR "%s: " msg "\n", DRIVER_NAME)
#define info(msg) printk(KERN_INFO "%s: " msg "\n", DRIVER_NAME) #define info(msg) printk(KERN_INFO "%s: " msg "\n", DRIVER_NAME)
extern int ibmasm_debug;
#define dbg(STR, ARGS...) \
do { \
if (ibmasm_debug) \
printk(KERN_DEBUG STR , ##ARGS); \
} while (0)
static inline char *get_timestamp(char *buf)
{
struct timeval now;
do_gettimeofday(&now);
sprintf(buf, "%lu.%lu", now.tv_sec, now.tv_usec);
return buf;
}
#define IBMASM_CMD_PENDING 0 #define IBMASM_CMD_PENDING 0
#define IBMASM_CMD_COMPLETE 1 #define IBMASM_CMD_COMPLETE 1
...@@ -121,41 +136,11 @@ struct reverse_heartbeat { ...@@ -121,41 +136,11 @@ struct reverse_heartbeat {
unsigned int stopped; unsigned int stopped;
}; };
struct ibmasm_remote {
/* remote console events */ struct input_dev keybd_dev;
struct mouse_event { struct input_dev mouse_dev;
long x;
long y;
unsigned char buttons;
unsigned char transitions;
}; };
struct keyboard_event {
unsigned long key_code;
unsigned char key_down;
};
struct remote_event {
unsigned long type;
union {
struct mouse_event mouse;
struct keyboard_event keyboard;
} data;
};
#define DRIVER_REMOTE_QUEUE_SIZE 240
struct remote_queue {
struct remote_event *start;
struct remote_event *end;
struct remote_event *reader;
struct remote_event *writer;
unsigned int size;
int open;
wait_queue_head_t wait;
};
struct service_processor { struct service_processor {
struct list_head node; struct list_head node;
spinlock_t lock; spinlock_t lock;
...@@ -168,7 +153,7 @@ struct service_processor { ...@@ -168,7 +153,7 @@ struct service_processor {
char dirname[IBMASM_NAME_SIZE]; char dirname[IBMASM_NAME_SIZE];
char devname[IBMASM_NAME_SIZE]; char devname[IBMASM_NAME_SIZE];
unsigned int number; unsigned int number;
struct remote_queue remote_queue; struct ibmasm_remote *remote;
int serial_line; int serial_line;
struct device *dev; struct device *dev;
}; };
...@@ -210,11 +195,9 @@ extern int ibmasm_send_i2o_message(struct service_processor *sp); ...@@ -210,11 +195,9 @@ extern int ibmasm_send_i2o_message(struct service_processor *sp);
extern irqreturn_t ibmasm_interrupt_handler(int irq, void * dev_id, struct pt_regs *regs); extern irqreturn_t ibmasm_interrupt_handler(int irq, void * dev_id, struct pt_regs *regs);
/* remote console */ /* remote console */
extern void ibmasm_handle_mouse_interrupt(struct service_processor *sp); extern void ibmasm_handle_mouse_interrupt(struct service_processor *sp, struct pt_regs *regs);
extern int ibmasm_init_remote_queue(struct service_processor *sp); extern int ibmasm_init_remote_input_dev(struct service_processor *sp);
extern void ibmasm_free_remote_queue(struct service_processor *sp); extern void ibmasm_free_remote_input_dev(struct service_processor *sp);
extern void ibmasm_advance_reader(struct remote_queue *q, unsigned int n);
extern size_t ibmasm_events_available(struct remote_queue *q);
/* file system */ /* file system */
extern int ibmasmfs_register(void); extern int ibmasmfs_register(void);
......
...@@ -37,9 +37,7 @@ ...@@ -37,9 +37,7 @@
* | |-- event * | |-- event
* | |-- reverse_heartbeat * | |-- reverse_heartbeat
* | `-- remote_video * | `-- remote_video
* | |-- connected
* | |-- depth * | |-- depth
* | |-- events
* | |-- height * | |-- height
* | `-- width * | `-- width
* . * .
...@@ -50,9 +48,7 @@ ...@@ -50,9 +48,7 @@
* |-- event * |-- event
* |-- reverse_heartbeat * |-- reverse_heartbeat
* `-- remote_video * `-- remote_video
* |-- connected
* |-- depth * |-- depth
* |-- events
* |-- height * |-- height
* `-- width * `-- width
* *
...@@ -75,14 +71,6 @@ ...@@ -75,14 +71,6 @@
* remote_video/width: control remote display settings * remote_video/width: control remote display settings
* write: set value * write: set value
* read: read value * read: read value
*
* remote_video/connected
* read: return "1" if web browser VNC java applet is connected,
* "0" otherwise
*
* remote_video/events
* read: sleep until a remote mouse or keyboard event occurs, then return
* then event.
*/ */
#include <linux/fs.h> #include <linux/fs.h>
...@@ -593,75 +581,6 @@ static ssize_t remote_settings_file_write(struct file *file, const char __user * ...@@ -593,75 +581,6 @@ static ssize_t remote_settings_file_write(struct file *file, const char __user *
return count; return count;
} }
static int remote_event_file_open(struct inode *inode, struct file *file)
{
struct service_processor *sp;
unsigned long flags;
struct remote_queue *q;
file->private_data = inode->u.generic_ip;
sp = file->private_data;
q = &sp->remote_queue;
/* allow only one event reader */
spin_lock_irqsave(&sp->lock, flags);
if (q->open) {
spin_unlock_irqrestore(&sp->lock, flags);
return -EBUSY;
}
q->open = 1;
spin_unlock_irqrestore(&sp->lock, flags);
enable_mouse_interrupts(sp);
return 0;
}
static int remote_event_file_close(struct inode *inode, struct file *file)
{
struct service_processor *sp = file->private_data;
disable_mouse_interrupts(sp);
wake_up_interruptible(&sp->remote_queue.wait);
sp->remote_queue.open = 0;
return 0;
}
static ssize_t remote_event_file_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
{
struct service_processor *sp = file->private_data;
struct remote_queue *q = &sp->remote_queue;
size_t data_size;
struct remote_event *reader = q->reader;
size_t num_events;
if (*offset < 0)
return -EINVAL;
if (count == 0 || count > 1024)
return 0;
if (*offset != 0)
return 0;
if (wait_event_interruptible(q->wait, q->reader != q->writer))
return -ERESTARTSYS;
/* only get multiples of struct remote_event */
num_events = min((count/sizeof(struct remote_event)), ibmasm_events_available(q));
if (!num_events)
return 0;
data_size = num_events * sizeof(struct remote_event);
if (copy_to_user(buf, reader, data_size))
return -EFAULT;
ibmasm_advance_reader(q, num_events);
return data_size;
}
static struct file_operations command_fops = { static struct file_operations command_fops = {
.open = command_file_open, .open = command_file_open,
.release = command_file_close, .release = command_file_close,
...@@ -690,12 +609,6 @@ static struct file_operations remote_settings_fops = { ...@@ -690,12 +609,6 @@ static struct file_operations remote_settings_fops = {
.write = remote_settings_file_write, .write = remote_settings_file_write,
}; };
static struct file_operations remote_event_fops = {
.open = remote_event_file_open,
.release = remote_event_file_close,
.read = remote_event_file_read,
};
static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root) static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root)
{ {
...@@ -721,7 +634,5 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root) ...@@ -721,7 +634,5 @@ static void ibmasmfs_create_files (struct super_block *sb, struct dentry *root)
ibmasmfs_create_file(sb, remote_dir, "width", &remote_settings_fops, (void *)display_width(sp), S_IRUSR|S_IWUSR); ibmasmfs_create_file(sb, remote_dir, "width", &remote_settings_fops, (void *)display_width(sp), S_IRUSR|S_IWUSR);
ibmasmfs_create_file(sb, remote_dir, "height", &remote_settings_fops, (void *)display_height(sp), S_IRUSR|S_IWUSR); ibmasmfs_create_file(sb, remote_dir, "height", &remote_settings_fops, (void *)display_height(sp), S_IRUSR|S_IWUSR);
ibmasmfs_create_file(sb, remote_dir, "depth", &remote_settings_fops, (void *)display_depth(sp), S_IRUSR|S_IWUSR); ibmasmfs_create_file(sb, remote_dir, "depth", &remote_settings_fops, (void *)display_depth(sp), S_IRUSR|S_IWUSR);
ibmasmfs_create_file(sb, remote_dir, "connected", &remote_settings_fops, (void *)vnc_status(sp), S_IRUSR);
ibmasmfs_create_file(sb, remote_dir, "events", &remote_event_fops, (void *)sp, S_IRUSR);
} }
} }
...@@ -46,8 +46,8 @@ int ibmasm_send_i2o_message(struct service_processor *sp) ...@@ -46,8 +46,8 @@ int ibmasm_send_i2o_message(struct service_processor *sp)
message = get_i2o_message(sp->base_address, mfa); message = get_i2o_message(sp->base_address, mfa);
memcpy(&message->header, &header, sizeof(struct i2o_header)); memcpy_toio(&message->header, &header, sizeof(struct i2o_header));
memcpy(&message->data, command->buffer, command_size); memcpy_toio(&message->data, command->buffer, command_size);
set_mfa_inbound(sp->base_address, mfa); set_mfa_inbound(sp->base_address, mfa);
...@@ -59,23 +59,27 @@ irqreturn_t ibmasm_interrupt_handler(int irq, void * dev_id, struct pt_regs *reg ...@@ -59,23 +59,27 @@ irqreturn_t ibmasm_interrupt_handler(int irq, void * dev_id, struct pt_regs *reg
u32 mfa; u32 mfa;
struct service_processor *sp = (struct service_processor *)dev_id; struct service_processor *sp = (struct service_processor *)dev_id;
void __iomem *base_address = sp->base_address; void __iomem *base_address = sp->base_address;
char tsbuf[32];
if (!sp_interrupt_pending(base_address)) if (!sp_interrupt_pending(base_address))
return IRQ_NONE; return IRQ_NONE;
dbg("respond to interrupt at %s\n", get_timestamp(tsbuf));
if (mouse_interrupt_pending(sp)) { if (mouse_interrupt_pending(sp)) {
ibmasm_handle_mouse_interrupt(sp); ibmasm_handle_mouse_interrupt(sp, regs);
mfa = get_mfa_outbound(base_address);
clear_mouse_interrupt(sp); clear_mouse_interrupt(sp);
set_mfa_outbound(base_address, mfa);
return IRQ_HANDLED;
} }
mfa = get_mfa_outbound(base_address); mfa = get_mfa_outbound(base_address);
if (valid_mfa(mfa)) { if (valid_mfa(mfa)) {
struct i2o_message *msg = get_i2o_message(base_address, mfa); struct i2o_message *msg = get_i2o_message(base_address, mfa);
ibmasm_receive_message(sp, &msg->data, incoming_data_size(msg)); ibmasm_receive_message(sp, &msg->data, incoming_data_size(msg));
} } else
dbg("didn't get a valid MFA\n");
set_mfa_outbound(base_address, mfa); set_mfa_outbound(base_address, mfa);
dbg("finished interrupt at %s\n", get_timestamp(tsbuf));
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -56,17 +56,26 @@ ...@@ -56,17 +56,26 @@
#include "lowlevel.h" #include "lowlevel.h"
#include "remote.h" #include "remote.h"
int ibmasm_debug = 0;
module_param(ibmasm_debug, int , S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(ibmasm_debug, " Set debug mode on or off");
static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id) static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
{ {
int err, result = -ENOMEM; int result;
struct service_processor *sp; struct service_processor *sp;
if ((err = pci_enable_device(pdev))) { if ((result = pci_enable_device(pdev))) {
printk(KERN_ERR "%s: can't enable PCI device at %s\n", dev_err(&pdev->dev, "Failed to enable PCI device\n");
DRIVER_NAME, pci_name(pdev)); return result;
return err;
} }
if ((result = pci_request_regions(pdev, DRIVER_NAME))) {
dev_err(&pdev->dev, "Failed to allocate PCI resources\n");
goto error_resources;
}
/* vnc client won't work without bus-mastering */
pci_set_master(pdev);
sp = kmalloc(sizeof(struct service_processor), GFP_KERNEL); sp = kmalloc(sizeof(struct service_processor), GFP_KERNEL);
if (sp == NULL) { if (sp == NULL) {
...@@ -76,6 +85,9 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi ...@@ -76,6 +85,9 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi
} }
memset(sp, 0, sizeof(struct service_processor)); memset(sp, 0, sizeof(struct service_processor));
sp->lock = SPIN_LOCK_UNLOCKED;
INIT_LIST_HEAD(&sp->command_queue);
pci_set_drvdata(pdev, (void *)sp); pci_set_drvdata(pdev, (void *)sp);
sp->dev = &pdev->dev; sp->dev = &pdev->dev;
sp->number = pdev->bus->number; sp->number = pdev->bus->number;
...@@ -101,15 +113,6 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi ...@@ -101,15 +113,6 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi
goto error_ioremap; goto error_ioremap;
} }
result = ibmasm_init_remote_queue(sp);
if (result) {
dev_err(sp->dev, "Failed to initialize remote queue\n");
goto error_remote_queue;
}
spin_lock_init(&sp->lock);
INIT_LIST_HEAD(&sp->command_queue);
result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp); result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp);
if (result) { if (result) {
dev_err(sp->dev, "Failed to register interrupt handler\n"); dev_err(sp->dev, "Failed to register interrupt handler\n");
...@@ -117,7 +120,12 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi ...@@ -117,7 +120,12 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi
} }
enable_sp_interrupts(sp->base_address); enable_sp_interrupts(sp->base_address);
disable_mouse_interrupts(sp);
result = ibmasm_init_remote_input_dev(sp);
if (result) {
dev_err(sp->dev, "Failed to initialize remote queue\n");
goto error_send_message;
}
result = ibmasm_send_driver_vpd(sp); result = ibmasm_send_driver_vpd(sp);
if (result) { if (result) {
...@@ -133,30 +141,25 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi ...@@ -133,30 +141,25 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi
ibmasm_register_uart(sp); ibmasm_register_uart(sp);
dev_printk(KERN_DEBUG, &pdev->dev, "WARNING: This software may not be supported or function\n");
dev_printk(KERN_DEBUG, &pdev->dev, "correctly on your IBM server. Please consult the IBM\n");
dev_printk(KERN_DEBUG, &pdev->dev, "ServerProven website\n");
dev_printk(KERN_DEBUG, &pdev->dev, "http://www.pc.ibm.com/ww/eserver/xseries/serverproven\n");
dev_printk(KERN_DEBUG, &pdev->dev, "for information on the specific driver level and support\n");
dev_printk(KERN_DEBUG, &pdev->dev, "statement for your IBM server.\n");
return 0; return 0;
error_send_message: error_send_message:
disable_sp_interrupts(sp->base_address); disable_sp_interrupts(sp->base_address);
ibmasm_free_remote_input_dev(sp);
free_irq(sp->irq, (void *)sp); free_irq(sp->irq, (void *)sp);
error_request_irq: error_request_irq:
ibmasm_free_remote_queue(sp);
error_remote_queue:
iounmap(sp->base_address); iounmap(sp->base_address);
error_ioremap: error_ioremap:
ibmasm_heartbeat_exit(sp); ibmasm_heartbeat_exit(sp);
error_heartbeat: error_heartbeat:
ibmasm_event_buffer_exit(sp); ibmasm_event_buffer_exit(sp);
error_eventbuffer: error_eventbuffer:
pci_set_drvdata(pdev, NULL);
kfree(sp); kfree(sp);
error_kmalloc: error_kmalloc:
pci_disable_device(pdev); pci_release_regions(pdev);
error_resources:
pci_disable_device(pdev);
return result; return result;
} }
...@@ -165,16 +168,24 @@ static void __devexit ibmasm_remove_one(struct pci_dev *pdev) ...@@ -165,16 +168,24 @@ static void __devexit ibmasm_remove_one(struct pci_dev *pdev)
{ {
struct service_processor *sp = (struct service_processor *)pci_get_drvdata(pdev); struct service_processor *sp = (struct service_processor *)pci_get_drvdata(pdev);
dbg("Unregistering UART\n");
ibmasm_unregister_uart(sp); ibmasm_unregister_uart(sp);
ibmasm_send_os_state(sp, SYSTEM_STATE_OS_DOWN); dbg("Sending OS down message\n");
if (ibmasm_send_os_state(sp, SYSTEM_STATE_OS_DOWN))
err("failed to get repsonse to 'Send OS State' command\n");
dbg("Disabling heartbeats\n");
ibmasm_heartbeat_exit(sp);
dbg("Disabling interrupts\n");
disable_sp_interrupts(sp->base_address); disable_sp_interrupts(sp->base_address);
disable_mouse_interrupts(sp); dbg("Freeing SP irq\n");
free_irq(sp->irq, (void *)sp); free_irq(sp->irq, (void *)sp);
ibmasm_heartbeat_exit(sp); dbg("Cleaning up\n");
ibmasm_free_remote_queue(sp); ibmasm_free_remote_input_dev(sp);
iounmap(sp->base_address); iounmap(sp->base_address);
ibmasm_event_buffer_exit(sp); ibmasm_event_buffer_exit(sp);
pci_set_drvdata(pdev, NULL);
kfree(sp); kfree(sp);
pci_release_regions(pdev);
pci_disable_device(pdev); pci_disable_device(pdev);
} }
......
This diff is collapsed.
...@@ -51,11 +51,13 @@ ...@@ -51,11 +51,13 @@
/* mouse button states received from SP */ /* mouse button states received from SP */
#define REMOTE_MOUSE_DOUBLE_CLICK 0xF0 #define REMOTE_DOUBLE_CLICK 0xF0
#define REMOTE_MOUSE_BUTTON_LEFT 0x01 #define REMOTE_BUTTON_LEFT 0x01
#define REMOTE_MOUSE_BUTTON_MIDDLE 0x02 #define REMOTE_BUTTON_MIDDLE 0x02
#define REMOTE_MOUSE_BUTTON_RIGHT 0x04 #define REMOTE_BUTTON_RIGHT 0x04
/* size of keysym/keycode translation matricies */
#define XLATE_SIZE 256
struct mouse_input { struct mouse_input {
unsigned short y; unsigned short y;
...@@ -83,11 +85,13 @@ struct remote_input { ...@@ -83,11 +85,13 @@ struct remote_input {
unsigned char pad3; unsigned char pad3;
}; };
#define mouse_addr(sp) sp->base_address + CONDOR_MOUSE_DATA #define mouse_addr(sp) (sp->base_address + CONDOR_MOUSE_DATA)
#define display_width(sp) mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESX #define display_width(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESX)
#define display_height(sp) mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESY #define display_height(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_RESY)
#define display_depth(sp) mouse_addr(sp) + CONDOR_INPUT_DISPLAY_BITS #define display_depth(sp) (mouse_addr(sp) + CONDOR_INPUT_DISPLAY_BITS)
#define vnc_status(sp) mouse_addr(sp) + CONDOR_OUTPUT_VNC_STATUS #define desktop_info(sp) (mouse_addr(sp) + CONDOR_INPUT_DESKTOP_INFO)
#define vnc_status(sp) (mouse_addr(sp) + CONDOR_OUTPUT_VNC_STATUS)
#define isr_control(sp) (mouse_addr(sp) + CONDOR_MOUSE_ISR_CONTROL)
#define mouse_interrupt_pending(sp) readl(mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS) #define mouse_interrupt_pending(sp) readl(mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS)
#define clear_mouse_interrupt(sp) writel(0, mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS) #define clear_mouse_interrupt(sp) writel(0, mouse_addr(sp) + CONDOR_MOUSE_ISR_STATUS)
...@@ -101,10 +105,10 @@ struct remote_input { ...@@ -101,10 +105,10 @@ struct remote_input {
#define get_queue_reader(sp) readl(mouse_addr(sp) + CONDOR_MOUSE_Q_READER) #define get_queue_reader(sp) readl(mouse_addr(sp) + CONDOR_MOUSE_Q_READER)
#define set_queue_reader(sp, reader) writel(reader, mouse_addr(sp) + CONDOR_MOUSE_Q_READER) #define set_queue_reader(sp, reader) writel(reader, mouse_addr(sp) + CONDOR_MOUSE_Q_READER)
#define queue_begin mouse_addr(sp) + CONDOR_MOUSE_Q_BEGIN #define queue_begin (mouse_addr(sp) + CONDOR_MOUSE_Q_BEGIN)
#define get_queue_entry(sp, read_index) \ #define get_queue_entry(sp, read_index) \
queue_begin + read_index * sizeof(struct remote_input) ((void*)(queue_begin + read_index * sizeof(struct remote_input)))
static inline int advance_queue_reader(struct service_processor *sp, unsigned long reader) static inline int advance_queue_reader(struct service_processor *sp, unsigned long reader)
{ {
...@@ -116,4 +120,151 @@ static inline int advance_queue_reader(struct service_processor *sp, unsigned lo ...@@ -116,4 +120,151 @@ static inline int advance_queue_reader(struct service_processor *sp, unsigned lo
return reader; return reader;
} }
#define NO_KEYCODE 0
#define KEY_SYM_BK_SPC 0xFF08
#define KEY_SYM_TAB 0xFF09
#define KEY_SYM_ENTER 0xFF0D
#define KEY_SYM_SCR_LOCK 0xFF14
#define KEY_SYM_ESCAPE 0xFF1B
#define KEY_SYM_HOME 0xFF50
#define KEY_SYM_LARROW 0xFF51
#define KEY_SYM_UARROW 0xFF52
#define KEY_SYM_RARROW 0xFF53
#define KEY_SYM_DARROW 0xFF54
#define KEY_SYM_PAGEUP 0xFF55
#define KEY_SYM_PAGEDOWN 0xFF56
#define KEY_SYM_END 0xFF57
#define KEY_SYM_INSERT 0xFF63
#define KEY_SYM_NUM_LOCK 0xFF7F
#define KEY_SYM_KPSTAR 0xFFAA
#define KEY_SYM_KPPLUS 0xFFAB
#define KEY_SYM_KPMINUS 0xFFAD
#define KEY_SYM_KPDOT 0xFFAE
#define KEY_SYM_KPSLASH 0xFFAF
#define KEY_SYM_KPRIGHT 0xFF96
#define KEY_SYM_KPUP 0xFF97
#define KEY_SYM_KPLEFT 0xFF98
#define KEY_SYM_KPDOWN 0xFF99
#define KEY_SYM_KP0 0xFFB0
#define KEY_SYM_KP1 0xFFB1
#define KEY_SYM_KP2 0xFFB2
#define KEY_SYM_KP3 0xFFB3
#define KEY_SYM_KP4 0xFFB4
#define KEY_SYM_KP5 0xFFB5
#define KEY_SYM_KP6 0xFFB6
#define KEY_SYM_KP7 0xFFB7
#define KEY_SYM_KP8 0xFFB8
#define KEY_SYM_KP9 0xFFB9
#define KEY_SYM_F1 0xFFBE // 1B 5B 5B 41
#define KEY_SYM_F2 0xFFBF // 1B 5B 5B 42
#define KEY_SYM_F3 0xFFC0 // 1B 5B 5B 43
#define KEY_SYM_F4 0xFFC1 // 1B 5B 5B 44
#define KEY_SYM_F5 0xFFC2 // 1B 5B 5B 45
#define KEY_SYM_F6 0xFFC3 // 1B 5B 31 37 7E
#define KEY_SYM_F7 0xFFC4 // 1B 5B 31 38 7E
#define KEY_SYM_F8 0xFFC5 // 1B 5B 31 39 7E
#define KEY_SYM_F9 0xFFC6 // 1B 5B 32 30 7E
#define KEY_SYM_F10 0xFFC7 // 1B 5B 32 31 7E
#define KEY_SYM_F11 0xFFC8 // 1B 5B 32 33 7E
#define KEY_SYM_F12 0xFFC9 // 1B 5B 32 34 7E
#define KEY_SYM_SHIFT 0xFFE1
#define KEY_SYM_CTRL 0xFFE3
#define KEY_SYM_ALT 0xFFE9
#define KEY_SYM_CAP_LOCK 0xFFE5
#define KEY_SYM_DELETE 0xFFFF
#define KEY_SYM_TILDE 0x60
#define KEY_SYM_BKTIC 0x7E
#define KEY_SYM_ONE 0x31
#define KEY_SYM_BANG 0x21
#define KEY_SYM_TWO 0x32
#define KEY_SYM_AT 0x40
#define KEY_SYM_THREE 0x33
#define KEY_SYM_POUND 0x23
#define KEY_SYM_FOUR 0x34
#define KEY_SYM_DOLLAR 0x24
#define KEY_SYM_FIVE 0x35
#define KEY_SYM_PERCENT 0x25
#define KEY_SYM_SIX 0x36
#define KEY_SYM_CARAT 0x5E
#define KEY_SYM_SEVEN 0x37
#define KEY_SYM_AMPER 0x26
#define KEY_SYM_EIGHT 0x38
#define KEY_SYM_STAR 0x2A
#define KEY_SYM_NINE 0x39
#define KEY_SYM_LPAREN 0x28
#define KEY_SYM_ZERO 0x30
#define KEY_SYM_RPAREN 0x29
#define KEY_SYM_MINUS 0x2D
#define KEY_SYM_USCORE 0x5F
#define KEY_SYM_EQUAL 0x2B
#define KEY_SYM_PLUS 0x3D
#define KEY_SYM_LBRKT 0x5B
#define KEY_SYM_LCURLY 0x7B
#define KEY_SYM_RBRKT 0x5D
#define KEY_SYM_RCURLY 0x7D
#define KEY_SYM_SLASH 0x5C
#define KEY_SYM_PIPE 0x7C
#define KEY_SYM_TIC 0x27
#define KEY_SYM_QUOTE 0x22
#define KEY_SYM_SEMIC 0x3B
#define KEY_SYM_COLON 0x3A
#define KEY_SYM_COMMA 0x2C
#define KEY_SYM_LT 0x3C
#define KEY_SYM_PERIOD 0x2E
#define KEY_SYM_GT 0x3E
#define KEY_SYM_BSLASH 0x2F
#define KEY_SYM_QMARK 0x3F
#define KEY_SYM_A 0x41
#define KEY_SYM_B 0x42
#define KEY_SYM_C 0x43
#define KEY_SYM_D 0x44
#define KEY_SYM_E 0x45
#define KEY_SYM_F 0x46
#define KEY_SYM_G 0x47
#define KEY_SYM_H 0x48
#define KEY_SYM_I 0x49
#define KEY_SYM_J 0x4A
#define KEY_SYM_K 0x4B
#define KEY_SYM_L 0x4C
#define KEY_SYM_M 0x4D
#define KEY_SYM_N 0x4E
#define KEY_SYM_O 0x4F
#define KEY_SYM_P 0x50
#define KEY_SYM_Q 0x51
#define KEY_SYM_R 0x52
#define KEY_SYM_S 0x53
#define KEY_SYM_T 0x54
#define KEY_SYM_U 0x55
#define KEY_SYM_V 0x56
#define KEY_SYM_W 0x57
#define KEY_SYM_X 0x58
#define KEY_SYM_Y 0x59
#define KEY_SYM_Z 0x5A
#define KEY_SYM_a 0x61
#define KEY_SYM_b 0x62
#define KEY_SYM_c 0x63
#define KEY_SYM_d 0x64
#define KEY_SYM_e 0x65
#define KEY_SYM_f 0x66
#define KEY_SYM_g 0x67
#define KEY_SYM_h 0x68
#define KEY_SYM_i 0x69
#define KEY_SYM_j 0x6A
#define KEY_SYM_k 0x6B
#define KEY_SYM_l 0x6C
#define KEY_SYM_m 0x6D
#define KEY_SYM_n 0x6E
#define KEY_SYM_o 0x6F
#define KEY_SYM_p 0x70
#define KEY_SYM_q 0x71
#define KEY_SYM_r 0x72
#define KEY_SYM_s 0x73
#define KEY_SYM_t 0x74
#define KEY_SYM_u 0x75
#define KEY_SYM_v 0x76
#define KEY_SYM_w 0x77
#define KEY_SYM_x 0x78
#define KEY_SYM_y 0x79
#define KEY_SYM_z 0x7A
#define KEY_SYM_SPACE 0x20
#endif /* _IBMASM_REMOTE_H_ */ #endif /* _IBMASM_REMOTE_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment