How i can use Ethernet Interrupt in arduino Mega

Hi guys, I am working on a project. Actually, it is a keyboard in hard panel form and touch panel form. I have so far made the code for the hard panel but I want to make the code for the soft panel. A user can press any key at any time from one of the panels. I am taking care of hard panel using polling method technique and it is connected to the serial port of mega. Now if I create a routine for checking the status of the soft panel then it causes delays even though the user doesn't press any key from the soft panel and my soft panel data is reading using the ethernet shield. So my question is that Is there any way that I can see and process these two panels in parallel without delay. Any suggestion will be helpful. Thanks

alikhan968: Is there any way that I can see and process these two panels in parallel without delay.

Is there any way we can see your sketch?